Forum Moderators: coopster

Message Too Old, No Replies

How Do You Configure PHP To Display Errors?

         

wildguy

9:55 pm on Oct 8, 2007 (gmt 0)

10+ Year Member



Hi all,

I have a dedicated Linux box with PHP 4.4.x installed. When trying to install Wordpress, my install.php page comes up blank. (It happens when trying to install 3 different versions of WP. Argh.)

I'd like to configure my PHP to display the error, but I have no idea how to do that (I'm ignorant when it comes to tech stuff like this).

Do I do something to the php.ini file?

Do I go into my domain's cpanel to find the php.ini file?

Do I go into my domain's WHM to find the php.ini file?

In research how to display errors, I've seen others mention a "display_errors = On" parameter in the php.ini.

But, I honestly have no idea where to find that file or how to modify it?

If anyone has any insight into how I can display errors in PHP, please let me know. This has been driving me nuts.

Thanks much.

coopster

11:26 pm on Oct 8, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You really don't want errors being displayed on a production box, so just keep that in mind as you setup your environment. There are many reasons for this, including security. If you have a development area that only you can access, then you can probably override some of the error_reporting [php.net] directives and their defaults to see what is going on, but more than likely your answers are already there, in your logs.

wildguy

1:39 am on Oct 9, 2007 (gmt 0)

10+ Year Member



Hi Coopster,

I was hoping that the error was in my logs, but unfortunately, checking my logs didn't yield anything conclusive.

I was hoping to make whatever change was necessary to configure my PHP to display the error, see the error, report it back to my host and then switch it back to not display the error.

Shouldn't take more than a couple minutes and I'm okay with the lack of security during that time. Literally the time it takes to reload a page.

That said, do you know how I can make such a change to configure my PHP?

Thanks for any help you can offer!

eelixduppy

1:44 am on Oct 9, 2007 (gmt 0)



The error that is displayed on the browser is the same error you will find in your logs so you won't be getting any more information from it. You can, however, change the error reporting level as coopster said above, which will log errors based your given specifications. E_ALL is what you should be using to catch them all.