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

Contrary to most people's problem I cannot get PHP to stop showing errors, I have in my php.ini display_errors set to off but it still shows them, I have also tried .htaccess, and inline ini_set and error_reporting variables but the errors still show.

What can I do to prevent this overide?

Mac OS X Lion Server 10.7.1 MAMP Compiled using instructions from DIY Mac Server (diymacserver.com)

UPDATE:

This is where my php.ini file is stored...

This is where my php.ini is

This is the value of my display_errors setting at run time

This is the value of my display_errors

And this is the copy and paste value written in /etc/php.ini

display_errors = Off
share|improve this question
1  
Have you checked phpinfo() to make sure you're using the same php.ini that PHP is using (also, whether it says its on or off)? –  DerfK Sep 2 '11 at 23:55
    
I had not but I have now and it was correct, I changed short tags to on in there and that worked so it's working and reading the file, but its not adhering to the settings for error reporting. –  unknowndomain Sep 3 '11 at 11:30
    
I have added some more detail about my configuration –  unknowndomain Sep 3 '11 at 11:41
    
Awesome thanks! –  John Ballinger Sep 7 '11 at 0:51
    
I have managed to figure out that its happening because my php.ini isn't being read although its in place, can anyone suggest what permissions would be correct for a Apache 2 install running as _www in the group _www (mac os x) –  unknowndomain Sep 7 '11 at 18:44
add comment

3 Answers

make sure your editing the right php.ini file as there are two ini files, one for apache and one for CLI.

share|improve this answer
    
Yes I am editing the right file, as I managed to enable short tags successfully. –  unknowndomain Sep 3 '11 at 11:31
add comment

The display_errors directive can be altered at runtime with the ini_set function. Make sure that none of the code is turning error display back on.

Also, when you update php.ini settings, make sure to restart Apache.

share|improve this answer
    
Indeed it can and I have tried that but it still shows errors... –  unknowndomain Sep 3 '11 at 11:31
add comment

Do you have an auto_append_file= setting that is causing php to include code on every page that uses ini_set() to turn the display back on?

share|improve this answer
    
It is set to blank –  unknowndomain Sep 4 '11 at 6:37
add comment

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.