Magento Installation Problem on Real server
I have been working on magento the whole day today, trying to get it working on our US server LAMP. (whm+cpanel)
I have ecountered several quite major probelm today:
1.Class 'Mage_Core_Model_App' not found in app/Mage.php on line 351
relevent post can be found at :
To debug this error i have got recommended a magento server check file to run through on our server to identify what has been missing on the installation environment.
Checking Server Requirement
download the file magento-check.php from here.
This will help you check all required moduel and php/ mysql you need to get mangento running properly.
Listing of things you may need to know
The following requirements were successfully met:
- You need MySQL 4.1.20 (or greater)
- You have PHP 5.2.0 (or greater) *
- Safe Mode is off
- You have the curl extension
- You have the dom extension
- You have the gd extension
- You have the hash extension
- You have the iconv extension
- You have the mcrypt extension
- You have the pcre extension
- You have the pdo extension *
- You have the pdo_mysql extension *
- You have the simplexml extension
Lots of people having problem using php 5.2.5 accessing magento. you may need to downgrade to 5.2.0 or upgrade to 5.2.9.
pdo and pdo_mysql (php 5.0 +)
These two extention is required by magento system, so will need to be enable before going any further. Be aware it only works on php 5.0 + version.
"PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x, 4.x and 5.x databases.
PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you're using an older version of the mysql client libraries, PDO will emulate them for you."
Also need to enable ./configure command, we will mention later.
Install pdo extension on cpanel/whm
Cpanel by default disable pdo access from its installation, which means you have to manually install the extension.
Server Security [prepare]
Most of time, you will likely encounter a server security warning saying your phpinfo and shell_excute is disable due to security issue.
There is a way you could do to put a customized php.ini overwritting the sever default on and allow you to access the debugging file you may temporay needed.
modify this line
disable_functions = "show_source, system, shell_exec, phpinfo,passthru, exec, popen, proc_open, allow_url_fopen"
delete the phpinfo and shell_exec
To enable pdo and pdo_mysql on whm
You can download the extension but you have to compile it or build it before it can do the function for you. refer
1.You need to get into your whm using your root account.
2. go to software->easyapache (apache update) -> choose previouily saved config -> start customizing based on profile -> go to few steps -> turn on the enable pdo and pdo_mysql-> overwire the existing profile -> build (building will takes quite long time 10-20mins).
What build do?!
1. Download the extension, rewrite the extention dir into php.ini
extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.so
into your php.ini file as well.
3. update the ./configure command
[./configure --with-zlib --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared]
Testing : running "/usr/local/cpanel/3rdparty/bin/php -i | grep -i pdo" command:
To See whether dpo is enable and ready to use and also you will be able to see the module has been actived in phpinfo.php
Install Pdo Manually on the server
Here is a detailed post from DirectAdmin give you a step by step tutorial for achieving that!
It's actaully not so hard to set up a mangento, i have minor problem with my local WMAP and MAMP server. The Real live server usually will be more secuire than local dev server. Try to balance the security features and also the enabled modules could be a key for keeping project moving forward. :D
Had a tough day with it! good to help others who may have same problem!