[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug55509.phpt branches/PHP_5_3/Zend/zend_alloc.c branches/PHP_5_4/Zend/tests/bug55509.phpt branches/PHP_5_4/Zend/zend_all

2011-09-13 Thread Dmitry Stogov
dmitry   Tue, 13 Sep 2011 07:01:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316590

Log:
Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence)

Bug: https://bugs.php.net/55509 (Verified) segfault on x86_64 using more than 
2G memory
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
A   php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
A   php/php-src/trunk/Zend/tests/bug55509.phpt
U   php/php-src/trunk/Zend/zend_alloc.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 06:22:25 UTC (rev 316589)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:01:46 UTC (rev 316590)
@@ -8,6 +8,7 @@
   . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad)
   . Fixed bug #55510: $_FILES 'name' missing first character after upload.
 (Arpad)
+  . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence)
   . Fixed bug #55576: Cannot conditionally move uploaded file without race
 condition. (Gustavo)
   . Fixed bug #55504 (Content-Type header is not parsed correctly on

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt   2011-09-13 
07:01:46 UTC (rev 316590)
@@ -0,0 +1,33 @@
+--TEST--
+Bug #55509 (segfault on x86_64 using more than 2G memory)
+--SKIPIF--
+?php
+if (PHP_INT_SIZE == 4) {
+  die('skip Not for 32-bits OS');
+}
+?
+--INI--
+memory_limit=3G
+--FILE--
+?php
+$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
+echo 1\n;
+$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
+echo 2\n;
+$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
+echo 3\n;
+$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
+echo 4\n;
+$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5);
+echo 5\n;
+$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5);
+echo 6\n;
+?
+--EXPECTF--
+1
+2
+3
+4
+5
+
+Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d 
bytes) in %s/bug55509.php on line %d

Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2011-09-13 06:22:25 UTC 
(rev 316589)
+++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2011-09-13 07:01:46 UTC 
(rev 316590)
@@ -510,7 +510,7 @@
 #define ZEND_MM_IS_GUARD_BLOCK(b)  (((b)-info._size  
ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)

 #define ZEND_MM_NEXT_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
ZEND_MM_BLOCK_SIZE(b))
-#define ZEND_MM_PREV_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
-(int)((b)-info._prev  ~ZEND_MM_TYPE_MASK))
+#define ZEND_MM_PREV_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
-(ssize_t)((b)-info._prev  ~ZEND_MM_TYPE_MASK))

 #define ZEND_MM_PREV_BLOCK_IS_FREE(b)  (!((b)-info._prev  
ZEND_MM_USED_BLOCK))


Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
===
--- php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt   2011-09-13 
07:01:46 UTC (rev 316590)
@@ -0,0 +1,33 @@
+--TEST--
+Bug #55509 (segfault on x86_64 using more than 2G memory)
+--SKIPIF--
+?php
+if (PHP_INT_SIZE == 4) {
+  die('skip Not for 32-bits OS');
+}
+?
+--INI--
+memory_limit=3G
+--FILE--
+?php
+$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
+echo 1\n;
+$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
+echo 2\n;
+$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
+echo 3\n;
+$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
+echo 4\n;
+$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5);
+echo 5\n;
+$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5);
+echo 6\n;
+?
+--EXPECTF--
+1
+2
+3
+4
+5
+
+Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d 
bytes) in %s/bug55509.php on line %d

Modified: php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_alloc.c  2011-09-13 06:22:25 UTC 
(rev 316589)
+++ php/php-src/branches/PHP_5_4/Zend/zend_alloc.c  2011-09-13 07:01:46 UTC 
(rev 316590)
@@ -515,7 +515,7 @@
 #define ZEND_MM_IS_GUARD_BLOCK(b)  (((b)-info._size  
ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)

 #define ZEND_MM_NEXT_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
ZEND_MM_BLOCK_SIZE(b))
-#define ZEND_MM_PREV_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
-(int)((b)-info._prev  ~ZEND_MM_TYPE_MASK))

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/zend_strtod.c branches/PHP_5_4/Zend/zend_strtod.c trunk/Zend/zend_strtod.c

2011-09-13 Thread Dmitry Stogov
dmitry   Tue, 13 Sep 2011 07:07:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316591

Log:
Fixed Bug #55649 (Undefined function Bug()). (Laruence)

Bug: https://bugs.php.net/55649 (Assigned) Undefined function Bug()
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_strtod.c
U   php/php-src/branches/PHP_5_4/Zend/zend_strtod.c
U   php/php-src/trunk/Zend/zend_strtod.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:01:46 UTC (rev 316590)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:07:06 UTC (rev 316591)
@@ -3,6 +3,7 @@
 ?? ??? 2011, PHP 5.3.9

 - Core:
+  . Fixed Bug #55649 (Undefined function Bug()). (Laruence)
   . Fixed bug #52461 (Incomplete doctype and missing xmlns).
 (virsacer at web dot de, Pierre)
   . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad)

Modified: php/php-src/branches/PHP_5_3/Zend/zend_strtod.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_strtod.c 2011-09-13 07:01:46 UTC 
(rev 316590)
+++ php/php-src/branches/PHP_5_3/Zend/zend_strtod.c 2011-09-13 07:07:06 UTC 
(rev 316591)
@@ -445,6 +445,12 @@

 #endif /* ZTS */

+#ifdef DEBUG
+static void Bug(const char *message) {
+   fprintf(stderr, %s\n, message);
+}
+#endif
+
 ZEND_API int zend_startup_strtod(void) /* {{{ */
 {
 #ifdef ZTS

Modified: php/php-src/branches/PHP_5_4/Zend/zend_strtod.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_strtod.c 2011-09-13 07:01:46 UTC 
(rev 316590)
+++ php/php-src/branches/PHP_5_4/Zend/zend_strtod.c 2011-09-13 07:07:06 UTC 
(rev 316591)
@@ -445,6 +445,12 @@

 #endif /* ZTS */

+#ifdef DEBUG
+static void Bug(const char *message) {
+   fprintf(stderr, %s\n, message);
+}
+#endif
+
 ZEND_API int zend_startup_strtod(void) /* {{{ */
 {
 #ifdef ZTS

Modified: php/php-src/trunk/Zend/zend_strtod.c
===
--- php/php-src/trunk/Zend/zend_strtod.c2011-09-13 07:01:46 UTC (rev 
316590)
+++ php/php-src/trunk/Zend/zend_strtod.c2011-09-13 07:07:06 UTC (rev 
316591)
@@ -445,6 +445,12 @@

 #endif /* ZTS */

+#ifdef DEBUG
+static void Bug(const char *message) {
+   fprintf(stderr, %s\n, message);
+}
+#endif
+
 ZEND_API int zend_startup_strtod(void) /* {{{ */
 {
 #ifdef ZTS

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2011-09-13 Thread Dmitry Stogov
dmitry   Tue, 13 Sep 2011 07:08:36 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316592

Log:
sort changelog according to bug number

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:07:06 UTC (rev 316591)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:08:36 UTC (rev 316592)
@@ -4,18 +4,18 @@

 - Core:
   . Fixed Bug #55649 (Undefined function Bug()). (Laruence)
-  . Fixed bug #52461 (Incomplete doctype and missing xmlns).
-(virsacer at web dot de, Pierre)
+  . Fixed bug #55576: Cannot conditionally move uploaded file without race
+condition. (Gustavo)
   . Fixed bug #55366: keys lost when using substr_replace an array. (Arpad)
+  . Fixed bug #55273 (base64_decode() with strict rejects whitespace after
+pad). (Ilia)
   . Fixed bug #55510: $_FILES 'name' missing first character after upload.
 (Arpad)
   . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence)
-  . Fixed bug #55576: Cannot conditionally move uploaded file without race
-condition. (Gustavo)
   . Fixed bug #55504 (Content-Type header is not parsed correctly on
 HTTP POST request). (Hannes)
-  . Fixed bug #55273 (base64_decode() with strict rejects whitespace after
-pad). (Ilia)
+  . Fixed bug #52461 (Incomplete doctype and missing xmlns).
+(virsacer at web dot de, Pierre)

 - Curl:
   . Fixed bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/UPGRADING branches/PHP_5_4/main/main.c trunk/main/main.c

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 10:38:12 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316594

Log:
- do not display the crt warnings anymore by default. It is enough to simply 
fail from a user land pov as it is the case on posix platforms

Changed paths:
U   php/php-src/branches/PHP_5_4/UPGRADING
U   php/php-src/branches/PHP_5_4/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 07:32:02 UTC (rev 
316593)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 10:38:12 UTC (rev 
316594)
@@ -363,6 +363,9 @@
   three times.
 - Changed E_ALL to include E_STRICT. Recommended production value changed to
   E_ALL  ~E_DEPRECATED  ~E_STRICT.
+- a new directive, called windows_show_crt_warning, has been introduced.
+  This directive shows the CRT warnings when enabled. These warnings were
+  displayed by default until now. It is disabled by default.

 
 12. Syntax additions

Modified: php/php-src/branches/PHP_5_4/main/main.c
===
--- php/php-src/branches/PHP_5_4/main/main.c2011-09-13 07:32:02 UTC (rev 
316593)
+++ php/php-src/branches/PHP_5_4/main/main.c2011-09-13 10:38:12 UTC (rev 
316594)
@@ -502,6 +502,9 @@
STD_PHP_INI_ENTRY(user_ini.filename,  .user.ini,
PHP_INI_SYSTEM, OnUpdateString, user_ini_filename,  
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(user_ini.cache_ttl, 300,  
PHP_INI_SYSTEM, OnUpdateLong,   user_ini_cache_ttl, 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(exit_on_timeout,  0,
PHP_INI_ALL,OnUpdateBool,   exit_on_timeout,
php_core_globals,   core_globals)
+#ifdef PHP_WIN32
+   STD_PHP_INI_BOOLEAN(windows_show_crt_warning, 0,
PHP_INI_ALL,OnUpdateBool,   
windows_show_crt_warning,   php_core_globals,   
core_globals)
+#endif
 PHP_INI_END()
 /* }}} */

@@ -1839,18 +1842,21 @@
int len;

if (!called) {
-   called = 1;
-   if (function) {
-   if (file) {
-   len = _snprintf(buf, sizeof(buf)-1, Invalid 
parameter detected in CRT function '%ws' (%ws:%d), function, file, line);
+   TSRMLS_FETCH();
+   if(PG(windows_show_crt_warning)) {
+   called = 1;
+   if (function) {
+   if (file) {
+   len = _snprintf(buf, sizeof(buf)-1, 
Invalid parameter detected in CRT function '%ws' (%ws:%d), function, file, 
line);
+   } else {
+   len = _snprintf(buf, sizeof(buf)-1, 
Invalid parameter detected in CRT function '%ws', function);
+   }
} else {
-   len = _snprintf(buf, sizeof(buf)-1, Invalid 
parameter detected in CRT function '%ws', function);
+   len = _snprintf(buf, sizeof(buf)-1, Invalid 
CRT parameter detected (function not known));
}
-   } else {
-   len = _snprintf(buf, sizeof(buf)-1, Invalid CRT 
parameters detected);
+   zend_error(E_WARNING, %s, buf);
+   called = 0;
}
-   zend_error(E_WARNING, %s, buf);
-   called = 0;
}
 }
 #endif

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-09-13 07:32:02 UTC (rev 316593)
+++ php/php-src/trunk/main/main.c   2011-09-13 10:38:12 UTC (rev 316594)
@@ -502,6 +502,9 @@
STD_PHP_INI_ENTRY(user_ini.filename,  .user.ini,
PHP_INI_SYSTEM, OnUpdateString, user_ini_filename,  
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(user_ini.cache_ttl, 300,  
PHP_INI_SYSTEM, OnUpdateLong,   user_ini_cache_ttl, 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(exit_on_timeout,  0,
PHP_INI_ALL,OnUpdateBool,   exit_on_timeout,
php_core_globals,   core_globals)
+#ifdef PHP_WIN32
+   STD_PHP_INI_BOOLEAN(windows_show_crt_warning, 0,
PHP_INI_ALL,OnUpdateBool,   
windows_show_crt_warning,   php_core_globals,   
core_globals)
+#endif
 PHP_INI_END()
 /* }}} */

@@ -1839,18 +1842,21 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 10:39:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316595

Log:
- news for the crt warning

Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-09-13 10:38:12 UTC (rev 316594)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-09-13 10:39:59 UTC (rev 316595)
@@ -12,6 +12,8 @@
   . Added support for SORT_NATURAL and SORT_FLAG_CASE in array
 sort functions (sort, rsort, ksort, krsort, asort, arsort and
 array_multisort). FR#55158 (Arpad)
+  . Disable windows CRT warning by default, can be enabled again using the ini
+directive windows_show_crt_warnings. (Pierre)

 - Improved MySQL extensions:
   . ext/mysql, mysqli and pdo_mysql now use mysqlnd by default. (Johannes)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/bug33415-2.phpt branches/PHP_5_4/ext/date/tests/bug33415-2.phpt trunk/ext/date/tests/bug33415-2.phpt

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 12:04:57 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316609

Log:
- fix test on win, putenv is not supported for TZ and ext/date

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/tests/bug33415-2.phpt
U   php/php-src/branches/PHP_5_4/ext/date/tests/bug33415-2.phpt
U   php/php-src/trunk/ext/date/tests/bug33415-2.phpt

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug33415-2.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug33415-2.phpt	2011-09-13 11:57:56 UTC (rev 316608)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug33415-2.phpt	2011-09-13 12:04:57 UTC (rev 316609)
@@ -5,7 +5,11 @@

 print TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear to
 have a DST or timezone transition.\n;
-putenv(TZ=Africa/Bujumbura);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Africa/Bujumbura');
+} else {
+	putenv(TZ=Africa/Bujumbura);
+}
 $tStamp = mktime (17, 17, 17, 1, 1, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Wednesday, $tStamp);
@@ -13,7 +17,11 @@
 print wanted=Wednesday00:00:00\n\n;

 print TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yes\n;
-putenv(TZ=Asia/Thimbu);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Asia/Thimbu');
+} else {
+	putenv(TZ=Asia/Thimbu);
+}
 $tStamp = mktime (17, 17, 17, 1, 6476, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Thursday, $tStamp);
@@ -22,7 +30,11 @@

 print TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does not
 appear to have a DST or timezone transition.\n;
-putenv(TZ=Indian/Cocos);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Indian/Cocos');
+} else {
+	putenv(TZ=Indian/Cocos);
+}
 $tStamp = mktime (17, 17, 17, 1, 1, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Thursday, $tStamp);
@@ -31,7 +43,11 @@

 print TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: does
 not appear to have a DST or timezone transition.\n;
-putenv(TZ=Africa/Lubumbashi);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Africa/Lubumbashi');
+} else {
+	putenv(TZ=Africa/Lubumbashi);
+}
 $tStamp = mktime (17, 17, 17, 1, 1, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Saturday, $tStamp);
@@ -39,7 +55,11 @@
 print wanted=Saturday00:00:00\n\n;

 print TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes\n;
-putenv(TZ=Asia/Kashgar);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Asia/Kashgar');
+} else {
+	putenv(TZ=Asia/Kashgar);
+}
 $tStamp = mktime (17, 17, 17, 1, 3767, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Thursday, $tStamp);
