Problem turning Display Errors off via .htaccess

Hi,

My sites on a shared host (php 5.2.14). The default configuration has error display turned on.

I want to turn this off using an .htaccess file in the root directory of the site.

I added the line:

php_flag display_errors off

but it caused an “Internal Server” error message to be displayed when trying to view the site

I’ve also tried
php_flag display_errors “Off”
and
php_flag display_errors “0”

But its the same.

Could someone please tell me the correct directive to achieve this please ?

Hi,

Thanks,

I tried putting:

display_errors = off;

in the php.ini file which is in the sites root directory but it doesn´t seem to work either. Errors still get displayed and phpinfo also shows error display as on.

Hi,

Try to create a php.ini file for the particular folder or the root folder. Add the entry in the php.in fil and then make a try.