specific php.ini overrides per worker pool

524 views
Skip to first unread message

mike503

unread,
Aug 1, 2008, 8:25:55 PM8/1/08
to highload-php-en
I am trying to find the docs on that, I swore I saw an example but I
cannot find it at the moment.

What is it to be able to set for example error_reporting to something
different for a specific pool of workers? Basically I want to turn on
full error reporting, display errors, etc, etc. for our development
environment, otherwise keep it to display_errors off and have it be
logged (for production hosts)

I am pretty sure this is a planned feature, and I am pretty sure it
was already implemented but I can't find an example of it. Can anyone
help?

Thanks :)

Andrei Nigmatulin

unread,
Aug 3, 2008, 12:17:08 PM8/3/08
to highloa...@googlegroups.com

<workers>
<section name="pool">
...
<value name="php_defines">
<value name="error_reporting">E_ALL</value>
...
</value>
...
</section>

<section name="pool">
...
<value name="php_defines">
<value name="error_reporting">E_WARNING</value>
...
</value>
...
</section>
</workers>

--
Andrei Nigmatulin
GPG PUB KEY 6449830D

Now I lay me down to sleep(3)
Pray the OS my core to keep
If I die before I wake
Pray the Disk my core to take

mike

unread,
Aug 3, 2008, 12:17:01 PM8/3/08
to highloa...@googlegroups.com
On 8/3/08, Andrei Nigmatulin <andrei.n...@gmail.com> wrote:

> <workers>
> <section name="pool">
> ...
> <value name="php_defines">
> <value name="error_reporting">E_ALL</value>
> ...
> </value>
> ...
> </section>
>
> <section name="pool">
> ...
> <value name="php_defines">
> <value name="error_reporting">E_WARNING</value>
> ...
> </value>
> ...
> </section>
> </workers>

Andrei - thanks.

Can -anything- be overridden or is it only specific variables? I'm
looking at these for the moment:

http://www.php.net/manual/en/errorfunc.configuration.php

error_reporting
display_errors
display_startup_errors
log_errors
error_log

Andrei Nigmatulin

unread,
Aug 3, 2008, 12:43:29 PM8/3/08
to highloa...@googlegroups.com
On Sunday 03 August 2008 20:17, mike wrote:
> On 8/3/08, Andrei Nigmatulin <andrei.n...@gmail.com> wrote:
> > <workers>
> > <section name="pool">
> > ...
> > <value name="php_defines">
> > <value name="error_reporting">E_ALL</value>
> > ...
> > </value>
> > ...
> > </section>
> >
> > <section name="pool">
> > ...
> > <value name="php_defines">
> > <value name="error_reporting">E_WARNING</value>
> > ...
> > </value>
> > ...
> > </section>
> > </workers>
>
> Andrei - thanks.
>
> Can -anything- be overridden or is it only specific variables? I'm
> looking at these for the moment:

You can not override only options that used in early php initialization stage,
such as zend_extension and display_startup_errors, for example. This is
because php-fpm code takes control after they get applied in php engine.

I believe all options that you've listed here (except display_startup_errors)
should work just fine.

> http://www.php.net/manual/en/errorfunc.configuration.php
>
> error_reporting
> display_errors
> display_startup_errors
> log_errors
> error_log

--

Reply all
Reply to author
Forward
0 new messages