@@ -48,7 +68,11 @@

 print TZ=Indian/Christmas - Is it OK for this to be 7 AM?  Note: does
 not appear to have a DST or timezone transition.\n;
-putenv(TZ=Indian/Christmas);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Indian/Christmas');
+} else {
+	putenv(TZ=Indian/Christmas);
+}
 $tStamp = mktime (17, 17, 17, 1, 1, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Sunday, $tStamp);
@@ -56,7 +80,11 @@
 print wanted=Sunday00:00:00\n\n;

 print TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yes\n;
-putenv(TZ=America/Santo_Domingo);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('America/Santo_Domingo');
+} else {
+	putenv(TZ=America/Santo_Domingo);
+}
 $tStamp = mktime (17, 17, 17, 1, 291, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Sunday, $tStamp);
@@ -65,7 +93,11 @@

 print TZ=Pacific/Truk - Is it OK for this to be 10 AM?  Note: does not
 appear to have a DST or timezone transition.\n;
-putenv(TZ=Pacific/Truk);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Pacific/Truk');
+} else {
+	putenv(TZ=Pacific/Truk);
+}
 $tStamp = mktime (17, 17, 17, 1, 1, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Tuesday, $tStamp);
@@ -74,7 +106,11 @@

 print TZ=Pacific/Ponape - Is it OK for this to be 11 AM?  Note: does
 not appear to have a DST or timezone transition.\n;
-putenv(TZ=Pacific/Ponape);
+if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+	date_default_timezone_set('Pacific/Ponape');
+} else {
+	putenv(TZ=Pacific/Ponape);
+}
 $tStamp = mktime (17, 17, 17, 1, 1, 1970);
 print tStamp=. date(l Y-m-d H:i:s T I, $tStamp). \n;
 $strtotime_tstamp = strtotime(next Monday, $tStamp);
@@ -82,7 +118,11 @@
 print wanted=Monday00:00:00\n\n;

 print TZ=America/Scoresbysund - Is it OK for this to be 2 AM? 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/file.c branches/PHP_5_3/ext/standard/tests/strings/bug55674.phpt branches/PHP_5_4/ext/standard/file.c branches/PHP_5_4/ext/standard/tests/str

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 12:44:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316618

Log:
Fixed Bug #55674 (fgetcsv  str_getcsv skip empty fields in some tab-separated 
records) which was introduced by r311543

