Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have sharring hosting account on Linux Apache PHP with JustHost.

In my account exists a global php.ini that only admin of hosting company can access.

My problem is that when I run php script the warnings + errors printed on webpage.

So I create php.ini in my www folder and put 2 lines, but nothing happens:

display_errors = Off
display_startup_errors = Off

What should I do to override the global shared hosting php.ini settings?

share|improve this question
up vote 2 down vote accepted

Try putting these lines in your .htaccess file:

php_value display_errors 0
php_value display_startup_errors 0
share|improve this answer

Possible, your hosting provider restricts you from overriding default php.ini. Not always!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.