Forum Moderators: coopster

Message Too Old, No Replies

showing php errors

         

electricocean

7:59 am on Jan 15, 2006 (gmt 0)

10+ Year Member



How do I show errors? My server turned them off in the php.ini file.

I have been trying
error_reporting(E_ALL); and
ini_set('display_errors', 1);

but nothing is working

what should I do?

FalseDawn

5:58 pm on Jan 15, 2006 (gmt 0)

10+ Year Member



If your host is running phpsuexec, you'll probably need to create your own php.ini file and add

error_reporting = E_ALL
display_errors = on

to it.

Otherwise, adding the following 2 directives in a .htaccess file should work:

php_value error_reporting 2047
php_value display_errors on

The 2047 just means "all errors" and can be changed if required.

coopster

3:17 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



... and if it is a shared hosting environment they often have the errors going to a log file. Find out where your log file is and you can manage the errors there.

electricocean

1:44 am on Jan 20, 2006 (gmt 0)

10+ Year Member



I just found I could create a prepend.php and add the two errors dfineing lines above. it works now