Re: Fw: [PHP-GTK-DEV] Re: INI problem
| From: | Steph Fox | Date: | Thu, 24 Jan 2008 14:39:01 +0000 |
| Subject: | Re: Fw: [PHP-GTK-DEV] Re: INI problem | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-4104@lists.php.net to get a copy of this message | ||
OK, I got five minutes now. (Greg broke phar.)
- Steph
----- Original Message ----- From: "Jani Taskinen" <jani.taskinen@sci.fi>
To: "Steph Fox" <steph@zend.com>
Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
Sent: Thursday, January 24, 2008 12:10 PM
Subject: Re: Fw: [PHP-GTK-DEV] Re: INI problem
Why do you change those ext/date/ directives??? And it doesn't matter if a directive is registered or not. It's perfectly valid to set any own values in php.ini. If you look at the existing tests, you'll see what I mean. :D For example: ext/standard/tests/general_functions/parse_ini_basic.data --Jani On Thu, 2008-01-24 at 12:04 +0000, Steph Fox wrote:Hi Jani, OK, those GC/build fixes are in CVS now (Dmitry/Stas awake). Your fix + test with ext/date attached, should apply to 5_3 locally without pain. I don't think there's any way to write a phpt test for this one though, since there are no hyphens in the core INI directives. - Steph ----- Original Message ----- From: "Steph Fox" <steph@zend.com> To: <jani.taskinen@iki.fi> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net> Sent: Wednesday, January 23, 2008 7:21 PM Subject: Re: [PHP-GTK-DEV] Re: INI problemYep, that works. Attached is a patch containing your fix + a test with ext/date INI directives, please don't go committing that wholesale ;) I just built it and ran ini_get_all('date'); There are also a couple of trivial ZE fixes in the patch that may or may not have been sorted by the time you get a chance to look at this. Dmitry aware. - Steph ----- Original Message ----- From: "Jani Taskinen" <jani.taskinen@sci.fi> To: "Steph Fox" <steph@zend.com> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net> Sent: Wednesday, January 23, 2008 11:17 AM Subject: [PHP-GTK-DEV] Re: INI problem-- Patches/Donations: http://pecl.php.net/~jani/I look into this once I get some free time. I'm quite busy at work right now. It's simple though, you just need to allow the name have hyphen in it. Propably just changing this line in zend_ini_scanner.l: LABEL [a-zA-Z0-9][a-zA-Z0-9._]* to LABEL [a-zA-Z0-9][a-zA-Z0-9._-]* No time to test right now. :) --Jani On Tue, 2008-01-22 at 22:44 +0000, Steph Fox wrote:Hi all, I went to fix the shared build issue on *nix and discovered we can't load PHP-GTK extensions in 5.3.0 even under Windows. Hyphens are illegal syntax in INI directives now. (I know this because an old 5.3-dev told me so - the current message is rather less helpful, it just says 'parse error'.) Renaming our INI directives to use underscores doesn't work because the prefix needs to match the extension name... Jani, can you assist? Thanks, - Steph-- Patches/Donations: http://pecl.php.net/~jani/ -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Index: Zend/zend_ini_scanner.l =================================================================== RCS file: /repository/ZendEngine2/zend_ini_scanner.l,v retrieving revision 1.41.2.2.2.2.2.1 diff -u -r1.41.2.2.2.2.2.1 zend_ini_scanner.l --- Zend/zend_ini_scanner.l 28 Sep 2007 02:05:08 -0000 1.41.2.2.2.2.2.1 +++ Zend/zend_ini_scanner.l 23 Jan 2008 18:10:18 -0000 @@ -277,7 +277,7 @@ NEWLINE ("\r"|"\n"|"\r\n") TABS_AND_SPACES [ \t] CONSTANT [a-zA-Z][a-zA-Z0-9_]* -LABEL [a-zA-Z0-9][a-zA-Z0-9._]* +LABEL [a-zA-Z0-9][a-zA-Z0-9._-]* TOKENS [:,.\[\]"'()|^&+-/*=%$!~<>?@] OPERATORS [&|~()!] Index: ext/standard/tests/general_functions/parse_ini_basic.data =================================================================== RCS file: /repository/php-src/ext/standard/tests/general_functions/parse_ini_basic.data,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 parse_ini_basic.data --- ext/standard/tests/general_functions/parse_ini_basic.data 28 Sep 2007 02:05:09 -0000 1.1.2.2 +++ ext/standard/tests/general_functions/parse_ini_basic.data 24 Jan 2008 14:32:17 -0000 @@ -2,6 +2,7 @@ basicval = bar longval = 12345 with.dot = fooobar +with-hyphen = barrfoo boolon = on booltrue = true boolyes = yes @@ -18,6 +19,7 @@ basicval = bar longval = 12345 with.dot = fooobar +with-hyphen = barrfoo boolon = on booltrue = true boolyes = yes Index: ext/standard/tests/general_functions/parse_ini_basic.phpt =================================================================== RCS file: /repository/php-src/ext/standard/tests/general_functions/parse_ini_basic.phpt,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 parse_ini_basic.phpt --- ext/standard/tests/general_functions/parse_ini_basic.phpt 28 Sep 2007 02:05:09 -0000 1.1.2.2 +++ ext/standard/tests/general_functions/parse_ini_basic.phpt 24 Jan 2008 14:33:33 -0000 @@ -15,13 +15,15 @@ --EXPECTF-- array(22) { ["basic"]=> - array(14) { + array(15) { ["basicval"]=> string(3) "bar" ["longval"]=> string(5) "12345" ["with.dot"]=> string(7) "fooobar" + ["with-hyphen"]=> + string(7) "barrfoo" ["boolon"]=> string(1) "1" ["booltrue"]=> @@ -46,13 +48,15 @@ string(4) "6143" } ["basic with whitespace"]=> - array(13) { + array(14) { ["basicval"]=> string(3) "bar" ["longval"]=> string(5) "12345" ["with.dot"]=> string(7) "fooobar" + ["with-hyphen"]=> + string(7) "barrfoo" ["boolon"]=> string(1) "1" ["booltrue"]=>