Fw: [PHP-GTK-DEV] Re: INI problem
| From: | Steph Fox | Date: | Thu, 24 Jan 2008 12:04:08 +0000 |
| Subject: | Fw: [PHP-GTK-DEV] Re: INI problem | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-4101@lists.php.net to get a copy of this message | ||
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 problem
Yep, 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 problemI 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/date/php_date.c =================================================================== RCS file: /repository/php-src/ext/date/php_date.c,v retrieving revision 1.43.2.45.2.51.2.11 diff -u -r1.43.2.45.2.51.2.11 php_date.c --- ext/date/php_date.c 17 Jan 2008 20:35:01 -0000 1.43.2.45.2.51.2.11 +++ ext/date/php_date.c 23 Jan 2008 18:09:07 -0000 @@ -250,11 +250,11 @@ /* {{{ INI Settings */ PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) - PHP_INI_ENTRY("date.default_latitude", DATE_DEFAULT_LATITUDE, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("date.default_longitude", DATE_DEFAULT_LONGITUDE, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("date.sunset_zenith", DATE_SUNSET_ZENITH, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("date.sunrise_zenith", DATE_SUNRISE_ZENITH, PHP_INI_ALL, NULL) + STD_PHP_INI_ENTRY("php-date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) + PHP_INI_ENTRY("php-date.default_latitude", DATE_DEFAULT_LATITUDE, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("php-date.default_longitude", DATE_DEFAULT_LONGITUDE, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("php-date.sunset_zenith", DATE_SUNSET_ZENITH, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("php-date.sunrise_zenith", DATE_SUNRISE_ZENITH, PHP_INI_ALL, NULL) PHP_INI_END() /* }}} */ @@ -2536,14 +2536,14 @@ case 1: retformat = SUNFUNCS_RET_STRING; case 2: - latitude = INI_FLT("date.default_latitude"); + latitude = INI_FLT("php-date.default_latitude"); case 3: - longitude = INI_FLT("date.default_longitude"); + longitude = INI_FLT("php-date.default_longitude"); case 4: if (calc_sunset) { - zenith = INI_FLT("date.sunset_zenith"); + zenith = INI_FLT("php-date.sunset_zenith"); } else { - zenith = INI_FLT("date.sunrise_zenith"); + zenith = INI_FLT("php-date.sunrise_zenith"); } case 5: case 6: