|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52786 PHP should reset section to [PHP] after ini sections
Submitted: 2010-09-06 20:39 UTC Modified: 2010-09-09 07:11 UTC
From: f dot grutschus at lubyte dot de Assigned: aharvey (profile)
Status: Closed Package: *Configuration Issues
PHP Version: 5.3.3 OS: Linux
Private report: No CVE-ID: None
 [2010-09-06 20:39 UTC] f dot grutschus at lubyte dot de
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 ( and Fedora (

See also my comment here:

Please clarify if this is a PHP bug or any following ini must use [PHP].

Test script:
on Fedora:
# php -m | wc -l 
# echo "[PATH=/usr]" >/etc/php.d/test.ini
# php -m | wc -l

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. 


php-5.3.4-ini.patch (last revision 2010-09-06 18:54 UTC by fedora at famillecollet dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-06 20:55 UTC] 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:59 UTC] Fedora at famillecollet dot com
Fedora path ref is
 [2010-09-09 06:45 UTC]
-Status: Open +Status: Assigned -Package: Dynamic loading +Package: *Configuration Issues -Assigned To: +Assigned To: aharvey
 [2010-09-09 07:11 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Fix bug #52786 (PHP should reset section to [PHP] after ini sections). Patch by
Fedora at famillecollet dot com.
 [2010-09-09 07:11 UTC]
-Status: Assigned +Status: Closed
 [2010-09-09 07:11 UTC]
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
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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Feb 24 10:01:27 2024 UTC