Link to home
Start Free TrialLog in
Avatar of rhandalthor
rhandalthorFlag for Russian Federation

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/local/apache2/htdocs/joomla/configuration.php) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: Permission denied in /opt/local/apache2/htdocs/joomla/libraries/joomla/filesystem/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?

Avatar of rhandalthor
rhandalthor
Flag of Russian Federation image

ASKER

Hmm. I created another php error and it was displayed and logged. SO why the white screen of death with any logging?
ASKER CERTIFIED SOLUTION
Avatar of lasham
lasham

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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...
Avatar of lasham
lasham

Can you write your code where you think it should log some error?
Well either in Apache's error log: /opt/local/apache2/logs/error_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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial