我正在尝试在php-fpm中设置一个池的configuration,但是在某些时候,它只是不能启动了。
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
当试图重新启动php-fpm时失败,并显示以下消息:
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]
当我删除最后一个禁用的function( create_function )它再次开始。 我也尝试了其他函数,但是这给出了相同的错误,所以它与create_function函数无关。
目前的string大小只有1KB以上,所以看起来我已经达到了极限了。
我的假设是否正确? 有没有办法克服这个限制?
我也尝试在它下面添加另一个php_admin_value[disable_functions] (希望它会被追加),但是没有奏效(它只是使用了第一个)。
这是一个php-fpm错误。
ini读周期中有一个硬编码的1024字符行长度限制,可以在这里看到:
http://lxr.php.net/xref/PHP_5_5/sapi/fpm/fpm/fpm_conf.c#1495
所以目前,你有点不幸 – 因为读取缓冲区是sizeof(char) * (1024+1)个字节,并且寻找一个换行符作为终止符,所以没有什么可以做到的理解一个比这更长的configuration指令。
我已经报告了一个错误,并计划在未来几天内解决这个问题。
编辑:我现在创build一个修复这个错误的公关 。