Bug: https://bugs.php.net/55674 (Open) fgetcsv  str_getcsv skip empty fields 
in some tab-separated records
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/file.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug55674.phpt
U   php/php-src/branches/PHP_5_4/ext/standard/file.c
A   php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug55674.phpt
U   php/php-src/trunk/ext/standard/file.c
A   php/php-src/trunk/ext/standard/tests/strings/bug55674.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/file.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/file.c2011-09-13 12:42:17 UTC 
(rev 316617)
+++ php/php-src/branches/PHP_5_3/ext/standard/file.c2011-09-13 12:44:13 UTC 
(rev 316618)
@@ -2199,7 +2199,7 @@
inc_len = (bptr  limit ? (*bptr == '\0' ? 1: php_mblen(bptr, 
limit - bptr)): 0);
if (inc_len == 1) {
char *tmp = bptr;
-   while (isspace((int)*(unsigned char *)tmp)) {
+   while ((*tmp != delimiter)  isspace((int)*(unsigned 
char *)tmp)) {
tmp++;
}
if (*tmp == enclosure) {

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug55674.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug55674.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug55674.phpt   
2011-09-13 12:44:13 UTC (rev 316618)
@@ -0,0 +1,50 @@
+--TEST--
+Bug #55674 (fgetcsv  str_getcsv skip empty fields in some tab-separated 
records)
+--FILE--
+?php
+var_dump(str_getcsv(0\t\t\2\\n, \t));
+var_dump(str_getcsv(0\t \t'2'\n, \t, '));
+var_dump(str_getcsv());
+var_dump(str_getcsv( \t  \t\t\t , \t));
+?
+--EXPECT--
+array(3) {
+  [0]=
+  string(1) 0
+  [1]=
+  string(0) 
+  [2]=
+  string(1) 2
+}
+array(3) {
+  [0]=
+  string(1) 0
+  [1]=
+  string(1)  
+  [2]=
+  string(1) 2
+}
+array(5) {
+  [0]=
+  string(0) 
+  [1]=
+  string(0) 
+  [2]=
+  string(0) 
+  [3]=
+  string(0) 
+  [4]=
+  string(0) 
+}
+array(5) {
+  [0]=
+  string(1)  
+  [1]=
+  string(2)   
+  [2]=
+  string(0) 
+  [3]=
+  string(0) 
+  [4]=
+  string(1)  
+}

Modified: php/php-src/branches/PHP_5_4/ext/standard/file.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/file.c2011-09-13 12:42:17 UTC 
(rev 316617)
+++ php/php-src/branches/PHP_5_4/ext/standard/file.c2011-09-13 12:44:13 UTC 
(rev 316618)
@@ -2051,7 +2051,7 @@
inc_len = (bptr  limit ? (*bptr == '\0' ? 1: php_mblen(bptr, 
limit - bptr)): 0);
if (inc_len == 1) {
char *tmp = bptr;
-   while (isspace((int)*(unsigned char *)tmp)) {
+   while ((*tmp != delimiter)  isspace((int)*(unsigned 
char *)tmp)) {
tmp++;
}
if (*tmp == enclosure) {

Added: php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug55674.phpt
===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug55674.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/strings/bug55674.phpt   
2011-09-13 12:44:13 UTC (rev 316618)
@@ -0,0 +1,50 @@
+--TEST--
+Bug #55674 (fgetcsv  str_getcsv skip empty fields in some tab-separated 
records)
+--FILE--
+?php
+var_dump(str_getcsv(0\t\t\2\\n, \t));
+var_dump(str_getcsv(0\t \t'2'\n, \t, '));
+var_dump(str_getcsv());
+var_dump(str_getcsv( \t  \t\t\t , \t));
+?
+--EXPECT--
+array(3) {
+  [0]=
+  string(1) 0
+  [1]=
+  string(0) 
+  [2]=
+  string(1) 2
+}
+array(3) {
+  [0]=
+  string(1) 0
+  [1]=
+  string(1)  
+  [2]=
+  string(1) 2
+}
+array(5) {
+  [0]=
+  string(0) 
+  [1]=
+  string(0) 
+  [2]=
+  string(0) 
+  [3]=
+  string(0) 
+  [4]=
+  string(0) 
+}
+array(5) {
+  [0]=
+  string(1)  
+  [1]=
+  string(2)   
+  [2]=
+  string(0) 
+  [3]=
+  string(0) 
+  [4]=
+  string(1)  
+}

Modified: php/php-src/trunk/ext/standard/file.c
===
--- php/php-src/trunk/ext/standard/file.c   2011-09-13 12:42:17 UTC (rev 
316617)
+++ php/php-src/trunk/ext/standard/file.c   2011-09-13 12:44:13 UTC (rev 
316618)
@@ -2051,7 +2051,7 @@
inc_len = (bptr  limit ? (*bptr == '\0' ? 1: php_mblen(bptr, 
limit - bptr)): 0);
if (inc_len == 1) {
 

[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt PHP_5_4/ext/standard/tests

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 13:02:57 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316621

Log:
MFH, fix test

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_file.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_string_002.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
   2011-09-13 12:59:51 UTC (rev 316620)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_file.phpt
   2011-09-13 13:02:57 UTC (rev 316621)
@@ -137,11 +137,11 @@
   string(0) 
 }

-Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in %sparse_ini_file.dat on line 2
  in %sparse_ini_file.php on line 20
 bool(false)

-Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in %sparse_ini_file.dat on line 2
  in %sparse_ini_file.php on line 26
 bool(false)
 array(1) {

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt
 2011-09-13 12:59:51 UTC (rev 316620)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/parse_ini_string_002.phpt
 2011-09-13 13:02:57 UTC (rev 316621)
@@ -97,11 +97,11 @@
   %unicode|string%(0) 
 }

-Warning: syntax error, unexpected '=' in Unknown on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in Unknown on line 2
  in %s
 bool(false)

-Warning: syntax error, unexpected '=' in Unknown on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in Unknown on line 2
  in %s
 bool(false)
 array(1) {

Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_file.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_file.phpt
   2011-09-13 12:59:51 UTC (rev 316620)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_file.phpt
   2011-09-13 13:02:57 UTC (rev 316621)
@@ -1,5 +1,7 @@
 --TEST--
 parse_ini_file() multiple calls
+--SKIPIF--
+?php if( substr(PHP_OS, 0, 3) == 'WIN' ) die(skip Windows has different 
error message);?
 --FILE--
 ?php

@@ -135,11 +137,11 @@
   string(0) 
 }

-Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in %sparse_ini_file.dat on line 2
  in %sparse_ini_file.php on line 20
 bool(false)

-Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in %sparse_ini_file.dat on line 2
  in %sparse_ini_file.php on line 26
 bool(false)
 array(1) {

Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_string_002.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_string_002.phpt
 2011-09-13 12:59:51 UTC (rev 316620)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/general_functions/parse_ini_string_002.phpt
 2011-09-13 13:02:57 UTC (rev 316621)
@@ -97,11 +97,11 @@
   %unicode|string%(0) 
 }

-Warning: syntax error, unexpected '=' in Unknown on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in Unknown on line 2
  in %s
 bool(false)

-Warning: syntax error, unexpected '=' in Unknown on line 2
+Warning: syntax error, unexpected '=', expecting $end or TC_SECTION or 
TC_LABEL or TC_OFFSET in Unknown on line 2
  in %s
 bool(false)
 array(1) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 13:11:42 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316622

Log:
update news

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_4/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 13:02:57 UTC (rev 316621)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 13:11:42 UTC (rev 316622)
@@ -59,6 +59,9 @@
 instead of false when no nodes are found as it was since 5.3.3
 (bug #48601). (chregu, rrichards)

+- String:
+  . Fixed bug #55674 (fgetcsv  str_getcsv skip empty fields in some 
tab-separated
+records). (Laruence)

 23 Aug 2011, PHP 5.3.8


Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-09-13 13:02:57 UTC (rev 316621)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-09-13 13:11:42 UTC (rev 316622)
@@ -365,6 +365,7 @@
 - Fixed bug #55473 (mysql_pconnect leaks file descriptors on reconnect). 
(Andrey, Laruence)
 - Fixed bug #55423 (cli-server could not output correctly in some case). 
(Laruence, chobieee at gmail dot com)
 - Fixed bug #55653 (PS crash with libmysql when binding same variable as param 
and out). (Laruence)
+- Fixed bug #55674 (fgetcsv  str_getcsv skip empty fields in some 
tab-separated records). (Laruence)

 28 Jul 2011, PHP 5.3.7 RC4
 - Improved core functions:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/zlib/tests/ 003.phpt

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 13:18:57 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316623

Log:
Fix test (gzdecode not valid in 5.3 branch, maybe need add ? )

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/zlib/tests/003.phpt

Modified: php/php-src/branches/PHP_5_3/ext/zlib/tests/003.phpt
===
--- php/php-src/branches/PHP_5_3/ext/zlib/tests/003.phpt2011-09-13 
13:11:42 UTC (rev 316622)
+++ php/php-src/branches/PHP_5_3/ext/zlib/tests/003.phpt2011-09-13 
13:18:57 UTC (rev 316623)
@@ -1,7 +1,7 @@
 --TEST--
 gzencode()
 --SKIPIF--
-?php if (!extension_loaded(zlib)) print skip; ?
+?php if (!extension_loaded(zlib) || !function_exists(gzdecode)) print 
skip; ?
 --FILE--
 ?php
 $original = str_repeat(hallo php,4096);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/standard/tests/strings/ md5_file.phpt

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 13:20:09 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316624

Log:
MFH, fix test

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/md5_file.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/md5_file.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/md5_file.phpt   
2011-09-13 13:18:57 UTC (rev 316623)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/md5_file.phpt   
2011-09-13 13:20:09 UTC (rev 316624)
@@ -97,7 +97,8 @@
 string(32) d41d8cd98f00b204e9800998ecf8427e

 *** Raw Binary Output for Empty file as Argument ***
-string(16) ��ُ
+string(16) ��ُ
+
 *** Hexadecimal Output for a valid file with some contents ***
 string(32) 7f28ec647825e2a70bf67778472cd4a2


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/bug33532.phpt branches/PHP_5_4/ext/date/tests/bug33532.phpt trunk/ext/date/tests/bug33532.phpt

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 13:26:48 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316625

Log:
- skip on win, runtime TZ via putenv is not supported with ext/date

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt
U   php/php-src/branches/PHP_5_4/ext/date/tests/bug33532.phpt
U   php/php-src/trunk/ext/date/tests/bug33532.phpt

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt   2011-09-13 
13:20:09 UTC (rev 316624)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt   2011-09-13 
13:26:48 UTC (rev 316625)
@@ -3,6 +3,10 @@
 --INI--
 error_reporting=2047
 date.timezone=UTC
+--SKIPIF--
+?php
+if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die(skip 
strftime uses system TZ on Darwin and Windows);
+?
 --FILE--
 ?php


Modified: php/php-src/branches/PHP_5_4/ext/date/tests/bug33532.phpt
===
--- php/php-src/branches/PHP_5_4/ext/date/tests/bug33532.phpt   2011-09-13 
13:20:09 UTC (rev 316624)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/bug33532.phpt   2011-09-13 
13:26:48 UTC (rev 316625)
@@ -5,7 +5,8 @@
 date.timezone=UTC
 --SKIPIF--
 ?php
-if(PHP_OS == 'Darwin') die(skip strftime depends on TZ on Darwin);
+if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die(skip 
strftime uses system TZ on Darwin and Windows);
+?
 --FILE--
 ?php


Modified: php/php-src/trunk/ext/date/tests/bug33532.phpt
===
--- php/php-src/trunk/ext/date/tests/bug33532.phpt  2011-09-13 13:20:09 UTC 
(rev 316624)
+++ php/php-src/trunk/ext/date/tests/bug33532.phpt  2011-09-13 13:26:48 UTC 
(rev 316625)
@@ -5,7 +5,8 @@
 date.timezone=UTC
 --SKIPIF--
 ?php
-if(PHP_OS == 'Darwin') die(skip strftime depends on TZ on Darwin);
+if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die(skip 
strftime uses system TZ on Darwin and Windows);
+?
 --FILE--
 ?php


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/date/tests/ bug33532.phpt

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 13:27:20 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316626

Log:
- fix test

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt   2011-09-13 
13:26:48 UTC (rev 316625)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug33532.phpt   2011-09-13 
13:27:20 UTC (rev 316626)
@@ -22,6 +22,7 @@

 print \nSetting TZ\n;
 date_default_timezone_set('Australia/Sydney');
+putenv(TZ=Australia/Sydney);
 $input = 10:00:00 AM July 1 2005;
 print input . $input . \n;
 $tStamp = strtotime($input);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt branches/PHP_5_4/ext/date/tests/date_default_timezone_get-1.phpt trunk/ext/date/tests/date_default_timezon

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 13:39:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316630

Log:
- TZ auto detection varies, not always UTC

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt
U   
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-1.phpt
U   php/php-src/trunk/ext/date/tests/date_default_timezone_get-1.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt
2011-09-13 13:33:19 UTC (rev 316629)
+++ 
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt
2011-09-13 13:39:49 UTC (rev 316630)
@@ -9,8 +9,8 @@
echo date('e'), \n;
 ?
 --EXPECTF--
-Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-1.php on line 3
-UTC
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1.php on line 3
+%s

-Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-1.php on line 4
-UTC
+Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1.php on line 4
+%s

Modified: 
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-1.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-1.phpt
2011-09-13 13:33:19 UTC (rev 316629)
+++ 
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-1.phpt
2011-09-13 13:39:49 UTC (rev 316630)
@@ -9,8 +9,8 @@
echo date('e'), \n;
 ?
 --EXPECTF--
-Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-1.php on line 3
-UTC
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1.php on line 3
+%s

-Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-1.php on line 4
-UTC
+Warning: date(): It is not safe to rely on the system's timezone settings. You 
are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-1.php on line 4
+%s

Modified: php/php-src/trunk/ext/date/tests/date_default_timezone_get-1.phpt
===
--- php/php-src/trunk/ext/date/tests/date_default_timezone_get-1.phpt   
2011-09-13 13:33:19 UTC (rev 316629)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/date_default_timezone_get-2.phpt branches/PHP_5_4/ext/date/tests/date_default_timezone_get-2.phpt trunk/ext/date/tests/date_default_timezon

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 13:42:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316631

Log:
- TZ auto detection varies, not always UTC

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-2.phpt
U   
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-2.phpt
U   php/php-src/trunk/ext/date/tests/date_default_timezone_get-2.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-2.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-2.phpt
2011-09-13 13:39:49 UTC (rev 316630)
+++ 
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-2.phpt
2011-09-13 13:42:03 UTC (rev 316631)
@@ -8,5 +8,5 @@
echo date_default_timezone_get(), \n;
 ?
 --EXPECTF--
-Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-2.php on line 3
-UTC
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-2.php on line 3
+%s

Modified: 
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-2.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-2.phpt
2011-09-13 13:39:49 UTC (rev 316630)
+++ 
php/php-src/branches/PHP_5_4/ext/date/tests/date_default_timezone_get-2.phpt
2011-09-13 13:42:03 UTC (rev 316631)
@@ -8,5 +8,5 @@
echo date_default_timezone_get(), \n;
 ?
 --EXPECTF--
-Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-2.php on line 3
-UTC
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-2.php on line 3
+%s

Modified: php/php-src/trunk/ext/date/tests/date_default_timezone_get-2.phpt
===
--- php/php-src/trunk/ext/date/tests/date_default_timezone_get-2.phpt   
2011-09-13 13:39:49 UTC (rev 316630)
+++ php/php-src/trunk/ext/date/tests/date_default_timezone_get-2.phpt   
2011-09-13 13:42:03 UTC (rev 316631)
@@ -8,5 +8,5 @@
echo date_default_timezone_get(), \n;
 ?
 --EXPECTF--
-Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in 
%sdate_default_timezone_get-2.php on line 3
-UTC
+Warning: date_default_timezone_get(): It is not safe to rely on the system's 
timezone settings. You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods and 
you are still getting this warning, you most likely misspelled the timezone 
identifier. We selected '%s' for '%s' instead in 
%sdate_default_timezone_get-2.php on line 3
+%s

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/mktime-2.phpt branches/PHP_5_4/ext/date/tests/mktime-2.phpt trunk/ext/date/tests/mktime-2.phpt

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 13:51:47 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316633

Log:
- skip on win, runtime TZ via putenv is not supported with ext/date

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt
U   php/php-src/branches/PHP_5_4/ext/date/tests/mktime-2.phpt
U   php/php-src/trunk/ext/date/tests/mktime-2.phpt

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt   2011-09-13 
13:46:59 UTC (rev 316632)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt   2011-09-13 
13:51:47 UTC (rev 316633)
@@ -1,5 +1,9 @@
 --TEST--
 mktime() [2]
+--SKIPIF--
+?php
+if(defined('PHP_WINDOWS_VERSION_MAJOR')) die(skip mktime uses system TZ on 
Windows and putenv TZ is not supported on Windows at runtime);
+?
 --INI--
 error_reporting=2047
 --FILE--

Modified: php/php-src/branches/PHP_5_4/ext/date/tests/mktime-2.phpt
===
--- php/php-src/branches/PHP_5_4/ext/date/tests/mktime-2.phpt   2011-09-13 
13:46:59 UTC (rev 316632)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/mktime-2.phpt   2011-09-13 
13:51:47 UTC (rev 316633)
@@ -1,5 +1,9 @@
 --TEST--
 mktime() [2]
+--SKIPIF--
+?php
+if(defined('PHP_WINDOWS_VERSION_MAJOR')) die(skip mktime uses system TZ on 
Windows and putenv TZ is not supported on Windows at runtime);
+?
 --INI--
 error_reporting=2047
 --FILE--

Modified: php/php-src/trunk/ext/date/tests/mktime-2.phpt
===
--- php/php-src/trunk/ext/date/tests/mktime-2.phpt  2011-09-13 13:46:59 UTC 
(rev 316632)
+++ php/php-src/trunk/ext/date/tests/mktime-2.phpt  2011-09-13 13:51:47 UTC 
(rev 316633)
@@ -1,5 +1,9 @@
 --TEST--
 mktime() [2]
+--SKIPIF--
+?php
+if(defined('PHP_WINDOWS_VERSION_MAJOR')) die(skip mktime uses system TZ on 
Windows and putenv TZ is not supported on Windows at runtime);
+?
 --INI--
 error_reporting=2047
 --FILE--

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt branches/PHP_5_4/ext/date/tests/timezone-configuration.phpt trunk/ext/date/tests/timezone-configuration.phpt

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 13:58:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316634

Log:
- skip on win, runtime TZ via putenv is not supported with ext/date

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt
U   php/php-src/branches/PHP_5_4/ext/date/tests/timezone-configuration.phpt
U   php/php-src/trunk/ext/date/tests/timezone-configuration.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt 
2011-09-13 13:51:47 UTC (rev 316633)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/timezone-configuration.phpt 
2011-09-13 13:58:03 UTC (rev 316634)
@@ -5,9 +5,18 @@
 --FILE--
 ?php
putenv('TZ=Europe/Oslo');
+   if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+   date_default_timezone_set('Europe/Oslo');
+   } else {
+   putenv('TZ=Europe/Oslo');
+   }
echo strtotime(2005-06-18 22:15:44), \n;

-   putenv('TZ=Europe/London');
+   if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+   date_default_timezone_set('Europe/London');
+   } else {
+   putenv('TZ=Europe/London');
+   }
echo strtotime(2005-06-18 22:15:44), \n;

date_default_timezone_set('Europe/Oslo');

Modified: 
php/php-src/branches/PHP_5_4/ext/date/tests/timezone-configuration.phpt
===
--- php/php-src/branches/PHP_5_4/ext/date/tests/timezone-configuration.phpt 
2011-09-13 13:51:47 UTC (rev 316633)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/timezone-configuration.phpt 
2011-09-13 13:58:03 UTC (rev 316634)
@@ -5,9 +5,18 @@
 --FILE--
 ?php
putenv('TZ=Europe/Oslo');
+   if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+   date_default_timezone_set('Europe/Oslo');
+   } else {
+   putenv('TZ=Europe/Oslo');
+   }
echo strtotime(2005-06-18 22:15:44), \n;

-   putenv('TZ=Europe/London');
+   if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+   date_default_timezone_set('Europe/London');
+   } else {
+   putenv('TZ=Europe/London');
+   }
echo strtotime(2005-06-18 22:15:44), \n;

date_default_timezone_set('Europe/Oslo');

Modified: php/php-src/trunk/ext/date/tests/timezone-configuration.phpt
===
--- php/php-src/trunk/ext/date/tests/timezone-configuration.phpt
2011-09-13 13:51:47 UTC (rev 316633)
+++ php/php-src/trunk/ext/date/tests/timezone-configuration.phpt
2011-09-13 13:58:03 UTC (rev 316634)
@@ -5,9 +5,18 @@
 --FILE--
 ?php
putenv('TZ=Europe/Oslo');
+   if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+   date_default_timezone_set('Europe/Oslo');
+   } else {
+   putenv('TZ=Europe/Oslo');
+   }
echo strtotime(2005-06-18 22:15:44), \n;

-   putenv('TZ=Europe/London');
+   if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+   date_default_timezone_set('Europe/London');
+   } else {
+   putenv('TZ=Europe/London');
+   }
echo strtotime(2005-06-18 22:15:44), \n;

date_default_timezone_set('Europe/Oslo');

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/main/ php_globals.h

2011-09-13 Thread Kalle Sommer Nielsen
kalleTue, 13 Sep 2011 14:35:12 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316638

Log:
Fix build on Windows

Changed paths:
U   php/php-src/trunk/main/php_globals.h

Modified: php/php-src/trunk/main/php_globals.h
===
--- php/php-src/trunk/main/php_globals.h2011-09-13 14:34:28 UTC (rev 
316637)
+++ php/php-src/trunk/main/php_globals.h2011-09-13 14:35:12 UTC (rev 
316638)
@@ -156,6 +156,10 @@
char *mail_log;

zend_bool in_error_log;
+
+#ifdef PHP_WIN32
+   zend_bool windows_show_crt_warning;
+#endif
 };



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_4/NEWS

