Hi,
I am unable to find php error log's cvan anyone help out to find error log...
Thanks,
how to find php error log
Moderator: General Moderators
Re: how to find php error log
Check the error_log php.ini setting. If that's empty then check your web server logs.
-
annaharris
- Forum Commoner
- Posts: 30
- Joined: Mon Mar 25, 2013 6:52 am
Re: how to find php error log
Check: /home/username/logs/example.com/http/error.log
how to find php error log
Start session without errors please check errors given in your PHP and/or webserver log file and configure your PHP installation . The best way to dynamically store the PHP log files .
Last edited by requinix on Tue Jun 18, 2013 12:40 pm, edited 1 time in total.
Reason: removing spammy link
Reason: removing spammy link
Re: how to find php error log
Note that you can point error_log to a file with any name, e.g. myprettyPHPlog.txt
Preferably store it above the html root so it is not world-accessible.
After you've done all this, it may still not work. One common problem (which happened to me on a server not long ago) is permissions on the log file: PHP may not be able to write to it. Worst case, create an empty log file, and change the perms to 644, then trigger an error (divide something by zero) to see if the log gets appended. If it works, you may be able to scale back from 644.
Preferably store it above the html root so it is not world-accessible.
After you've done all this, it may still not work. One common problem (which happened to me on a server not long ago) is permissions on the log file: PHP may not be able to write to it. Worst case, create an empty log file, and change the perms to 644, then trigger an error (divide something by zero) to see if the log gets appended. If it works, you may be able to scale back from 644.
-
priyankagound
- Forum Commoner
- Posts: 27
- Joined: Thu Sep 19, 2013 2:53 am
Re: how to find php error log
Php stores error logs in /var/log/apache2 if php is an apache2 module. Shared hosts are often storing log files in your root directory /log subfolder. But...if you have access to a php.ini file you can do this:
error_log = /var/log/php-scripts.log
error_log = /var/log/php-scripts.log
Re: how to find php error log
You can see in /var/log/httpd/error_log