Page 1 of 1

Display errors in CentOS

Posted: Wed Nov 02, 2011 9:56 am
by PJ688
Howdy folks! PHP newb here. I have worked with PHP successfully under Windows, but now for my current project I must work off of CentOS 6. I don't know much about Linux at all, and my PHP code isn't displaying any errors at all. I used the find command in the command prompt to find php.ini and found two separate locations the file was being stored. I went into each ini file, set display_errors to on, set error_reporting to E_ALL, and still there are no errors. I have included the code "ini_set('display_errors', 'on');" in my files, and still there are no errors. I am getting very frustrated that I can make no progress on my project. Does anyone have any advice for me?

Re: Display errors in CentOS

Posted: Wed Nov 02, 2011 10:13 am
by Celauran
Did you remember to restart Apache after making changes to php.ini?

Re: Display errors in CentOS

Posted: Wed Nov 02, 2011 10:56 am
by PJ688
I did remember, yes.

Re: Display errors in CentOS

Posted: Wed Nov 02, 2011 2:47 pm
by PJ688
Shameless bump. Please advise!

Re: Display errors in CentOS

Posted: Wed Nov 02, 2011 4:08 pm
by John Cartwright
Run a script with

Code: Select all

<?php phpinfo(); ?>
This will give you information regarding your PHP, including which php.ini is being used (you likely have 2 as 1 is or Apache, the other is for CLI.) as well as the current error reporting settings.

Check to make sure all the error settings are as you expected, perhaps post the phpinfo() if you are unsure (but do not disclose which server it came from!!).

Also, make sure you are checking your php error logs.