2011-09-13 Thread Hannes Magnusson
On Tue, Sep 13, 2011 at 15:11, Xinchen Hui larue...@php.net wrote:
 laruence                                 Tue, 13 Sep 2011 13:11:42 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316622

 Log:
 update news

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_4/NEWS

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 13:02:57 UTC (rev 316621)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 13:11:42 UTC (rev 316622)
 @@ -59,6 +59,9 @@
     instead of false when no nodes are found as it was since 5.3.3
     (bug #48601). (chregu, rrichards)

 +- String:
 +  . Fixed bug #55674 (fgetcsv  str_getcsv skip empty fields in some 
 tab-separated
 +    records). (Laruence)

  23 Aug 2011, PHP 5.3.8


 Modified: php/php-src/branches/PHP_5_4/NEWS
 ===
 --- php/php-src/branches/PHP_5_4/NEWS   2011-09-13 13:02:57 UTC (rev 316621)
 +++ php/php-src/branches/PHP_5_4/NEWS   2011-09-13 13:11:42 UTC (rev 316622)
 @@ -365,6 +365,7 @@
  - Fixed bug #55473 (mysql_pconnect leaks file descriptors on reconnect). 
 (Andrey, Laruence)
  - Fixed bug #55423 (cli-server could not output correctly in some case). 
 (Laruence, chobieee at gmail dot com)
  - Fixed bug #55653 (PS crash with libmysql when binding same variable as 
 param and out). (Laruence)
 +- Fixed bug #55674 (fgetcsv  str_getcsv skip empty fields in some 
 tab-separated records). (Laruence)



We only add NEWS entries to the lowest relased branch..

-Hannes

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-09-13 Thread Derick Rethans
derick   Tue, 13 Sep 2011 14:49:44 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316641

Log:
- tabs to spaces

Changed paths:
U   php/php-src/branches/PHP_5_4/UPGRADING

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 14:48:13 UTC (rev 
316640)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 14:49:44 UTC (rev 
316641)
@@ -273,15 +273,15 @@
- session_is_registered()
- session_register()
- session_unregister()
-  - mysqli_bind_param() (alias of mysqli_stmt_bind_param())
-  - mysqli_bind_result() (alias of mysqli_stmt_bind_result())
-  - mysqli_client_encoding() (alias of mysqli_character_set_name())
-  - mysqli_fetch() (alias of mysqli_stmt_fetch())
-  - mysqli_param_count() (alias of mysqli_stmt_param_count())
-  - mysqli_get_metadata() (alias of mysqli_stmt_result_metadata())
-  - mysqli_send_long_data() (alias of mysqli_stmt_send_long_data())
-  - mysqli::client_encoding() (alias of mysqli::character_set_name)
-  - mysqli_stmt::stmt() (never worked/always throws, undocumented)
+   - mysqli_bind_param() (alias of mysqli_stmt_bind_param())
+   - mysqli_bind_result() (alias of mysqli_stmt_bind_result())
+   - mysqli_client_encoding() (alias of mysqli_character_set_name())
+   - mysqli_fetch() (alias of mysqli_stmt_fetch())
+   - mysqli_param_count() (alias of mysqli_stmt_param_count())
+   - mysqli_get_metadata() (alias of mysqli_stmt_result_metadata())
+   - mysqli_send_long_data() (alias of mysqli_stmt_send_long_data())
+   - mysqli::client_encoding() (alias of mysqli::character_set_name)
+   - mysqli_stmt::stmt() (never worked/always throws, undocumented)

 d. removed syntax

@@ -303,8 +303,8 @@
  c. with changed behaviour

 - The MySQL extensions (ext/mysql, mysqli and PDO_mysql) use mysqlnd
- as the default library now. It is still possible to use libmysql by
- specifying a path to the configure options.
+  as the default library now. It is still possible to use libmysql by
+  specifying a path to the configure options.
 - The session extension now can hook into the file upload feature
   in order to provide upload progress information through session
   variables.
@@ -427,7 +427,7 @@
  - ldap_control_paged_results_response()

- libxml
-- libxml_set_external_entity_loader()
+ - libxml_set_external_entity_loader()

  f. New global constants


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-09-13 Thread Derick Rethans
derick   Tue, 13 Sep 2011 14:50:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316642

Log:
And some formatting

Changed paths:
U   php/php-src/branches/PHP_5_4/UPGRADING

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 14:49:44 UTC (rev 
316641)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 14:50:18 UTC (rev 
316642)
@@ -303,8 +303,8 @@
  c. with changed behaviour

 - The MySQL extensions (ext/mysql, mysqli and PDO_mysql) use mysqlnd
-  as the default library now. It is still possible to use libmysql by
-  specifying a path to the configure options.
+  as the default library now. It is still possible to use libmysql by
+  specifying a path to the configure options.
 - The session extension now can hook into the file upload feature
   in order to provide upload progress information through session
   variables.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING

2011-09-13 Thread Derick Rethans
derick   Tue, 13 Sep 2011 14:57:58 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316646

Log:
- Document changes in upgrading.

Changed paths:
U   php/php-src/branches/PHP_5_4/UPGRADING

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 14:56:57 UTC (rev 
316645)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-09-13 14:57:58 UTC (rev 
316646)
@@ -82,15 +82,16 @@
   - safe_mode_protected_env_vars
   - zend.ze1_compatibility_mode

+
 =
 2. Reserved words and classes
 =

 -

-=
+===
 3. Changes made to engine behaviour
-=
+===

 - Turning null, false or empty string into an object by adding a property
   will now emit a warning instead of an E_STRICT error.
@@ -330,6 +331,13 @@
remote SNMP agent (peer) is done by extension now, not by 
Net-SNMP
library anymore.

+- Date extension
+  - Setting the timezone with the TZ environment variable is no longer
+supported, instead date.timezone and/or date_default_timezone_set()
+have to be used.
+  - The extension will no longer guesses the default timezone if none
+is set with date.timezone and/or date_default_timezone_set().
+Instead it will always fall back to UTC.

  d. no longer possible to disable


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 14:58:37 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316647

Log:
Revert update, since this bug is not in a official release of 5.4

Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-09-13 14:57:58 UTC (rev 316646)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-09-13 14:58:37 UTC (rev 316647)
@@ -369,7 +369,6 @@
 - Fixed bug #55473 (mysql_pconnect leaks file descriptors on reconnect). 
(Andrey, Laruence)
 - Fixed bug #55423 (cli-server could not output correctly in some case). 
(Laruence, chobieee at gmail dot com)
 - Fixed bug #55653 (PS crash with libmysql when binding same variable as param 
and out). (Laruence)
-- Fixed bug #55674 (fgetcsv  str_getcsv skip empty fields in some 
tab-separated records). (Laruence)

 28 Jul 2011, PHP 5.3.7 RC4
 - Improved core functions:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS

2011-09-13 Thread Xinchen Hui
laruence Tue, 13 Sep 2011 15:12:16 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316653

Log:
Fix typo (as tyearl's ask)

Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-09-13 15:08:48 UTC (rev 316652)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-09-13 15:12:16 UTC (rev 316653)
@@ -137,7 +137,7 @@
   . allow_call_time_pass_reference. (Pierrick)
   . define_syslog_variables ini option and its associated function. (Kalle)
   . highlight.bg ini option. (Kalle)
-  . Session bug compatibility mode (session.bug_compat42 and
+  . Session bug compatibility mode (session.bug_compat_42 and
 session.bug_compat_warn ini options). (Kalle)
   . session_is_registered(), session_register() and session_unregister()
 functions. (Kalle)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c

2011-09-13 Thread Derick Rethans
derick   Tue, 13 Sep 2011 15:17:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316654

Log:
- Fixed compiler warnings (patch by Kalle Sommer Nielsen)

Changed paths:
U   php/php-src/branches/PHP_5_4/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_compile.c

Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-09-13 15:12:16 UTC 
(rev 316653)
+++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-09-13 15:17:11 UTC 
(rev 316654)
@@ -432,7 +432,7 @@
lc_literal = zend_add_literal(CG(active_op_array), c TSRMLS_CC);
CALCULATE_LITERAL_HASH(lc_literal);

-   ns_separator = zend_memrchr(Z_STRVAL_P(zv), '\\', Z_STRLEN_P(zv)) + 1;
+   ns_separator = (const char*)zend_memrchr(Z_STRVAL_P(zv), '\\', 
Z_STRLEN_P(zv)) + 1;
lc_len = Z_STRLEN_P(zv) - (ns_separator - Z_STRVAL_P(zv));
lc_name = zend_str_tolower_dup(ns_separator, lc_len);
ZVAL_STRINGL(c, lc_name, lc_len, 0);

Modified: php/php-src/trunk/Zend/zend_compile.c
===
--- php/php-src/trunk/Zend/zend_compile.c   2011-09-13 15:12:16 UTC (rev 
316653)
+++ php/php-src/trunk/Zend/zend_compile.c   2011-09-13 15:17:11 UTC (rev 
316654)
@@ -432,7 +432,7 @@
lc_literal = zend_add_literal(CG(active_op_array), c TSRMLS_CC);
CALCULATE_LITERAL_HASH(lc_literal);

-   ns_separator = zend_memrchr(Z_STRVAL_P(zv), '\\', Z_STRLEN_P(zv)) + 1;
+   ns_separator = (const char*)zend_memrchr(Z_STRVAL_P(zv), '\\', 
Z_STRLEN_P(zv)) + 1;
lc_len = Z_STRLEN_P(zv) - (ns_separator - Z_STRVAL_P(zv));
lc_name = zend_str_tolower_dup(ns_separator, lc_len);
ZVAL_STRINGL(c, lc_name, lc_len, 0);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt trunk/ext/date/tests/DateInterval_format_a.phpt

2011-09-13 Thread Pierre Joye
pajoye   Tue, 13 Sep 2011 16:21:24 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=31

Log:
- test passes now (and VC6 is not supported anymore)

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt
U   php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt

Modified: php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt
===
--- php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt  
2011-09-13 16:13:17 UTC (rev 316665)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt  
2011-09-13 16:21:24 UTC (rev 31)
@@ -10,8 +10,6 @@
 if (!method_exists('DateInterval', 'format')) die(skip: method doesn't 
exist);
 if (substr(PHP_OS, 0, 3) != 'WIN') die(skip this test is for Windows 
platforms only);
 ?
---XFAIL--
-Windows VC6 libs' floor()/ceil() choke on floats
 --FILE--
 ?php


Modified: php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt
===
--- php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt 2011-09-13 
16:13:17 UTC (rev 316665)
+++ php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt 2011-09-13 
16:21:24 UTC (rev 31)
@@ -10,8 +10,6 @@
 if (!method_exists('DateInterval', 'format')) die(skip: method doesn't 
exist);
 if (substr(PHP_OS, 0, 3) != 'WIN') die(skip this test is for Windows 
platforms only);
 ?
---XFAIL--
-Windows VC6 libs' floor()/ceil() choke on floats
 --FILE--
 ?php


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/pdo/pdo_stmt.c trunk/ext/pdo/pdo_stmt.c

2011-09-13 Thread Ilia Alshanetsky
iliaaTue, 13 Sep 2011 16:36:29 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316667

Log:
Improve parameter handling cod

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
U   php/php-src/trunk/ext/pdo/pdo_stmt.c

Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-09-13 16:21:24 UTC 
(rev 31)
+++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-09-13 16:36:29 UTC 
(rev 316667)
@@ -1333,16 +1333,15 @@
long how = PDO_FETCH_CLASS;
long ori = PDO_FETCH_ORI_NEXT;
long off = 0;
-   char *class_name;
+   char *class_name = NULL;
int class_name_len;
zend_class_entry *old_ce;
-   zval *old_ctor_args, *ctor_args;
+   zval *old_ctor_args, *ctor_args = NULL;
int error = 0, old_arg_count;

PHP_STMT_GET_OBJ;

-   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sz,
-   class_name, class_name_len, ctor_args)) {
+   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!a, 
class_name, class_name_len, ctor_args)) {
RETURN_FALSE;
}

