crwork Posted October 23, 2012 Share Posted October 23, 2012 (edited) 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 October 23, 2012 by crwork Quote Link to comment Share on other sites More sharing options...
ManiacDan Posted October 23, 2012 Share Posted October 23, 2012 An easier way to answer this question is: 1) Write an erroneous PHP page. 2) Visit it. 3) Check the default error location in lighttpd.conf Quote Link to comment Share on other sites More sharing options...
crwork Posted October 23, 2012 Author Share Posted October 23, 2012 (edited) 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 October 23, 2012 by crwork Quote Link to comment Share on other sites More sharing options...
ManiacDan Posted October 23, 2012 Share Posted October 23, 2012 Perhaps it's not writing to the file because it doesn't exist. Create the file, fix the permissions, and try again. Also put the file in php.ini just to be safe. Quote Link to comment Share on other sites More sharing options...
crwork Posted October 25, 2012 Author Share Posted October 25, 2012 Unfortunately, that didn't work, but thanks for the suggestion, MD. Come to find out this server has both lighttpd and Apache(!), so I think there's a configuration conflict somewhere. Once I get my head around that, I'll post here with any updates. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted October 25, 2012 Share Posted October 25, 2012 (edited) sudo netstat -apn | grep :80 Should let you know what server is running, and listening on port 80. Edited October 25, 2012 by Christian F. Quote Link to comment Share on other sites More sharing options...
crwork Posted October 25, 2012 Author Share Posted October 25, 2012 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.