From: Operating system: * PHP version: 5.3.2 Package: FPM related Bug Type: Bug Bug description:No new line at the end of a included pool file crahes the PHP FPM daemon
Description: ------------ I have a script that automatically generates pool configurations based on input parameters and a template configuration. It didn't used to place a new line at the end of the generated configuration file which degenerated into a hard to debug error as the daemon crashes without any useful explanation. By adding a new line after the last configuration line (in my example, php_admin_value[upload_tmp_dir] = /home/example.com/tmp) everything works as expected. Test script: --------------- [example.com] user = example.com group = example.com listen = /var/run/php-fpm/example.com.sock pm = static pm.max_children = 2 pm.max_requests = 10000 slowlog = /home/example.com/logs/fpm/slow.log chdir = /home/example.com/docroot php_admin_value[error_log] = /home/example.com/logs/fpm/error.log php_admin_value[open_basedir] = /home/example.com/docroot:/home/example.com/sessions:/home/example.com/tmp php_admin_value[session.save_path] = /home/example.com/sessions php_admin_value[upload_tmp_dir] = /home/example.com/tmp Expected result: ---------------- Successful PHP FPM daemon start. Actual result: -------------- Starting php-fpm PHP: syntax error, unexpected $end in Unknown on line 1 Jun 15 12:35:12.090707 [ERROR] Unable to include /usr/local/zend/etc/fpm.d/example.com.ini from /usr/local/zend/etc/php-fpm.conf at line 23 *** glibc detected *** /usr/local/zend/sbin/php-fpm: double free or corruption (fasttop): 0x000000001ac80380 *** + backtrace + memory map -- Edit bug report at http://bugs.php.net/bug.php?id=52086&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52086&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52086&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52086&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52086&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52086&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52086&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52086&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52086&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52086&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52086&r=support Expected behavior: http://bugs.php.net/fix.php?id=52086&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52086&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52086&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52086&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52086&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52086&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52086&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52086&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52086&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52086&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52086&r=mysqlcfg