@@ -1357,17 +1356,8 @@
old_arg_count = stmt-fetch.cls.fci.param_count;

do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
-
-   switch(ZEND_NUM_ARGS()) {
-   case 0:
-   stmt-fetch.cls.ce = zend_standard_class_def;
-   break;
-   case 2:
-   if (Z_TYPE_P(ctor_args) != IS_NULL  Z_TYPE_P(ctor_args) != 
IS_ARRAY) {
-   pdo_raise_impl_error(stmt-dbh, stmt, HY000, 
ctor_args must be either NULL or an array TSRMLS_CC);
-   error = 1;
-   break;
-   }
+
+   if (ctor_args) {
if (Z_TYPE_P(ctor_args) == IS_ARRAY  
zend_hash_num_elements(Z_ARRVAL_P(ctor_args))) {
ALLOC_ZVAL(stmt-fetch.cls.ctor_args);
*stmt-fetch.cls.ctor_args = *ctor_args;
@@ -1375,15 +1365,16 @@
} else {
stmt-fetch.cls.ctor_args = NULL;
}
-   /* no break */
-   case 1:
+   }
+   if (class_name  !error) {
stmt-fetch.cls.ce = zend_fetch_class(class_name, 
class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);

if (!stmt-fetch.cls.ce) {
pdo_raise_impl_error(stmt-dbh, stmt, HY000, Could 
not find user-supplied class TSRMLS_CC);
error = 1;
-   break;
}
+   } else if (!error) {
+   stmt-fetch.cls.ce = zend_standard_class_def;
}

if (!error  !do_fetch(stmt, TRUE, return_value, how, ori, off, 0 
TSRMLS_CC)) {

Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c
===
--- php/php-src/trunk/ext/pdo/pdo_stmt.c2011-09-13 16:21:24 UTC (rev 
31)
+++ php/php-src/trunk/ext/pdo/pdo_stmt.c2011-09-13 16:36:29 UTC (rev 
316667)
@@ -1333,16 +1333,15 @@
long how = PDO_FETCH_CLASS;
long ori = PDO_FETCH_ORI_NEXT;
long off = 0;
-   char *class_name;
+   char *class_name = NULL;
int class_name_len;
zend_class_entry *old_ce;
-   zval *old_ctor_args, *ctor_args;
+   zval *old_ctor_args, *ctor_args = NULL;
int error = 0, old_arg_count;

PHP_STMT_GET_OBJ;

-   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sz,
-   class_name, class_name_len, ctor_args)) {
+   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!a, 
class_name, class_name_len, ctor_args)) {
RETURN_FALSE;
}

@@ -1357,17 +1356,8 @@
old_arg_count = stmt-fetch.cls.fci.param_count;

do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
-
-   switch(ZEND_NUM_ARGS()) {
-   case 0:
-   stmt-fetch.cls.ce = zend_standard_class_def;
-   break;
-   case 2:
-   if (Z_TYPE_P(ctor_args) != IS_NULL  Z_TYPE_P(ctor_args) != 
IS_ARRAY) {
-   pdo_raise_impl_error(stmt-dbh, stmt, HY000, 
ctor_args must be either NULL or an array TSRMLS_CC);
-   error = 1;
-   break;
-   }
+
+   if (ctor_args) {
if (Z_TYPE_P(ctor_args) == IS_ARRAY  
zend_hash_num_elements(Z_ARRVAL_P(ctor_args))) {
ALLOC_ZVAL(stmt-fetch.cls.ctor_args);
*stmt-fetch.cls.ctor_args = *ctor_args;
@@ -1375,15 +1365,16 @@
} else {
stmt-fetch.cls.ctor_args = NULL;
}
-   /* no break */
-   case 1:
+   }
+   if (class_name  !error) {
stmt-fetch.cls.ce = zend_fetch_class(class_name, 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug55509.phpt branches/PHP_5_3/Zend/zend_alloc.c branches/PHP_5_4/Zend/tests/bug55509.phpt branches/PHP_5_4/Zend/zend

2011-09-13 Thread Christopher Jones


Dmitry,

This is diffing for me in 5.4 (I've haven't looked at 5.3 or trunk):

007+ Fatal error: Allowed memory size of 3221225472 bytes exhausted at /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/ext/standard/string.c:4636 (tried to allocate 536870913 bytes) in 
/home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/tests/bug55509.php on line 12

007- Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate 
%d bytes) in %s/bug55509.php on line %d

Chris

On 09/13/2011 12:01 AM, Dmitry Stogov wrote:

dmitry   Tue, 13 Sep 2011 07:01:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316590

Log:
Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence)

Bug: https://bugs.php.net/55509 (Verified) segfault on x86_64 using more than 
2G memory

Changed paths:
 U   php/php-src/branches/PHP_5_3/NEWS
 A   php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
 U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
 A   php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
 U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
 A   php/php-src/trunk/Zend/tests/bug55509.phpt
 U   php/php-src/trunk/Zend/zend_alloc.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 06:22:25 UTC (rev 316589)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:01:46 UTC (rev 316590)
@@ -8,6 +8,7 @@
. Fixed bug #55366: keys lost when using substr_replace an array. (Arpad)
. Fixed bug #55510: $_FILES 'name' missing first character after upload.
  (Arpad)
+  . Fixed bug #55509 (segfault on x86_64 using more than 2G memory). (Laruence)
. Fixed bug #55576: Cannot conditionally move uploaded file without race
  condition. (Gustavo)
. Fixed bug #55504 (Content-Type header is not parsed correctly on

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt   2011-09-13 
07:01:46 UTC (rev 316590)
@@ -0,0 +1,33 @@
+--TEST--
+Bug #55509 (segfault on x86_64 using more than 2G memory)
+--SKIPIF--
+?php
+if (PHP_INT_SIZE == 4) {
+  die('skip Not for 32-bits OS');
+}
+?
+--INI--
+memory_limit=3G
+--FILE--
+?php
+$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
+echo 1\n;
+$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
+echo 2\n;
+$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
+echo 3\n;
+$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
+echo 4\n;
+$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5);
+echo 5\n;
+$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5);
+echo 6\n;
+?
+--EXPECTF--
+1
+2
+3
+4
+5
+
+Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d 
bytes) in %s/bug55509.php on line %d

Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2011-09-13 06:22:25 UTC 
(rev 316589)
+++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2011-09-13 07:01:46 UTC 
(rev 316590)
@@ -510,7 +510,7 @@
  #define ZEND_MM_IS_GUARD_BLOCK(b) (((b)-info._size  
ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)

  #define ZEND_MM_NEXT_BLOCK(b) ZEND_MM_BLOCK_AT(b, 
ZEND_MM_BLOCK_SIZE(b))
-#define ZEND_MM_PREV_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
-(int)((b)-info._prev  ~ZEND_MM_TYPE_MASK))
+#define ZEND_MM_PREV_BLOCK(b)  ZEND_MM_BLOCK_AT(b, 
-(ssize_t)((b)-info._prev  ~ZEND_MM_TYPE_MASK))

  #define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)-info._prev  
ZEND_MM_USED_BLOCK))


Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
===
--- php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt   2011-09-13 
07:01:46 UTC (rev 316590)
@@ -0,0 +1,33 @@
+--TEST--
+Bug #55509 (segfault on x86_64 using more than 2G memory)
+--SKIPIF--
+?php
+if (PHP_INT_SIZE == 4) {
+  die('skip Not for 32-bits OS');
+}
+?
+--INI--
+memory_limit=3G
+--FILE--
+?php
+$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
+echo 1\n;
+$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
+echo 2\n;
+$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
+echo 3\n;
+$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
+echo 4\n;
+$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5);
+echo 5\n;
+$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5);
+echo 6\n;
+?
+--EXPECTF--
+1
+2
+3
+4
+5
+
+Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate %d 
bytes) in %s/bug55509.php on line %d

Modified: php/php-src/branches/PHP_5_4/Zend/zend_alloc.c

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt trunk/ext/session/tests/rfc1867_invalid

2011-09-13 Thread Ferenc Kovacs
tyrael   Tue, 13 Sep 2011 19:56:42 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316683

Log:
fixing the tests, added the error_log= to the --INI-- so it should also pass 
for Stas

Changed paths:
U   
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt
U   
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt
U   php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt
U   php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt

Modified: 
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt
2011-09-13 18:53:26 UTC (rev 316682)
+++ 
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings.phpt
2011-09-13 19:56:42 UTC (rev 316683)
@@ -2,6 +2,7 @@
 session rfc1867 invalid settings
 --INI--
 session.upload_progress.freq=-1
+error_log=
 --SKIPIF--
 ?php include('skipif.inc'); ?
 --FILE--
@@ -9,5 +10,7 @@
 var_dump(ini_get(session.upload_progress.freq));
 ?
 --EXPECTF--
+PHP Warning:  PHP Startup: session.upload_progress.freq must be greater than 
or equal to zero in %s
+
 Warning: PHP Startup: session.upload_progress.freq must be greater than or 
equal to zero in %s
 string(%d) 1%

Modified: 
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt  
2011-09-13 18:53:26 UTC (rev 316682)
+++ 
php/php-src/branches/PHP_5_4/ext/session/tests/rfc1867_invalid_settings_2.phpt  
2011-09-13 19:56:42 UTC (rev 316683)
@@ -2,6 +2,7 @@
 session rfc1867 invalid settings 2
 --INI--
 session.upload_progress.freq=200%
+error_log=
 --SKIPIF--
 ?php include('skipif.inc'); ?
 --FILE--
@@ -9,5 +10,7 @@
 var_dump(ini_get(session.upload_progress.freq));
 ?
 --EXPECTF--
+PHP Warning:  PHP Startup: session.upload_progress.freq cannot be over 100% in 
%s
+
 Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
 string(%d) 1%

Modified: php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt
===
--- php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt   
2011-09-13 18:53:26 UTC (rev 316682)
+++ php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings.phpt   
2011-09-13 19:56:42 UTC (rev 316683)
@@ -2,6 +2,7 @@
 session rfc1867 invalid settings
 --INI--
 session.upload_progress.freq=-1
+error_log=
 --SKIPIF--
 ?php include('skipif.inc'); ?
 --FILE--
@@ -9,5 +10,7 @@
 var_dump(ini_get(session.upload_progress.freq));
 ?
 --EXPECTF--
+PHP Warning:  PHP Startup: session.upload_progress.freq must be greater than 
or equal to zero in %s
+
 Warning: PHP Startup: session.upload_progress.freq must be greater than or 
equal to zero in %s
 string(%d) 1%

Modified: php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt
===
--- php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt 
2011-09-13 18:53:26 UTC (rev 316682)
+++ php/php-src/trunk/ext/session/tests/rfc1867_invalid_settings_2.phpt 
2011-09-13 19:56:42 UTC (rev 316683)
@@ -2,6 +2,7 @@
 session rfc1867 invalid settings 2
 --INI--
 session.upload_progress.freq=200%
+error_log=
 --SKIPIF--
 ?php include('skipif.inc'); ?
 --FILE--
@@ -9,5 +10,7 @@
 var_dump(ini_get(session.upload_progress.freq));
 ?
 --EXPECTF--
+PHP Warning:  PHP Startup: session.upload_progress.freq cannot be over 100% in 
%s
+
 Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
 string(%d) 1%

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/date/tests/DateInterval_format.phpt branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt trunk/ext/date/tests/DateInterval_format.phpt trunk/ext

2011-09-13 Thread Daniel Convissor
danielc  Tue, 13 Sep 2011 20:31:02 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316685

Log:
Separate test for %a is no longer needed.

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format.phpt
D   php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt
U   php/php-src/trunk/ext/date/tests/DateInterval_format.phpt
D   php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt

Modified: php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format.phpt
===
--- php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format.phpt
2011-09-13 20:25:15 UTC (rev 316684)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format.phpt
2011-09-13 20:31:02 UTC (rev 316685)
@@ -1,8 +1,5 @@
 --TEST--
-DateInterval::format(), except %a
---DESCRIPTION--
-%a is covered in a separate test.
-Don't want an XFAIL here to cause confusion if a real bug comes up.
+DateInterval::format()
 --CREDITS--
 Daniel Convissor dani...@php.net
 # TestFest 2010 BKTK
