php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65933 Cannot specify config lines longer than 1024 bytes
Submitted: 2013-10-20 21:56 UTC Modified: 2014-08-19 23:41 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: daverandom@php.net Assigned: daverandom
Status: Closed Package: FPM related
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID:
 [2013-10-20 21:56 UTC] daverandom@php.net
Description:
------------
Configuration lines cannot be longer than 1024 bytes because the file read buffer is hard-set to this size.

http://lxr.php.net/xref/PHP_5_5/sapi/fpm/fpm/fpm_conf.c#1468

Ref of this problem in the real world:

http://serverfault.com/questions/547394/is-there-a-limit-setting-a-php-admin-value-in-php-fpm

Test script:
---------------
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,phpinfo

Expected result:
----------------
php-fpm will start successfully

Actual result:
--------------
[20-Oct-2013 22:31:52] ERROR: [/file.conf:line] value is NULL for a ZEND_INI_PARSER_ENTRY
[20-Oct-2013 22:31:52] ERROR: failed to load configuration file '/file.conf'
[20-Oct-2013 22:31:52] ERROR: FPM initialization failed

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-21 11:16 UTC] daverandom@php.net
-Assigned To: +Assigned To: daverandom
 [2014-08-19 23:41 UTC] ajf@php.net
-Status: Assigned +Status: Closed
 [2014-08-19 23:41 UTC] ajf@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed: https://github.com/php/php-src/commit/376e545b01c2ec1ed9a5b184a18d8014caabc32e
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Jul 25 22:01:35 2017 UTC