0

How can I disable all php errors using my htaccess?
I don't have access to the php.ini file on my server.

Can I hide errors using some code in htaccess?

2
  • 6
    You could correct them, so they won't appear anymore... Commented Apr 18, 2015 at 7:35
  • This is not quite the same as the linked question. Commented Apr 18, 2015 at 9:04

2 Answers 2

2

Add the following line to your .htaccess file in the Root directory

  php_value display_errors Off 

This tells the apache web server to hide php errors for all directories and sub directories on the server.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks it worked, But now other pages where I turned on error reporting are not opening. what could be the problem?
@Tim3111 you have turned off the php errors, remove the error reporting too.
0

Can you try adding these lines to your .htaccess file and upload it to root directory.

php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.