| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-08-05 21:45 UTC] jani@php.net
  | 
    |||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 14:00:01 2025 UTC | 
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