@@ -32,6 +29,7 @@
 echo $interval-format('i=%i') . \n;
 echo $interval-format('s=%s') . \n;
 echo $interval-format('r=%r') . \n;
+echo $interval-format('a=%a') . \n;

 echo \n;

@@ -63,6 +61,7 @@
 i=5
 s=6
 r=
+a=428

 inverted R=-
 inverted r=-

Deleted: php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt
===
--- php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt  
2011-09-13 20:25:15 UTC (rev 316684)
+++ php/php-src/branches/PHP_5_4/ext/date/tests/DateInterval_format_a.phpt  
2011-09-13 20:31:02 UTC (rev 316685)
@@ -1,25 +0,0 @@
---TEST--
-DateInterval::format(), %a
---CREDITS--
-Daniel Convissor dani...@php.net
-# TestFest 2010 BKTK
---INI--
-date.timezone=UTC
---SKIPIF--
-?php
-if (!method_exists('DateInterval', 'format')) die(skip: method doesn't 
exist);
-if (substr(PHP_OS, 0, 3) != 'WIN') die(skip this test is for Windows 
platforms only);
-?
---FILE--
-?php
-
-$date1 = new DateTime('2000-01-01 00:00:00');
-$date2 = new DateTime('2001-03-04 04:05:06');
-
-$interval = $date1-diff($date2);
-
-echo $interval-format('a=%a') . \n;
-
-?
---EXPECT--
-a=428

Modified: php/php-src/trunk/ext/date/tests/DateInterval_format.phpt
===
--- php/php-src/trunk/ext/date/tests/DateInterval_format.phpt   2011-09-13 
20:25:15 UTC (rev 316684)
+++ php/php-src/trunk/ext/date/tests/DateInterval_format.phpt   2011-09-13 
20:31:02 UTC (rev 316685)
@@ -1,8 +1,5 @@
 --TEST--
-DateInterval::format(), except %a
---DESCRIPTION--
-%a is covered in a separate test.
-Don't want an XFAIL here to cause confusion if a real bug comes up.
+DateInterval::format()
 --CREDITS--
 Daniel Convissor dani...@php.net
 # TestFest 2010 BKTK
@@ -32,6 +29,7 @@
 echo $interval-format('i=%i') . \n;
 echo $interval-format('s=%s') . \n;
 echo $interval-format('r=%r') . \n;
+echo $interval-format('a=%a') . \n;

 echo \n;

@@ -63,6 +61,7 @@
 i=5
 s=6
 r=
+a=428

 inverted R=-
 inverted r=-

Deleted: php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt
===
--- php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt 2011-09-13 
20:25:15 UTC (rev 316684)
+++ php/php-src/trunk/ext/date/tests/DateInterval_format_a.phpt 2011-09-13 
20:31:02 UTC (rev 316685)
@@ -1,25 +0,0 @@
---TEST--
-DateInterval::format(), %a
---CREDITS--
-Daniel Convissor dani...@php.net
-# TestFest 2010 BKTK
---INI--
-date.timezone=UTC
---SKIPIF--
-?php
-if (!method_exists('DateInterval', 'format')) die(skip: method doesn't 
exist);
-if (substr(PHP_OS, 0, 3) != 'WIN') die(skip this test is for Windows 
platforms only);
-?
---FILE--
-?php
-
-$date1 = new DateTime('2000-01-01 00:00:00');
-$date2 = new DateTime('2001-03-04 04:05:06');
-
-$interval = $date1-diff($date2);
-
-echo $interval-format('a=%a') . \n;
-
-?
---EXPECT--
-a=428

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/session/tests/session_save_path_variation4.phpt branches/PHP_5_4/ext/session/tests/session_save_path_variation4.phpt trunk/ext/session/tests/session_s

2011-09-13 Thread Ferenc Kovacs
tyrael   Tue, 13 Sep 2011 21:06:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316686

Log:
I don't see why would be this a win only test. it works for me on linux, 
checked the history, find no explanation.

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/session/tests/session_save_path_variation4.phpt
U   
php/php-src/branches/PHP_5_4/ext/session/tests/session_save_path_variation4.phpt
U   php/php-src/trunk/ext/session/tests/session_save_path_variation4.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/session/tests/session_save_path_variation4.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/session/tests/session_save_path_variation4.phpt
2011-09-13 20:31:02 UTC (rev 316685)
+++ 
php/php-src/branches/PHP_5_3/ext/session/tests/session_save_path_variation4.phpt
2011-09-13 21:06:06 UTC (rev 316686)
@@ -1,10 +1,7 @@
 --TEST--
 Test session_save_path() function : variation
 --SKIPIF--
-?php include('skipif.inc');
-if(substr(PHP_OS, 0, 3) != WIN)
-   die(skip Only for Windows);
-?
+?php include('skipif.inc');?
 --INI--
 open_basedir=.
 session.save_handler=files

Modified: 
php/php-src/branches/PHP_5_4/ext/session/tests/session_save_path_variation4.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/session/tests/session_save_path_variation4.phpt
2011-09-13 20:31:02 UTC (rev 316685)
+++ 
php/php-src/branches/PHP_5_4/ext/session/tests/session_save_path_variation4.phpt
2011-09-13 21:06:06 UTC (rev 316686)
@@ -1,10 +1,7 @@
 --TEST--
 Test session_save_path() function : variation
 --SKIPIF--
-?php include('skipif.inc');
-if(substr(PHP_OS, 0, 3) != WIN)
-   die(skip Only for Windows);
-?
+?php include('skipif.inc');?
 --INI--
 open_basedir=.
 session.save_handler=files

Modified: php/php-src/trunk/ext/session/tests/session_save_path_variation4.phpt
===
--- php/php-src/trunk/ext/session/tests/session_save_path_variation4.phpt   
2011-09-13 20:31:02 UTC (rev 316685)
+++ php/php-src/trunk/ext/session/tests/session_save_path_variation4.phpt   
2011-09-13 21:06:06 UTC (rev 316686)
@@ -1,10 +1,7 @@
 --TEST--
 Test session_save_path() function : variation
 --SKIPIF--
-?php include('skipif.inc');
-if(substr(PHP_OS, 0, 3) != WIN)
-   die(skip Only for Windows);
-?
+?php include('skipif.inc');?
 --INI--
 open_basedir=.
 session.save_handler=files

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/session.c branches/PHP_5_4/ext/standard/basic_functions.c branches/PHP_5_4/ext/standard/basic_functions.h trunk/ext/session/session.c trunk/ex

2011-09-13 Thread Arpad Ray
arpadTue, 13 Sep 2011 23:07:08 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316689

Log:
fix zts break in r316688

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/session/session.c
U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h
U   php/php-src/trunk/ext/session/session.c
U   php/php-src/trunk/ext/standard/basic_functions.c
U   php/php-src/trunk/ext/standard/basic_functions.h

Modified: php/php-src/branches/PHP_5_4/ext/session/session.c
===
--- php/php-src/branches/PHP_5_4/ext/session/session.c	2011-09-13 22:28:15 UTC (rev 316688)
+++ php/php-src/branches/PHP_5_4/ext/session/session.c	2011-09-13 23:07:08 UTC (rev 316689)
@@ -1638,7 +1638,7 @@
 			shutdown_function_entry.arguments[0] = callback;

 			/* add shutdown function, removing the old one if it exists */
-			if (!register_user_shutdown_function(session_shutdown, shutdown_function_entry)) {
+			if (!register_user_shutdown_function(session_shutdown, shutdown_function_entry TSRMLS_CC)) {
 zval_ptr_dtor(callback);
 efree(shutdown_function_entry.arguments);
 php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to register session shutdown function);
@@ -1646,7 +1646,7 @@
 			}
 		} else {
 			/* remove shutdown function */
-			remove_user_shutdown_function(session_shutdown);
+			remove_user_shutdown_function(session_shutdown TSRMLS_CC);
 		}

 		PS(mod_user_implemented) = 1;
@@ -1662,7 +1662,7 @@
 	}

 	/* remove shutdown function */
-	remove_user_shutdown_function(session_shutdown);
+	remove_user_shutdown_function(session_shutdown TSRMLS_CC);

 	for (i = 0; i  6; i++) {
 		if (!zend_is_callable(*args[i], 0, name TSRMLS_CC)) {
@@ -1946,7 +1946,7 @@
 	ZVAL_STRING(callback, session_write_close, 1);
 	shutdown_function_entry.arguments[0] = callback;

-	if (!append_user_shutdown_function(shutdown_function_entry)) {
+	if (!append_user_shutdown_function(shutdown_function_entry TSRMLS_CC)) {
 		zval_ptr_dtor(callback);
 		efree(shutdown_function_entry.arguments);


Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c	2011-09-13 22:28:15 UTC (rev 316688)
+++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c	2011-09-13 23:07:08 UTC (rev 316689)
@@ -5073,7 +5073,7 @@
 }
 /* }}} */

-PHPAPI zend_bool register_user_shutdown_function(char *function_name, php_shutdown_function_entry *shutdown_function_entry) /* {{{ */
+PHPAPI zend_bool register_user_shutdown_function(char *function_name, php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC) /* {{{ */
 {
 	if (!BG(user_shutdown_function_names)) {
 		ALLOC_HASHTABLE(BG(user_shutdown_function_names));
@@ -5084,7 +5084,7 @@
 }
 /* }}} */

-PHPAPI zend_bool remove_user_shutdown_function(char *function_name) /* {{{ */
+PHPAPI zend_bool remove_user_shutdown_function(char *function_name TSRMLS_DC) /* {{{ */
 {
 	if (BG(user_shutdown_function_names)) {
 		return zend_hash_del_key_or_index(BG(user_shutdown_function_names), function_name, sizeof(function_name), 0, HASH_DEL_KEY) != FAILURE;
@@ -5094,7 +5094,7 @@
 }
 /* }}} */

-PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry) /* {{{ */
+PHPAPI zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry TSRMLS_DC) /* {{{ */
 {
 	if (!BG(user_shutdown_function_names)) {
 		ALLOC_HASHTABLE(BG(user_shutdown_function_names));

Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h
===
--- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h	2011-09-13 22:28:15 UTC (rev 316688)
+++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h	2011-09-13 23:07:08 UTC (rev 316689)
@@ -256,8 +256,8 @@
 	int arg_count;
 } php_shutdown_function_entry;

-PHPAPI extern zend_bool register_user_shutdown_function(char *function_name, php_shutdown_function_entry *shutdown_function_entry);
-PHPAPI extern zend_bool remove_user_shutdown_function(char *function_name);
-PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry);
+PHPAPI extern zend_bool register_user_shutdown_function(char *function_name, php_shutdown_function_entry *shutdown_function_entry TSRMLS_DC);
+PHPAPI extern zend_bool remove_user_shutdown_function(char *function_name TSRMLS_DC);
+PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry TSRMLS_DC);

 #endif /* BASIC_FUNCTIONS_H */

Modified: php/php-src/trunk/ext/session/session.c
===
--- php/php-src/trunk/ext/session/session.c	2011-09-13 22:28:15 UTC 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Kalle Sommer Nielsen
Hi Arpad

2011/9/14 Arpad Ray ar...@php.net:
 arpad                                    Tue, 13 Sep 2011 22:28:15 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

 Log:
 Implement object-oriented session handlers 
 (https://wiki.php.net/rfc/session-oo)

Just by skimming over the patch, then all of those is most likely to
fail on Windows because you include the forward slash in the path for
error messages, whereas on Windows its a backslash.

So you want to use: %stestname.php instead

-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt trunk/ext/session/tests/session_set_save_handler_class_005.phpt

2011-09-13 Thread Arpad Ray
arpadWed, 14 Sep 2011 01:16:19 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316693

Log:
fix session oo tests for windows

Changed paths:
U   
php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
U   
php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt

Modified: 
php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
  2011-09-14 01:14:33 UTC (rev 316692)
+++ 
php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
  2011-09-14 01:16:19 UTC (rev 316693)
@@ -43,12 +43,12 @@
 --EXPECTF--
 *** Testing session_set_save_handler() : incomplete implementation ***

-Warning: SessionHandler::read(): Parent session handler is not open in 
%s/session_set_save_handler_class_005.php on line %d
+Warning: SessionHandler::read(): Parent session handler is not open in 
%ssession_set_save_handler_class_005.php on line %d
 string(32) %x
 string(4) user
 array(0) {
 }

-Warning: SessionHandler::write(): Parent session handler is not open in 
%s/session_set_save_handler_class_005.php on line %d
+Warning: SessionHandler::write(): Parent session handler is not open in 
%ssession_set_save_handler_class_005.php on line %d

-Warning: SessionHandler::close(): Parent session handler is not open in 
%s/session_set_save_handler_class_005.php on line %d
+Warning: SessionHandler::close(): Parent session handler is not open in 
%ssession_set_save_handler_class_005.php on line %d

Modified: 
php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt
===
--- php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt 
2011-09-14 01:14:33 UTC (rev 316692)
+++ php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt 
2011-09-14 01:16:19 UTC (rev 316693)
@@ -43,12 +43,12 @@
 --EXPECTF--
 *** Testing session_set_save_handler() : incomplete implementation ***

-Warning: SessionHandler::read(): Parent session handler is not open in 
%s/session_set_save_handler_class_005.php on line %d
+Warning: SessionHandler::read(): Parent session handler is not open in 
%ssession_set_save_handler_class_005.php on line %d
 string(32) %x
 string(4) user
 array(0) {
 }

-Warning: SessionHandler::write(): Parent session handler is not open in 
%s/session_set_save_handler_class_005.php on line %d
+Warning: SessionHandler::write(): Parent session handler is not open in 
%ssession_set_save_handler_class_005.php on line %d

-Warning: SessionHandler::close(): Parent session handler is not open in 
%s/session_set_save_handler_class_005.php on line %d
+Warning: SessionHandler::close(): Parent session handler is not open in 
%ssession_set_save_handler_class_005.php on line %d

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Arpad Ray
On Wed, Sep 14, 2011 at 1:12 AM, Kalle Sommer Nielsen ka...@php.net wrote:
 Hi Arpad

 2011/9/14 Arpad Ray ar...@php.net:
 arpad                                    Tue, 13 Sep 2011 22:28:15 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

 Log:
 Implement object-oriented session handlers 
 (https://wiki.php.net/rfc/session-oo)

 Just by skimming over the patch, then all of those is most likely to
 fail on Windows because you include the forward slash in the path for
 error messages, whereas on Windows its a backslash.

 So you want to use: %stestname.php instead

Thanks for pointing that out, I've just fixed that test file. :)
I haven't been able to test this at all under Windows yet so I'd be
very grateful for any further feedback.

Regards,

Arpad

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/mod_files.c branches/PHP_5_4/ext/session/tests/sessionhandler_open_001.phpt trunk/ext/session/mod_files.c trunk/ext/session/tests/sessionhandl

2011-09-13 Thread Felipe Pena
felipe   Wed, 14 Sep 2011 01:45:57 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316696

Log:
- Fixed memory leak when calling SessionHandler::open() several times

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/session/mod_files.c
A   
php/php-src/branches/PHP_5_4/ext/session/tests/sessionhandler_open_001.phpt
U   php/php-src/trunk/ext/session/mod_files.c
A   php/php-src/trunk/ext/session/tests/sessionhandler_open_001.phpt

Modified: php/php-src/branches/PHP_5_4/ext/session/mod_files.c
===
--- php/php-src/branches/PHP_5_4/ext/session/mod_files.c2011-09-14 
01:42:25 UTC (rev 316695)
+++ php/php-src/branches/PHP_5_4/ext/session/mod_files.c2011-09-14 
01:45:57 UTC (rev 316696)
@@ -311,6 +311,9 @@
data-basedir_len = strlen(save_path);
data-basedir = estrndup(save_path, data-basedir_len);

+   if (PS_GET_MOD_DATA()) {
+   ps_close_files(mod_data TSRMLS_CC);
+   }
PS_SET_MOD_DATA(data);

return SUCCESS;

Added: 
php/php-src/branches/PHP_5_4/ext/session/tests/sessionhandler_open_001.phpt
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/sessionhandler_open_001.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/sessionhandler_open_001.phpt 
2011-09-14 01:45:57 UTC (rev 316696)
@@ -0,0 +1,19 @@
+--TEST--
+Testing repated SessionHandler::open() calls
+--SKIPIF--
+?php include('skipif.inc'); ?
+--FILE--
+?php
+
+ini_set('session.save_handler', 'files');
+$x = new SessionHandler;
+$x-open('','');
+$x-open('','');
+$x-open('','');
+$x-open('','');
+
+print Done!\n;
+
+?
+--EXPECTF--
+Done!

Modified: php/php-src/trunk/ext/session/mod_files.c
===
--- php/php-src/trunk/ext/session/mod_files.c   2011-09-14 01:42:25 UTC (rev 
316695)
+++ php/php-src/trunk/ext/session/mod_files.c   2011-09-14 01:45:57 UTC (rev 
316696)
@@ -311,6 +311,9 @@
data-basedir_len = strlen(save_path);
data-basedir = estrndup(save_path, data-basedir_len);

+   if (PS_GET_MOD_DATA()) {
+   ps_close_files(mod_data TSRMLS_CC);
+   }
PS_SET_MOD_DATA(data);

return SUCCESS;

Added: php/php-src/trunk/ext/session/tests/sessionhandler_open_001.phpt
===
--- php/php-src/trunk/ext/session/tests/sessionhandler_open_001.phpt
(rev 0)
+++ php/php-src/trunk/ext/session/tests/sessionhandler_open_001.phpt
2011-09-14 01:45:57 UTC (rev 316696)
@@ -0,0 +1,19 @@
+--TEST--
+Testing repated SessionHandler::open() calls
+--SKIPIF--
+?php include('skipif.inc'); ?
+--FILE--
+?php
+
+ini_set('session.save_handler', 'files');
+$x = new SessionHandler;
+$x-open('','');
+$x-open('','');
+$x-open('','');
+$x-open('','');
+
+print Done!\n;
+
+?
+--EXPECTF--
+Done!

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Christopher Jones




On 09/13/2011 06:21 PM, Arpad Ray wrote:

On Wed, Sep 14, 2011 at 1:12 AM, Kalle Sommer Nielsenka...@php.net  wrote:

Hi Arpad

2011/9/14 Arpad Rayar...@php.net:

arpadTue, 13 Sep 2011 22:28:15 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

Log:
Implement object-oriented session handlers (https://wiki.php.net/rfc/session-oo)


Just by skimming over the patch, then all of those is most likely to
fail on Windows because you include the forward slash in the path for
error messages, whereas on Windows its a backslash.

So you want to use: %stestname.php instead


Thanks for pointing that out, I've just fixed that test file. :)
I haven't been able to test this at all under Windows yet so I'd be
very grateful for any further feedback.

Regards,

Arpad



Arpad,

These are now failing for me on Oracle Linux 5.7, 64 bit:

Test session_set_save_handler() : basic class wrapping existing handler 
[ext/session/tests/session_set_save_handler_class_001.phpt]
Test session_set_save_handler() : full handler implementation 
[ext/session/tests/session_set_save_handler_class_002.phpt]
Test session_set_save_handler() : inheritance 
[ext/session/tests/session_set_save_handler_class_003.phpt]
Test session_set_save_handler() : default object 
[ext/session/tests/session_set_save_handler_class_004.phpt]
Test session_set_save_handler() : incomplete implementation 
[ext/session/tests/session_set_save_handler_class_005.phpt]
Test session_set_save_handler() : manual shutdown, reopen 
[ext/session/tests/session_set_save_handler_class_007.phpt]
Test session_set_save_handler() : manual shutdown 
[ext/session/tests/session_set_save_handler_class_008.phpt]
Test session_set_save_handler() : implicit shutdown 
[ext/session/tests/session_set_save_handler_class_009.phpt]
Test session_set_save_handler() : manual shutdown function 
[ext/session/tests/session_set_save_handler_class_010.phpt]
Test session_set_save_handler() : incorrect arguments for existing handler open 
[ext/session/tests/session_set_save_handler_class_012.phpt]
Test session_set_save_handler() : incorrect arguments for existing handler 
close [ext/session/tests/session_set_save_handler_class_013.phpt]

A representative diff shows two kinds of issues:

003+ Read gjtkte0e3upfddc60pkuobqo40
004+ string(26) gjtkte0e3upfddc60pkuobqo40
003- Read %x
004- string(32) %x


Chris

--
Email: christopher.jo...@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug55509.phpt branches/PHP_5_3/Zend/zend_alloc.c branches/PHP_5_4/Zend/tests/bug55509.phpt branches/PHP_5_4/Zend/zend

2011-09-13 Thread Laruence
Hi:
   anyone has Zend karma,  plz help dmitry to fix this litte bug.

   specifically, change the expect warning to :

   Fatal error: Allowed memory size of %d bytes exhausted at %s (tried
to allocate %d bytes) in %s/bug55509.php on line %d

thanks

2011/9/14 Christopher Jones christopher.jo...@oracle.com:

 Dmitry,

 This is diffing for me in 5.4 (I've haven't looked at 5.3 or trunk):

 007+ Fatal error: Allowed memory size of 3221225472 bytes exhausted at
 /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/ext/standard/string.c:4636
 (tried to allocate 536870913 bytes) in
 /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/tests/bug55509.php on
 line 12
 007- Fatal error: Allowed memory size of %d bytes exhausted (tried to
 allocate %d bytes) in %s/bug55509.php on line %d

 Chris

 On 09/13/2011 12:01 AM, Dmitry Stogov wrote:

 dmitry                                   Tue, 13 Sep 2011 07:01:46 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316590

 Log:
 Fixed bug #55509 (segfault on x86_64 using more than 2G memory).
 (Laruence)

 Bug: https://bugs.php.net/55509 (Verified) segfault on x86_64 using more
 than 2G memory

 Changed paths:
     U   php/php-src/branches/PHP_5_3/NEWS
     A   php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
     U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
     A   php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
     U   php/php-src/branches/PHP_5_4/Zend/zend_alloc.c
     A   php/php-src/trunk/Zend/tests/bug55509.phpt
     U   php/php-src/trunk/Zend/zend_alloc.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-09-13 06:22:25 UTC (rev
 316589)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-09-13 07:01:46 UTC (rev
 316590)
 @@ -8,6 +8,7 @@
    . Fixed bug #55366: keys lost when using substr_replace an array.
 (Arpad)
    . Fixed bug #55510: $_FILES 'name' missing first character after
 upload.
      (Arpad)
 +  . Fixed bug #55509 (segfault on x86_64 using more than 2G memory).
 (Laruence)
    . Fixed bug #55576: Cannot conditionally move uploaded file without
 race
      condition. (Gustavo)
    . Fixed bug #55504 (Content-Type header is not parsed correctly on

 Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
 ===
 --- php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt
               (rev 0)
 +++ php/php-src/branches/PHP_5_3/Zend/tests/bug55509.phpt       2011-09-13
 07:01:46 UTC (rev 316590)
 @@ -0,0 +1,33 @@
 +--TEST--
 +Bug #55509 (segfault on x86_64 using more than 2G memory)
 +--SKIPIF--
 +?php
 +if (PHP_INT_SIZE == 4) {
 +  die('skip Not for 32-bits OS');
 +}
 +?
 +--INI--
 +memory_limit=3G
 +--FILE--
 +?php
 +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
 +echo 1\n;
 +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
 +echo 2\n;
 +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
 +echo 3\n;
 +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
 +echo 4\n;
 +$a5 = str_repeat(5, 1024 * 1024 * 1024 * 0.5);
 +echo 5\n;
 +$a6 = str_repeat(6, 1024 * 1024 * 1024 * 0.5);
 +echo 6\n;
 +?
 +--EXPECTF--
 +1
 +2
 +3
 +4
 +5
 +
 +Fatal error: Allowed memory size of %d bytes exhausted (tried to allocate
 %d bytes) in %s/bug55509.php on line %d

 Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c      2011-09-13
 06:22:25 UTC (rev 316589)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c      2011-09-13
 07:01:46 UTC (rev 316590)
 @@ -510,7 +510,7 @@
  #define ZEND_MM_IS_GUARD_BLOCK(b)             (((b)-info._size
  ZEND_MM_TYPE_MASK) == ZEND_MM_GUARD_BLOCK)

  #define ZEND_MM_NEXT_BLOCK(b)                 ZEND_MM_BLOCK_AT(b,
 ZEND_MM_BLOCK_SIZE(b))
 -#define ZEND_MM_PREV_BLOCK(b)                  ZEND_MM_BLOCK_AT(b,
 -(int)((b)-info._prev  ~ZEND_MM_TYPE_MASK))
 +#define ZEND_MM_PREV_BLOCK(b)                  ZEND_MM_BLOCK_AT(b,
 -(ssize_t)((b)-info._prev  ~ZEND_MM_TYPE_MASK))

  #define ZEND_MM_PREV_BLOCK_IS_FREE(b) (!((b)-info._prev
  ZEND_MM_USED_BLOCK))


 Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
 ===
 --- php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt
               (rev 0)
 +++ php/php-src/branches/PHP_5_4/Zend/tests/bug55509.phpt       2011-09-13
 07:01:46 UTC (rev 316590)
 @@ -0,0 +1,33 @@
 +--TEST--
 +Bug #55509 (segfault on x86_64 using more than 2G memory)
 +--SKIPIF--
 +?php
 +if (PHP_INT_SIZE == 4) {
 +  die('skip Not for 32-bits OS');
 +}
 +?
 +--INI--
 +memory_limit=3G
 +--FILE--
 +?php
 +$a1 = str_repeat(1, 1024 * 1024 * 1024 * 0.5);
 +echo 1\n;
 +$a2 = str_repeat(2, 1024 * 1024 * 1024 * 0.5);
 +echo 2\n;
 +$a3 = str_repeat(3, 1024 * 1024 * 1024 * 0.5);
 +echo 3\n;
 +$a4 = str_repeat(4, 1024 * 1024 * 1024 * 0.5);
 +echo 4\n;
 +$a5 = 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/fileinfo/libmagic/print.c branches/PHP_5_4/ext/fileinfo/libmagic/print.c trunk/ext/fileinfo/libmagic/print.c

