Display errors in CentOS
Moderator: General Moderators
Display errors in CentOS
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
Did you remember to restart Apache after making changes to php.ini?
Re: Display errors in CentOS
I did remember, yes.
Re: Display errors in CentOS
Shameless bump. Please advise!
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Display errors in CentOS
Run a script with
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.
Code: Select all
<?php phpinfo(); ?>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.