rhandalthor
asked on
MacPorts LAMP on OSX 10.6.3 PHP errors no longer logged
I have a LAMP server running on my MBP using MacPorts LAMP Package and Snow Leopard. Apache runs well and so do PHP5 and MySQL. I am working on a Wordpress theme and as I got the PHP white screen of death I wanted to check the php eror log. No logging there since March 15 this year. Here final log line:
[15-Mar-2010 13:06:40] PHP Warning: file_put_contents(/opt/loc al/apache2 /htdocs/jo omla/confi guration.p hp) [<a href='function.file-put-co ntents'>fu nction.fil e-put-cont ents</a>]: failed to open stream: Permission denied in /opt/local/apache2/htdocs/ joomla/lib raries/joo mla/filesy stem/file. php on line 298
That should not be the case. There should be log lines today. Here is PHP with error grepped:
My-MacBook-Pro:php5 me$ php -i | grep error
display_errors => STDOUT => STDOUT
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => /var/log/php-scripts.log => /var/log/php-scripts.log
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => On => On
log_errors_max_len => 1024 => 1024
track_errors => On => On
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
path to error log is there:
My-MacBook-Pro:log me$ pwd
/var/log
My-MacBook-Pro:log me$ ls -lh | grep php
-rw-rw-rw- 1 root wheel 708K Mar 15 13:06 php-scripts.log
So why is it no longer logging?
[15-Mar-2010 13:06:40] PHP Warning: file_put_contents(/opt/loc
That should not be the case. There should be log lines today. Here is PHP with error grepped:
My-MacBook-Pro:php5 me$ php -i | grep error
display_errors => STDOUT => STDOUT
display_startup_errors => Off => Off
error_append_string => no value => no value
error_log => /var/log/php-scripts.log => /var/log/php-scripts.log
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
html_errors => Off => Off
ignore_repeated_errors => Off => Off
log_errors => On => On
log_errors_max_len => 1024 => 1024
track_errors => On => On
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
path to error log is there:
My-MacBook-Pro:log me$ pwd
/var/log
My-MacBook-Pro:log me$ ls -lh | grep php
-rw-rw-rw- 1 root wheel 708K Mar 15 13:06 php-scripts.log
So why is it no longer logging?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I use error_reporting = E_ALL | E_STRICT now. Removed some errors and now I got rid of the white screen. Had a white screen before without any php errors nor other errors reported. Reason why is still unclear. There should have been some kind of logging...
Can you write your code where you think it should log some error?
ASKER
Well either in Apache's error log: /opt/local/apache2/logs/er ror_log or the PHP error log: /var/log/php-scripts.log. In neither places I found anything mentioned to explain the white screen at the time. But I guess I did not have E_STRICT added at that moment in time. Thanks for your input.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER