|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2009-09-25 22:39 UTC] crrodriguez at opensuse dot org
 Description:
------------
The ini parser crashes with when a directive like
zend_extension = ${extension_dir}"/xcache.so"
is found in the configuration file, this has worked in all versions since 5.1 but fails now.
Reproduce code:
---------------
zend_extension = ${extension_dir}"/foo.so" in php.ini
This only crashes at startup in apache 2
Expected result:
----------------
No crash
Actual result:
--------------
gdb) bt
#0  0x00007ffff2c555e0 in php_apache_sapi_getenv (name=0x7ffff83777f0 "extension_dir", name_len=<value optimized out>)
    at /usr/src/debug/php-5.3.1+svn20090925/sapi/apache2handler/sapi_apache2.c:242
#1  0x00007ffff2b7f25a in sapi_getenv (name=0x7ffff83777f0 "extension_dir", name_len=140737357772784)
    at /usr/src/debug/php-5.3.1+svn20090925/main/SAPI.c:938
#2  0x00007ffff2ba5f9b in ini_parse () at /usr/src/debug/php-5.3.1+svn20090925/Zend/zend_ini_parser.y:148
#3  0x00007ffff2ba62f8 in zend_parse_ini_file (fh=0x7fffffffcec0, unbuffered_errors=1 '\001', scanner_mode=<value optimized out>,
    ini_parser_cb=<value optimized out>, arg=<value optimized out>) at /usr/src/debug/php-5.3.1+svn20090925/Zend/zend_ini_parser.y:206
#4  0x00007ffff2b7e722 in php_init_config () at /usr/src/debug/php-5.3.1+svn20090925/main/php_ini.c:650
#5  0x00007ffff2b76ac5 in php_module_startup (sf=<value optimized out>, additional_modules=0x7ffff2f00dc0, num_additional_modules=1)
    at /usr/src/debug/php-5.3.1+svn20090925/main/main.c:1926
#6  0x00007ffff2c559a5 in php_apache2_startup (sapi_module=0x7ffff83777f0) at /usr/src/debug/php-5.3.1+svn20090925/sapi/apache2handler/sapi_apache2.c:328
#7  0x00007ffff2c564e0 in php_apache_server_startup (pconf=0x7ffff820e138, plog=<value optimized out>, ptemp=<value optimized out>, s=0x7ffff8213850)
    at /usr/src/debug/php-5.3.1+svn20090925/sapi/apache2handler/sapi_apache2.c:437
#8  0x00007ffff7fd9bf4 in ap_run_post_config () from /usr/sbin/httpd2-prefork
#9  0x00007ffff7fc5bbf in main () from /usr/sbin/httpd2-prefork
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
I would guess it crashes with any option name and value when the ini setting is not set. f.e. foobar = ${thisdoesnotexist} should also crash..?and yes, foobar = ${thisdoesnotexist} crashes. note that in previous versions ${extension_dir} expanded correctly.