Bug #73099 [NEW]: if php.ini is incorrect, php-fpm starts with default values

From: Date: Fri, 16 Sep 2016 10:58:30 +0000
Subject: Bug #73099 [NEW]: if php.ini is incorrect, php-fpm starts with default values
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204074@lists.php.net to get a copy of this message
From: selivan5 at yandex dot ru Operating system: Ubuntu 14.04 trusty PHP version: 7.0.11 Package: *Configuration Issues Bug Type: Bug Bug description:if php.ini is incorrect, php-fpm starts with default values Description: ------------ If php.ini syntax is incorrect and it can not be loaded, php-fpm starts with default values. This can lead to functional and security problems. For example, "post_max_size" becomes 8m, breaking uploading of large files. "disable_functions", used to restrict potentially dangerous functions, becomes empty. "display_errors" is 1 and visitors will see a full stacktrace on error pages. Test script: --------------- php-fpm.conf: [global] pid = /run/php/php7.0-fpm.pid error_log = /var/log/php7.0-fpm.log include=/etc/php/7.0/fpm/pool.d/*.conf pool.d/www.conf: [www] php_admin_value[error_reporting] = E_ALL & ~E_NOTICE user = www-data group = www-data listen = /run/php/php7.0-fpm.sock listen.owner = www-data listen.group = www-data listen.mode = 0660 php.ini: # This comment breaks ini file (it starts with hash and parenthsis are used) expose_php = Off Now start it: root@xenial:~# /usr/sbin/php-fpm7.0 --fpm-config /etc/php/7.0/fpm/php-fpm.conf --php-ini /etc/php/7.0/fpm/php.ini PHP: syntax error, unexpected '(' in /etc/php/7.0/fpm/php.ini on line 6 [14-Sep-2016 14:24:46] NOTICE: configuration file /etc/php/7.0/fpm/php-fpm.conf test is successful It noticed an error, but started anyway. Run phpinfo() - you will see, that expose_php is "ON" Expected result: ---------------- If php.ini is incorrect, php-fpm should fail with error. Actual result: -------------- If php.ini is incorrect, php-fpm starts using default values. -- Edit bug report at https://bugs.php.net/bug.php?id=73099&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73099&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73099&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73099&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73099&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73099&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73099&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73099&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73099&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73099&r=support Expected behavior: https://bugs.php.net/fix.php?id=73099&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73099&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73099&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73099&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73099&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73099&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73099&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73099&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73099&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73099&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73099&r=mysqlcfg

« previous php.bugs (#204074) next »