2011-09-13 Thread Xinchen Hui
laruence Wed, 14 Sep 2011 02:19:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316700

Log:
Fix warning implicit declaration of function `vasprintf'

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/print.c
U   php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/print.c
U   php/php-src/trunk/ext/fileinfo/libmagic/print.c

Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/print.c
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/print.c  2011-09-14 
01:53:51 UTC (rev 316699)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/print.c  2011-09-14 
02:19:22 UTC (rev 316700)
@@ -30,6 +30,7 @@
  */

 #include php.h
+#include main/snprintf.h

 #include file.h


Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/print.c
===
--- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/print.c  2011-09-14 
01:53:51 UTC (rev 316699)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/print.c  2011-09-14 
02:19:22 UTC (rev 316700)
@@ -30,6 +30,7 @@
  */

 #include php.h
+#include main/snprintf.h

 #include file.h


Modified: php/php-src/trunk/ext/fileinfo/libmagic/print.c
===
--- php/php-src/trunk/ext/fileinfo/libmagic/print.c 2011-09-14 01:53:51 UTC 
(rev 316699)
+++ php/php-src/trunk/ext/fileinfo/libmagic/print.c 2011-09-14 02:19:22 UTC 
(rev 316700)
@@ -30,6 +30,7 @@
  */

 #include php.h
+#include main/snprintf.h

 #include file.h


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Laruence
Hi:
trunk build broken:
ext/session/session.o(.rodata+0x24a8): undefined reference to
`zim_SessionHandler_open'
ext/session/session.o(.rodata+0x24c8): undefined reference to
`zim_SessionHandler_close'
ext/session/session.o(.rodata+0x24e8): undefined reference to
`zim_SessionHandler_read'
ext/session/session.o(.rodata+0x2508): undefined reference to
`zim_SessionHandler_write'
ext/session/session.o(.rodata+0x2528): undefined reference to
`zim_SessionHandler_destroy'
ext/session/session.o(.rodata+0x2548): undefined reference to
`zim_SessionHandler_gc'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs
ext/session/session.o(.rodata+0x24a8): undefined reference to
`zim_SessionHandler_open'
ext/session/session.o(.rodata+0x24c8): undefined reference to
`zim_SessionHandler_close'
ext/session/session.o(.rodata+0x24e8): undefined reference to
`zim_SessionHandler_read'
ext/session/session.o(.rodata+0x2508): undefined reference to
`zim_SessionHandler_write'
ext/session/session.o(.rodata+0x2528): undefined reference to
`zim_SessionHandler_destroy'
ext/session/session.o(.rodata+0x2548): undefined reference to
`zim_SessionHandler_gc'

thanks

2011/9/14 Arpad Ray ar...@php.net:
 arpad                                    Tue, 13 Sep 2011 22:28:15 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

 Log:
 Implement object-oriented session handlers 
 (https://wiki.php.net/rfc/session-oo)

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/session/config.m4
    U   php/php-src/branches/PHP_5_4/ext/session/config.w32
    U   php/php-src/branches/PHP_5_4/ext/session/mod_user.c
    A   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
    U   php/php-src/branches/PHP_5_4/ext/session/package.xml
    U   php/php-src/branches/PHP_5_4/ext/session/php_session.h
    U   php/php-src/branches/PHP_5_4/ext/session/session.c
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_012.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_013.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_014.phpt
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h
    U   php/php-src/trunk/ext/session/config.m4
    U   php/php-src/trunk/ext/session/config.w32
    U   php/php-src/trunk/ext/session/mod_user.c
    A   php/php-src/trunk/ext/session/mod_user_class.c
    U   php/php-src/trunk/ext/session/package.xml
    U   php/php-src/trunk/ext/session/php_session.h
    U   php/php-src/trunk/ext/session/session.c
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_012.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_013.phpt
    A   
 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/config.m4 branches/PHP_5_4/ext/session/config.w32 branches/PHP_5_4/ext/session/mod_user.c branches/PHP_5_4/ext/sessi

2011-09-13 Thread Laruence
Hi:
  after I re-run buildconf, error has gone

  sorry for mis-report.

thanks

2011/9/14 Laruence larue...@php.net:
 Hi:
    trunk build broken:
    ext/session/session.o(.rodata+0x24a8): undefined reference to
 `zim_SessionHandler_open'
 ext/session/session.o(.rodata+0x24c8): undefined reference to
 `zim_SessionHandler_close'
 ext/session/session.o(.rodata+0x24e8): undefined reference to
 `zim_SessionHandler_read'
 ext/session/session.o(.rodata+0x2508): undefined reference to
 `zim_SessionHandler_write'
 ext/session/session.o(.rodata+0x2528): undefined reference to
 `zim_SessionHandler_destroy'
 ext/session/session.o(.rodata+0x2548): undefined reference to
 `zim_SessionHandler_gc'
 collect2: ld returned 1 exit status
 make: *** [sapi/cli/php] Error 1
 make: *** Waiting for unfinished jobs
 ext/session/session.o(.rodata+0x24a8): undefined reference to
 `zim_SessionHandler_open'
 ext/session/session.o(.rodata+0x24c8): undefined reference to
 `zim_SessionHandler_close'
 ext/session/session.o(.rodata+0x24e8): undefined reference to
 `zim_SessionHandler_read'
 ext/session/session.o(.rodata+0x2508): undefined reference to
 `zim_SessionHandler_write'
 ext/session/session.o(.rodata+0x2528): undefined reference to
 `zim_SessionHandler_destroy'
 ext/session/session.o(.rodata+0x2548): undefined reference to
 `zim_SessionHandler_gc'

 thanks

 2011/9/14 Arpad Ray ar...@php.net:
 arpad                                    Tue, 13 Sep 2011 22:28:15 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316688

 Log:
 Implement object-oriented session handlers 
 (https://wiki.php.net/rfc/session-oo)

 Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/ext/session/config.m4
    U   php/php-src/branches/PHP_5_4/ext/session/config.w32
    U   php/php-src/branches/PHP_5_4/ext/session/mod_user.c
    A   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
    U   php/php-src/branches/PHP_5_4/ext/session/package.xml
    U   php/php-src/branches/PHP_5_4/ext/session/php_session.h
    U   php/php-src/branches/PHP_5_4/ext/session/session.c
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_012.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_013.phpt
    A   
 php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_class_014.phpt
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
    U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.h
    U   php/php-src/trunk/ext/session/config.m4
    U   php/php-src/trunk/ext/session/config.w32
    U   php/php-src/trunk/ext/session/mod_user.c
    A   php/php-src/trunk/ext/session/mod_user_class.c
    U   php/php-src/trunk/ext/session/package.xml
    U   php/php-src/trunk/ext/session/php_session.h
    U   php/php-src/trunk/ext/session/session.c
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_001.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_002.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_003.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_004.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_005.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_006.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_007.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_008.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_009.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_010.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_011.phpt
    A   
 php/php-src/trunk/ext/session/tests/session_set_save_handler_class_012.phpt
    A  

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/mod_user_class.c trunk/ext/session/mod_user_class.c

2011-09-13 Thread Xinchen Hui
laruence Wed, 14 Sep 2011 04:10:45 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316711

Log:
Fix bug #55688 (Crash when calling SessionHandler::gc())
Need arpad to review this change

Bug: https://bugs.php.net/55688 (Open) Crash when calling SessionHandler::gc()
  
Changed paths:
U   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
U   php/php-src/trunk/ext/session/mod_user_class.c

Modified: php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
===
--- php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2011-09-14 
04:06:32 UTC (rev 316710)
+++ php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2011-09-14 
04:10:45 UTC (rev 316711)
@@ -133,7 +133,7 @@
long maxlifetime;
int nrdels;

-   PS_SANITY_CHECK;
+   PS_SANITY_CHECK_IS_OPEN;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, maxlifetime) 
== FAILURE) {
return;

Modified: php/php-src/trunk/ext/session/mod_user_class.c
===
--- php/php-src/trunk/ext/session/mod_user_class.c  2011-09-14 04:06:32 UTC 
(rev 316710)
+++ php/php-src/trunk/ext/session/mod_user_class.c  2011-09-14 04:10:45 UTC 
(rev 316711)
@@ -133,7 +133,7 @@
long maxlifetime;
int nrdels;

-   PS_SANITY_CHECK;
+   PS_SANITY_CHECK_IS_OPEN;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, maxlifetime) 
== FAILURE) {
return;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/mod_user_class.c trunk/ext/session/mod_user_class.c

2011-09-13 Thread Laruence
Hi:
   arpad, plz review this change,
   and btw, most mod_use_class phpt test failed in my environ
due to %x, like:

003+ Read 2dv964ea5joi1pah2nad6e3pm5
004+ string(26) 2dv964ea5joi1pah2nad6e3pm5
003- Read %x
004- string(32) %x

thanks

2011/9/14 Xinchen Hui larue...@php.net:
 laruence                                 Wed, 14 Sep 2011 04:10:45 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=316711

 Log:
 Fix bug #55688 (Crash when calling SessionHandler::gc())
 Need arpad to review this change

 Bug: https://bugs.php.net/55688 (Open) Crash when calling SessionHandler::gc()

 Changed paths:
    U   php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
    U   php/php-src/trunk/ext/session/mod_user_class.c

 Modified: php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2011-09-14 
 04:06:32 UTC (rev 316710)
 +++ php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2011-09-14 
 04:10:45 UTC (rev 316711)
 @@ -133,7 +133,7 @@
        long maxlifetime;
        int nrdels;

 -       PS_SANITY_CHECK;
 +       PS_SANITY_CHECK_IS_OPEN;

        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, 
 maxlifetime) == FAILURE) {
                return;

 Modified: php/php-src/trunk/ext/session/mod_user_class.c
 ===
 --- php/php-src/trunk/ext/session/mod_user_class.c      2011-09-14 04:06:32 
 UTC (rev 316710)
 +++ php/php-src/trunk/ext/session/mod_user_class.c      2011-09-14 04:10:45 
 UTC (rev 316711)
 @@ -133,7 +133,7 @@
        long maxlifetime;
        int nrdels;

 -       PS_SANITY_CHECK;
 +       PS_SANITY_CHECK_IS_OPEN;

        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, 
 maxlifetime) == FAILURE) {
                return;


 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/session/tests/bug55688.phpt trunk/ext/session/tests/bug55688.phpt

2011-09-13 Thread Xinchen Hui
laruence Wed, 14 Sep 2011 05:02:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316714

Log:
Add test for bug #55688

Bug: https://bugs.php.net/55688 (Open) Crash when calling SessionHandler::gc()
  
Changed paths:
A   php/php-src/branches/PHP_5_4/ext/session/tests/bug55688.phpt
A   php/php-src/trunk/ext/session/tests/bug55688.phpt

Added: php/php-src/branches/PHP_5_4/ext/session/tests/bug55688.phpt
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/bug55688.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/bug55688.phpt
2011-09-14 05:02:50 UTC (rev 316714)
@@ -0,0 +1,15 @@
+--TEST--
+Bug #55688 (Crash when calling SessionHandler::gc())
+--SKIPIF--
+?php include('skipif.inc'); ?
+--INI--
+html_errors=0
+session.save_handler=files
+--FILE--
+?php
+ini_set('session.save_handler', 'files');
+$x = new SessionHandler;
+$x-gc(1);
+?
+--EXPECTF--
+Warning: SessionHandler::gc(): Parent session handler is not open in %s on 
line %d

Added: php/php-src/trunk/ext/session/tests/bug55688.phpt
===
--- php/php-src/trunk/ext/session/tests/bug55688.phpt   
(rev 0)
+++ php/php-src/trunk/ext/session/tests/bug55688.phpt   2011-09-14 05:02:50 UTC 
(rev 316714)
@@ -0,0 +1,15 @@
+--TEST--
+Bug #55688 (Crash when calling SessionHandler::gc())
+--SKIPIF--
+?php include('skipif.inc'); ?
+--INI--
+html_errors=0
+session.save_handler=files
+--FILE--
+?php
+ini_set('session.save_handler', 'files');
+$x = new SessionHandler;
+$x-gc(1);
+?
+--EXPECTF--
+Warning: SessionHandler::gc(): Parent session handler is not open in %s on 
line %d

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php