Is there a limit setting a php_admin_value in php-fpm?

Posted by PeeHaa on Server Fault See other posts from Server Fault or by PeeHaa
Published on 2013-10-20T20:45:30Z Indexed on 2013/10/20 21:56 UTC
Read the original article Hit count: 248

Filed under:
|

I am trying to set a large value in the configuration of a pool in php-fpm, but at some point it just doesn't start anymore.

php_admin_value[disable_functions] = dl,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,pcntl_exec,include,include_once,require,require_once,posix_mkfifo,posix_getlogin,posix_ttyname,getenv,get_current_use,proc_get_status,get_cfg_va,disk_free_space,disk_total_space,diskfreespace,getcwd,getlastmo,getmygid,getmyinode,getmypid,getmyuid,ini_set,mail,proc_nice,proc_terminate,proc_close,pfsockopen,fsockopen,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,fopen,tmpfile,bzopen,gzopen,chgrp,chmod,chown,copy,file_put_contents,lchgrp,lchown,link,mkdi,move_uploaded_file,rename,rmdi,symlink,tempnam,touch,unlink,iptcembed,ftp_get,ftp_nb_get,file_exists,file_get_contents,file,fileatime,filectime,filegroup,fileinode,filemtime,fileowne,fileperms,filesize,filetype,glob,is_di,is_executable,is_file,is_link,is_readable,is_uploaded_file,is_writable,is_writeable,linkinfo,lstat,parse_ini_file,pathinfo,readfile,readlink,realpath,stat,gzfile,create_function

When trying to restart php-fpm it fails with the following message:

Stopping php-fpm:                                          [  OK  ]
Starting php-fpm: [20-Oct-2013 22:31:52] ERROR: [/etc/php-fpm.d/codepad.conf:235] value is NULL for a ZEND_INI_PARSER_ENTRY
[20-Oct-2013 22:31:52] ERROR: Unable to include /etc/php-fpm.d/codepad.conf from /etc/php-fpm.conf at line 235
[20-Oct-2013 22:31:52] ERROR: failed to load configuration file '/etc/php-fpm.conf'
[20-Oct-2013 22:31:52] ERROR: FPM initialization failed
                                                           [FAILED]

When I remove the last disabled function (create_function) it start again. I also tried with other functions, but this gives the same error so it's not related to the create_function function.

The string currently is just over 1KB in size so it looks like I have hit a limit here?

Is my assumption correct? Is there a way to overcome this limit?

I also tried to add another php_admin_value[disable_functions] underneath it (hoping it would be appended), but that didn't work (it just used the first one).

© Server Fault or respective owner

Related posts about configuration

Related posts about php-fpm