Edit report at http://bugs.php.net/bug.php?id=52786&edit=1
ID: 52786 Updated by: ahar...@php.net Reported by: f dot grutschus at lubyte dot de Summary: PHP should reset section to [PHP] after ini sections -Status: Assigned +Status: Closed Type: Bug Package: *Configuration Issues Operating System: Linux PHP Version: 5.3.3 Assigned To: aharvey Block user comment: N New Comment: This bug has been fixed in SVN. 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/. Thank you for the report, and for helping us make PHP better. Thank you very much for the patch -- I've applied it as is. Previous Comments: ------------------------------------------------------------------------ [2010-09-09 07:11:07] ahar...@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=303199 Log: Fix bug #52786 (PHP should reset section to [PHP] after ini sections). Patch by Fedora at famillecollet dot com. ------------------------------------------------------------------------ [2010-09-06 20:59:20] Fedora at famillecollet dot com Fedora path ref is https://bugzilla.redhat.com/630635 ------------------------------------------------------------------------ [2010-09-06 20:55:58] Fedora at famillecollet dot com The patch proposal fixes 2 issues : - reset ini hash before each file instead of before parsing file in php.d (move the call to RESET_ACTIVE_INI_HASH - reset is_special_section in RESET_ACTIVE_INI_HASH ------------------------------------------------------------------------ [2010-09-06 20:39:19] f dot grutschus at lubyte dot de Description: ------------ Many distributions use config-file-scan-dir configure option to set a custom config scan directory. When PHP ini sections are used in the main php.ini, or in an ini file at the config-file-scan-dir, the following ini files can't use extension= or zend_extenstion=. This prevents PHP modules from being loaded and breaks many distribution packages. Tested with Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595761) and Fedora (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595761). See also my comment here: http://www.php.net/manual/en/ini.sections.php#99780 Please clarify if this is a PHP bug or any following ini must use [PHP]. Test script: --------------- on Fedora: # php -m | wc -l 73 # echo "[PATH=/usr]" >/etc/php.d/test.ini # php -m | wc -l 65 Expected result: ---------------- automatic set ini section back to [PHP] after [PATH=] or [HOST=] Actual result: -------------- [PATH=] or [HOST=] prevents any following extension or zend_extension config option. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52786&edit=1