php-fpm.conf suggestion

7 views
Skip to first unread message

Floren Munteanu

unread,
Dec 26, 2007, 1:29:16 AM12/26/07
to highload-php-en
Hi Andrei,

Thank you for your great work. Igor Sysoev recommended me to use your
wrapper instead of the modified spawn-fcgi I made out of lighttpd.
I patched PHP 5.2.5 with your latest patch and everything is working
great. nginx is humming nice with your software mod. :)

I have a suggestion for the configuration file. Do you think is it
possible to have it renamed to php-fpm.ini? It will match better with
the php.ini name. Also, I think that a C format like nginx.conf or
php.ini is more viable, instead of using the current XML format.

Let me know what you think.

Regards,

Floren

Andrei Nigmatulin

unread,
Dec 26, 2007, 11:26:40 AM12/26/07
to highloa...@googlegroups.com

Yes, 0.5.5 will have new configure options for this purpose:

--with-fpm-conf=/etc/php-fpm.ini
--with-fpm-log=/var/log/php-fpm.log
--with-fpm-pid=/var/run/php-fpm.pid

As for XML format that I hate personaly, please don't expect changes in the
near future. I'm looking for some kind of flexible config library to embedd
it into fpm but no luck.


--
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

Antony Dovgal

unread,
Dec 27, 2007, 3:56:11 AM12/27/07
to highloa...@googlegroups.com
On 26.12.2007 19:26, Andrei Nigmatulin wrote:
> As for XML format that I hate personaly, please don't expect changes in the
> near future. I'm looking for some kind of flexible config library to embedd
> it into fpm but no luck.

Since you're using/patching PHP, it would make sense to use PHP routines and php.ini-style configs.
See parse_ini_file() function in ext/standard/basic_functions.c

--
Wbr,
Antony Dovgal

Andrei Nigmatulin

unread,
Dec 27, 2007, 7:40:36 AM12/27/07
to highloa...@googlegroups.com

Is there a painless way to store structures and arrays in php-ini style file ?
In particular, I would like to see structure (global section of config) with
array (workers pools) of structures (particular workers pool config) with two
arrays (environment and php.ini key->value pairs) inside.

Antony Dovgal

unread,
Dec 27, 2007, 8:19:04 AM12/27/07
to highloa...@googlegroups.com
On 27.12.2007 15:40, Andrei Nigmatulin wrote:
> On Thursday 27 December 2007 11:56, Antony Dovgal wrote:
>> On 26.12.2007 19:26, Andrei Nigmatulin wrote:
>> > As for XML format that I hate personaly, please don't expect changes in
>> > the near future. I'm looking for some kind of flexible config library to
>> > embedd it into fpm but no luck.
>>
>> Since you're using/patching PHP, it would make sense to use PHP routines
>> and php.ini-style configs. See parse_ini_file() function in
>> ext/standard/basic_functions.c
>
> Is there a painless way to store structures and arrays in php-ini style file ?
> In particular, I would like to see structure (global section of config) with
> array (workers pools) of structures (particular workers pool config) with two
> arrays (environment and php.ini key->value pairs) inside.

Try & see?

--
Wbr,
Antony Dovgal

Floren Munteanu

unread,
Dec 27, 2007, 9:45:39 PM12/27/07
to highload-php-en
Anthony, could you be king and look into this also?
I'm not as experienced as you guys with C language.

fixxxer

unread,
Dec 30, 2007, 2:50:47 PM12/30/07
to highload-php-en
On 27 дек, 15:40, Andrei Nigmatulin <andrei.nigmatu...@gmail.com>
wrote:
> Is there a painless way to store structures and arrays in php-ini style file ?
> In particular, I would like to see structure (global section of config) with
> array (workers pools) of structures (particular workers pool config) with two
> arrays (environment and php.ini key->value pairs) inside.

i've looked into zend ini parser; it seems to be the easiest way to
use the "[foo/bar]" syntax, like iniparser library (http://
ndevilla.free.fr/iniparser/html/index.html) does, and parse it into
hierarchy by making an additional pass after calling parse_ini_file.
patching zend_ini_parser does not seem to be a good idea 'cause it's
based on gnu bison code which is not human-readable :)

Andrei Nigmatulin

unread,
Jan 19, 2008, 3:29:44 PM1/19/08
to highloa...@googlegroups.com
On Thursday 27 December 2007 11:56, Antony Dovgal wrote:

If I would look for another format for php-fpm configuration file I would
rather choose some nice c-style syntax, like nginx.conf does have.

Reply all
Reply to author
Forward
0 new messages