Hi,
I'm trying to not show the user a php error and have tried the following:
error_reporting(0); (may not be the best idea)
error_reporting(E_ERROR);
to remove a warning type error and it doesn't seem to work.

The php version is 4.3.2
display_errors is set to on

Anyone know why this doesn't seem to work for me?

Thanks,
Dave

Recommended Answers

Setting it to error_reporting(0) should work, as stated here:

http://www.mcs.vuw.ac.nz/technical/software/PHP/function.error-reporting.html

but you could try setting new values in a .htaccess file if your server supports it, such as,

display_errors off

within the .htaccess file

Jump to Post

All 2 Replies

error_reporting(0) isn't working and when I place display_errors off in the .htaccess file I can't open the page and get a 500 internal server error!

Thanks but I am still stuck!

Dave

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.