2009/12/7 Stanislav Malyshev <[email protected]>:
> Hi!
>
>> As for #1 we are working on changing the config file syntax and the idea
>> was to make it use nginx style. I don't think it will fit in ini file format
>> as it needs arrays or some sort of n+1 group structure support/nested
>> options.
>
> Nesting can be done by name, and .ini can do arrays. See here:
> http://php.net/parse_ini_file
> and also here:
> http://framework.zend.com/manual/en/zend.config.adapters.ini.html
> for how you can do stuff with .ini's :)
>
>> IIRC array support did just get inplemented in 5.3 did it not? That -may-
>> be an option then. Then fpm could actually share php.ini itself.
Yes INI is natively handled in PHP (and adding the missing include
function is easy) and I already did it. But the syntax is not that
good for php-fpm, try to configure apache, tomcat or nginx with INI
syntax ... it's a pain in the ass as xml is. Despite all that, php-fpm
aim is to run as a standalone daemon which has never been the aim of
any sapi before (maybe I'm wrong) and therefore INI syntax has never
been used in a such context.
Here is en example of nginx syntax and then INI ... I my mind there is
no comparaison.
pid /var/run/php-fpm.pid;
error_log /var/log/php-fpm.log;
log_level notice;
emergency_restart_threshold 10;
emergency_restart_interval 1m;
process_control_timeout 5s;
daemonize no;
worker {
name default;
listen {
address tcp:127.0.0.1:9000;
backlog -1;
owner nobody;
group nogroup;
mode 0666;
}
php_define short_open_tag=On;
user nobody;
group nogroup;
static {
max_children 5;
}
dynamic {
max_children 20;
StartServers 5;
MinSpareServers 5;
MaxSpareServers 15;
}
request_terminate_timeout 0s;
request_slowlog_timeout 0s;
slowlog /var/log/php-fpm.log.slow;
rlimit_files 1024;
rlimit_core 0;
chroot /usr/local/nginx/html;
chdir /;
catch_workers_output yes;
max_requests 500;
allowed_clients 127.0.0.1;
env HOSTNAME=$HOSTNAME;
env PATH=/usr/local/bin:/usr/bin:/bin;
}
And the same with ini
pid = /var/run/php-fpm.pid
error_log = /var/log/php-fpm.log
log_level = notice
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 5s
daemonize = no
worker.name= default;
worker.listen.address = tcp:127.0.0.1:9000
worker.listen.backlog = -1
worker.listen.owner = nobody
worker.listen.group = nogroup
worker.listen.mode = 0666
worker.php_defineshort_open_tag = On
worker.user = nobody
worker.group = nogroup
worker.static.max_children = 5
worker.dynamic.max_children = 20
worker.dynamic.start_servers = 5
worker.dynamic.min_spare_servers = 5
worker.dynamic.max_spare_servers = 15
worker.request_terminate_timeout = 0s
worker.request_slowlog_timeout = 0s
worker.slowlog = /var/log/php-fpm.log.slow
worker.rlimit_files = 1024
worker.rlimit_core = 0
worker.chroot = /usr/local/nginx/html
worker.chdir = /
worker.catch_workers_output = yes
worker.max_requests = 5000
worker.allowed_clients = 127.0.0.1
worker.env.HOSTNAME = $HOSTNAME
worker.env.PATH = /usr/local/bin:/usr/bin:/bin
>
> [] was working in 5.2 too. 5.3 can do indexes.
> --
> Stanislav Malyshev, Zend Software Architect
> [email protected] http://www.zend.com/
> (408)253-8829 MSN: [email protected]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php