After installing Magento on your shared hosting or dedicated server you may get the following error:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX
There are many cases why this might happen. Check out the error details in the directory var/report to see what’s going on.
In my case, though, the report says:
a:5:{i:0;s:250:”Warning: realpath() [<a href='function.realpath'>function.realpath</a>]: SAFE MODE Restriction in effect. The script whose uid is 2397 is not allowed to access /tmp owned by uid 0 in /home/…/public_html/lib/Zend/Cache/Backend.php on line 185″;i:1;s:3891:”#0 [internal function]: mageCoreErrorHandler(2, ‘realpath() [<a …’, ‘/home/…/…’, 185, Array)
The error is caused by Magento attempting to access directory /tmp in the filesystem, but since PHP is running in safe mode, it is not allowed.
To fix it, you either disable safe_mode (NOT recommended), or patch the file magento/lib/Zend/Cache/Backend/File.php as follows:
Edit:
protected $_options = array( 'cache_dir' => null,
Replace with:
protected $_options = array( 'cache_dir' => 'var/tmp',
Then create the directory tmp inside var directory in your Magento installation directory.
Now Magento should be running fine!
Adapted from: Magento 1.4 installation fix
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.

