From: mightymorse at gmail dot com Operating system: Mac OS 10.5.5 PHP version: 5.3.0 PHP Bug Type: Unknown/Other Function Bug description: parse_ini_file does not like colon (:) in key
Description: ------------ In PHP version 5.2.x, INI file keys could include colons (":"). With PHP 5.3, using a colon in an INI file key causes parse_ini_file syntax error. ===PHP configure line=== './configure' '--disable-dependency-tracking' '--prefix=/usr/local/php5' '--with-apxs2=/usr/sbin/apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-openssl=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-gd' '--with-ldap' '--with-xmlrpc' '--enable-exif' '--enable-soap' '--enable-sqlite-utf8' '--enable-wddx' '--enable-ftp' '--enable-sockets' '--with-bz2=/usr' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-memory-limit' '--enable-mbstring' '--enable-bcmath' '--enable-calendar' '--with-iodbc' '--with-mhash' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv=/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--enable-memcache' '--with-imap=../imap-2007e' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-gettext=/usr/local/php5' '--with-curl=shared,/usr/local/php5' '--with-png-dir=/usr/local/php5' '--with-jpeg-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5' ===PHP ini file=== Production ini, except for display_errors=on and short_open_tag=on Reproduce code: --------------- ---Contents of conf.ini--- a:b=c ---Contents of test.php--- <?php $res = parse_ini_file('conf.ini', true); echo $res['a:b']; Expected result: ---------------- c Actual result: -------------- Warning: syntax error, unexpected ':' in conf.ini on line 1 in /Library/WebServer/Documents/test_ini/test.php on line 2 -- Edit bug report at http://bugs.php.net/?id=49172&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49172&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49172&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49172&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49172&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49172&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49172&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49172&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49172&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49172&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49172&r=support Expected behavior: http://bugs.php.net/fix.php?id=49172&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49172&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49172&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49172&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49172&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49172&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49172&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49172&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49172&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49172&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49172&r=mysqlcfg