# Turn off warning message on nginx

**URL:** <https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733>\
**Category:** NGINX\
**Created:** [February 4, 2011, 5:32pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733 "2011-02-04T17:32:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 4, 2011, 5:32pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733/1 "2011-02-04T17:32:09Z")

</div>

Hi,

Is there any command that i put in conf file to turnoff warning message  
of joomla.

for instance in apache .htaccess if i add php\_flag display\_errors “0” it  
doesnt show me error message anymore

how can i get rid of this problem

thanks in advance

Posted at Nginx Forum:

> **[turn off warning message on nginx](https://forum.nginx.org/read.php?2,172118,172118#msg-172118)**
>
> Hi, Is there any command that i put in conf file to turnoff warning message of joomla. for instance in apache .htaccess if i add php\_flag display\_errors "0" it doesnt show me error message anymore how can i get rid of this problem

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 9, 2011, 4:56pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733/2 "2011-02-09T16:56:09Z")

</div>

On 02/04/2011 05:30 PM, lifeisjustabout wrote:

> thanks in advance  
> This is php ‘thing’, nginx have nothing to do with it.

– Piotr.

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 9, 2011, 7:32pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733/3 "2011-02-09T19:32:27Z")

</div>

I think Jerome was working on a fastcgi\_param method to alter ini  
directives from the nginx conf. IIRC.

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 9, 2011, 10:16pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733/4 "2011-02-09T22:16:20Z")

</div>

> > for instance in apache .htaccess if i add php\_flag display\_errors “0” it  
> > doesnt show me error message anymore

While nginx doesnt provide such option you can accomplish it with PHP  
which  
has exactly such feature for Fastcgi sapi -

> **[PHP: .user.ini files - Manual](https://www.php.net/manual/en/configuration.file.per-user.php)**
>
> .user.ini files

In short starting with 5.3.0 php you can put a ‘.user.ini’ file in  
directory  
containing ‘display\_errors=0’ and it should work.

rr

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 9, 2011, 11:37pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733/5 "2011-02-09T23:37:16Z")

</div>

> it means for each requests, every directory from / to the full path of the  
> script file, a check is done on the presence of .user.ini. This kills  
> performances and should be avoid in high loaded sites.

While I’m not suggesting this (I don’t use it personally as no  
coder/developer should override my carefully crafted server  
configuration)  
it is not as bad as you say .

If you had looked at the documentation (and as far I tested it also  
works as  
described) you might notice that there is ‘user\_ini.cache\_ttl’ which  
controls how often are the ini files reread. Setting it high enough  
(default  
is 5 mins) won’t give you any penalty at all versus the flexibility such  
approach provides.

“High loaded” sites wouldnt probably use .htaccess anyways which makes  
me  
think that the innitial poster doesnt really has one but asks for  
similar  
feature.

p.s. if you specifically do not disable (make an empty string ‘’ setting  
for  
user\_ini.filename in your php.ini ) php does this by default ..

rr

---

<div class="post-metadata">

**Author:** ![lifeisjustabout](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@lifeisjustabout](https://www.ruby-forum.com/u/lifeisjustabout)\
**Post date:** [February 9, 2011, 10:19pm UTC](https://www.ruby-forum.com/t/turn-off-warning-message-on-nginx/202733/6 "2011-02-09T22:19:28Z")

</div>

2011/2/9 Reinis R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > > for instance in apache .htaccess if i add php\_flag display\_errors “0” it  
> > > doesnt show me error message anymore
> 
> While nginx doesnt provide such option you can accomplish it with PHP which  
> has exactly such feature for Fastcgi sapi -  
> [PHP: .user.ini files - Manual](http://www.php.net/manual/en/configuration.file.per-user.php)
> 
> In short starting with 5.3.0 php you can put a ‘.user.ini’ file in directory  
> containing ‘display\_errors=0’ and it should work.

it means for each requests, every directory from / to the full path of  
the script file, a check is done on the presence of .user.ini. This  
kills performances and should be avoid in high loaded sites.
