Logging Errors on Different Sites
Hi, I am new to Cpanel and having some issues with my error log.
I have the WHM panel and Cpanel. I have two websites that are setup on dedicated IP addresses. DomainA and DomainB.
DomainA on IPAddressA, I can login to my Cpanel, click on error log and everything looks good there.
DomainB on IPAddressB is not showing the errors for that domain.
I'm getting a 500 error on the page I'm working on so I know it should be logging the error. In my public_html folder I have my php.ini setup with these settings:
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = off
; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off
; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On
I also have a page setup (info.php) that has this code in it
I get a 500 server error when going to that page. So I'm thinking it's a setting somewhere I missed but I don't know where to start looking. Any help is greatly appreciated!
Untitled Document
I get a 500 server error when going to that page. So I'm thinking it's a setting somewhere I missed but I don't know where to start looking. Any help is greatly appreciated!
-
Hello :) You should see the "500" error message in the Apache error log: /usr/local/apache/logs/error_log Try uploading a PHP script that will produce a PHP error and see if it's logged to the error_log file within your account. Thank you. 0 -
Hi! Thanks for the reply! I ran the page that is throwing the error (cart.php) and then opened up the error_log as instructed. There is no 500 error message in there for the domain that I am working on. It has a few errors from my other domain though... Any idea why I'm not getting them from the domain I'm working on? 0 -
Right, a "500" error message is an Apache error, not a PHP error. What I am saying is that you should upload a script that generates a PHP error. [url=http://php.net/manual/en/function.trigger-error.php]PHP: trigger_error - Manual Thank you. 0 -
Oh! Got ya. That pointed me in the right direction. The only things that were showing in my log were: File does not exist: Directory index forbidden by Options directive: On my other sites it will log php syntax errors... even though I had log_errors on in my php.ini file, something else must have been messed up. I copied the php.ini from my working site over and it is logging the errors correctly now. Thanks for the help! 0 -
I am happy to see the issue has been addressed. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
5 comments