Le 9 décembre 2009 19:17, Michael Shadle <mike...@gmail.com> a écrit : > 2009/12/9 Zeev Suraski <z...@zend.com>: > >> We should be using INI unless there are compelling reasons against it, now >> that this project becomes a part of the PHP source tree. As far as I can >> tell there are no such compelling reasons and it can actually map quite >> nicely into INI, hence, that's what we should use. > > +1 > > multiple syntaxes is not a good idea (sorry Jerome :))
Don't worry for me it was just a proposal :) > > it maps to existing PHP configuration syntax and if this is to be in > core, that makes sense. > > I would just like to see how the ini file syntax ideas come out > though. Sounds like there's options. > OK so it seams to become clear. So INI it will be (even if I don't like it but it's logic so I'm fine with it). Now let's talk about detail of INI. The specs are: 1- there is a set of key/value pairs 2- each key/value pair is present in a path of sections (from no section (global parameters) to N sections (specific parameters like worker pool) What do you think of the following implemenation: - sections and subsections are separated with a single character dot or slash. - sections can be start with brackets ([worker] [worker.listen]) - section can be ended with a special bracket section : empty one [] (if it's authorized by the php ini parser) or something else like [end_section] - key/value pair respect the INI syntax of course (key = value) which will looks like something like: ;global options daemonize = yes error_log = /var/log/php-fpm.log ;pool 1 [worker] ; start section name = pool1 chroot = /var/www/docs/pool1 [worker.listen] address = 127.0.0.1:9000 owner = www [end_section] ; end section so move back to [worker] user = www; group = www; [worker.env] ; start subsection hostname = $hostname [worker.defines] ; start a subsection at the same level as the previous one, so it ends the previous one implicitely error_log = /var/www/logs/pool1/php.log ;pool 2 [worker] ; new section it closed all the previous ones ... name = pool2 ... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php