php.net |  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
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. 

Patches

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

Pull Requests

History

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 https://bugzilla.redhat.com/630635
 [2010-09-09 06:45 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Package: Dynamic loading +Package: *Configuration Issues -Assigned To: +Assigned To: aharvey
 [2010-09-09 07:11 UTC] aharvey@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-09 07:11 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2010-09-09 07:11 UTC] aharvey@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 02:01:27 2024 UTC