Jump to content

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?

Edited by crwork
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?

Edited by crwork

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.