Le 8 décembre 2009 01:21, Christopher Jones
<christopher.jo...@oracle.com> a écrit :
>
>
> Jérôme Loyet wrote:
>> Yes it could be this way ... but you do repeat the pattern ('pool2')
>> for each entry. There is about 30 lines for each workers ... no
>> imagine having a multiuser environment with 30 customers ... you have
>> 900 times a useless repeated pattern ... gnurf
>
> If there are deficiencies in php.ini syntax, then propose an
> enhancement and/or work around them in FPM.  Having two syntaxes in
> use will be more confusing in the long term.

It could be something like:

; general conf
; [/] optional section
pid=/var/run/php-fpm.pid
log_level=notice

;pool1
[/worker]
name=pool1
[/worker/listen]
address=127.0.0.1:9001
[/worker/pm]
style=dynamic
max_children=32
[/worker/env]
HOSTNAME=$HOSTNAME
[/worker/php_define]
short_open_tags = On

;pool2
[/worker]
name=pool2
[/worker/listen]
address=127.0.0.1:9002
...

In this case conf file is very flat. I don't know if identation is
available with INI (hope so). As there is no closing section all
entries have to be ordered correctly (this is not easy for the end
user).

There is a workarround with adding accolades (or similar):
[/worker{]
[/worker/listen{]
[}]
[}]
But in this case we have almost the same syntax as ngninx (with
brackets arround sections and = signs to separate keys and values).

At the begening of the reflexion the choice of nginx has been made
because most of php-fpm users will use nginx or lighthttp (apache as
its well known module) and some developpement have been made for nginx
at the first place.

As the question is "which is the best syntax for end users" I want to
ask this question "Who are the end users of php-fpm and what are their
willing ?".

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to