Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've noticed there are a large number of servers running Magento Commerce that will return a fatal error showing the system path:

Fatal error: Uncaught exception 'Exception' with message 'File '/usr/local/www/magento/data1702/media/css' does not exists.' in /usr/local/www/magento/data1702/lib/Varien/File/Transfer/Adapter/Http.php:96 Stack trace: #0 /usr/local/www/magento/data1702/get.php(205): Varien_File_Transfer_Adapter_Http->send('/usr/local/www/...') #1 /usr/local/www/magento/data1702/get.php(165): sendFile('/usr/local/www/...') #2 {main} thrown in /usr/local/www/magento/data1702/lib/Varien/File/Transfer/Adapter/Http.php on line 96

Magento as an application is generally good about supressing error messages. How can a linux server running apache be configured to avoid returning this error message since the app has problems suppressing it.

share|improve this question

1 Answer 1

actually, this is a php error.

You can edit your php.ini file to disable php error display by setting display_errors to 0 instead of 1

share|improve this answer
    
The php.ini file on the server has display_errors set to "off", but still displays the error. The index.php file has this line: #ini_set('display_errors', 1); . Would that turn it back on? –  JMC Nov 19 '12 at 16:38
    
What does the # do? –  JMC Nov 19 '12 at 16:42
    
the # is a one-line shell-style comment, meaning that then content after the # within the same line is not exectuted. are you sure you checked the right php.ini file, can you check with a script containing a phpinfo() call ? –  m0ntassar Nov 19 '12 at 16:55
    
This is the output: display_errors => Off => Off display_startup_errors => Off => Off . I believe this is the reason so many servers will return the errors. Most people know to turn display_errors to off in production. –  JMC Nov 19 '12 at 17:26
    
+1 because it was a display_errors issue. It is being set to "on" in get.php inside the application. I'd still like to know how this can be prevented at the server level outside the application if possible. –  JMC Nov 19 '12 at 19:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.