Jump to content

Php Error Log Clarification


Recommended Posts

I'm trying to find the default location for the error_log. We're running a lighttpd server with PHP 5.3.

 

If I run phpinfo(), log_errors is ON, but error_log has no value.

 

Does this mean that the error_log location is whatever is defined in the Apache httpd.conf file? Or in our case, lighttpd.conf?

Link to comment
https://forums.phpfreaks.com/topic/269832-php-error-log-clarification/
Share on other sites

The reason for my post is that I'm already getting a PHP error and it's not being logged to the default error location in lighttpd.conf. In fact, the file pointed to by server.errorlog in lighttpd.conf doesn't exist. That's why I posted-I am confused as to where the default error log is being written to. Any recommendations?

Thanks Christian, that helps to narrow it down. lighttpd is running on port 80.

 

Given this info, there's something peculiar going on. Now, when I run phpinfo(), log_errors is set to OFF. So in a test file with an intentional php error I used 'ini_set' to turn it on. Lo and behold the php error was written to the error file specified in the lighttpd.conf file which makes sense given the netstat result.

 

This opens up another question for me about what php.ini file is being used since lighttpd is the active web server. In phpinfo() the value for 'Loaded Configuration File' is '(none)'. Is this normal for lighttpd? I did a search on the server for 'p*.ini'. It found the php.ini in the apache2 directory, but then my search timed out. I searched in the /etc folder separately, but to no avail.

 

Does lighttpd have its own version of a php.ini or am I barking up the wrong tree?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.