#43915 [Asn]: INI parser no longer allows hyphens in directive names

From: Date: Wed, 23 Jan 2008 13:36:09 +0000
Subject: #43915 [Asn]: INI parser no longer allows hyphens in directive names
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121484@lists.php.net to get a copy of this message
ID: 43915 Updated by: sfox@php.net Reported By: sfox@php.net Status: Assigned Bug Type: Scripting Engine problem Operating System: irrelevant PHP Version: 5.3CVS-2008-01-23 (CVS) Assigned To: jani New Comment: I thought INI directive names were tied up with the module initialization in TSRM/Zend, but discovered otherwise in the wee sma' hours of this morning. It's possible to change the name just by altering the entries on the .c page (in the declaration and everywhere that mentions them), and they'll still format as normal with ini_get_all()/phpinfo(). It's still a bug, as in 'an undocumented change in behaviour'; if it's fixable I'm sure Andrei will be all sweetness and light. But if it isn't, the dot may be a good alternative for us - and a nicer error message a good alternative for everyone else out there. FWIW I know the hyphen was pushing at boundaries. I can't actually remember how we got around the problem of the module name, it was so long ago... and the module API's changed since then. Previous Comments: ------------------------------------------------------------------------ [2008-01-23 11:13:29] jani@php.net Assigning to myself, gotta check out later. The directive follow the rule of PHP variable names: hyphen (-) is illegal in those too. But then again, dot (.) is allowed in INI directive names. :D ------------------------------------------------------------------------ [2008-01-23 02:59:17] sfox@php.net Description: ------------ Trying to load PHP-GTK extensions led to the discovery that we now get a parser error (under doze, this is in the form of a message box). I tried with a 5.3-dev from December and got a different message saying that the hyphen is illegal syntax. The INI directive, being for PHP-GTK, has a hyphen as part of its extension prefix. All works fine with current CVS for 5_2 branch. Reproduce code: --------------- extension=php_gtk2.dll php-gtk.codepage=CP1250 php-gtk.extensions=php_gtk_libglade2.dll Expected result: ---------------- Codepage used by PHP-GTK to change to CP1250, and the PHP-GTK extension libglade to load. Actual result: -------------- (in a message box) PHP Error parse error in C:\sandbox\testarea\php.ini on line 10 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43915&edit=1

« previous php.bugs (#121484) next »