Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/tests/lang/ 019.phpt

2012-01-03 Thread Nuno Lopes

Gah, thank you!
Nuno

- Original Message -

sheinMon, 02 Jan 2012 20:02:21 +

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

Log:
Fixed broken test (different error message wording in 5.3 branch)

Changed paths:
   U   php/php-src/branches/PHP_5_3/tests/lang/019.phpt

Modified: php/php-src/branches/PHP_5_3/tests/lang/019.phpt
===
--- php/php-src/branches/PHP_5_3/tests/lang/019.phpt 2012-01-02 18:49:33 
UTC (rev 321693)
+++ php/php-src/branches/PHP_5_3/tests/lang/019.phpt 2012-01-02 20:02:21 
UTC (rev 321694)

@@ -35,4 +35,4 @@
hey, this is a regular echo'd eval()
hey, this is a function inside an eval()!

-Parse error: syntax error, unexpected end of file in %s019.php(12) : 
eval()'d code on line 1
+Parse error: syntax error, unexpected $end in %s019.php(12) : eval()'d 
code on line 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/ext/session/tests/bug60634.phpt branches/PHP_5_4/ext/session/tests/bug60634.phpt trunk/ext/session/tests/bug60634.phpt

2012-01-03 Thread Arpad Ray
arpadTue, 03 Jan 2012 21:47:16 +

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

Log:
add test for #60634

Bug: https://bugs.php.net/60634 (Verified) Segmentation fault when trying to 
die() in SessionHandler::write()
  
Changed paths:
A   php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt
A   php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt
A   php/php-src/trunk/ext/session/tests/bug60634.phpt

Added: php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt
===
--- php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt
2012-01-03 21:47:16 UTC (rev 321733)
@@ -0,0 +1,45 @@
+--TEST--
+Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+?php include('skipif.inc'); ?
+--FILE--
+?php
+
+ob_start();
+
+function open($save_path, $session_name) {
+return true;
+}
+
+function close() {
+   die(close: goodbye cruel world\n);
+}
+
+function read($id) {
+   return '';
+}
+
+function write($id, $session_data) {
+   die(write: goodbye cruel world\n);
+}
+
+function destroy($id) {
+return true;
+}
+
+function gc($maxlifetime) {
+return true;
+}
+
+session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+session_start();
+session_write_close();
+echo um, hi\n;
+
+?
+--EXPECTF--
+write: goodbye cruel world
+close: goodbye cruel world

Added: php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt
2012-01-03 21:47:16 UTC (rev 321733)
@@ -0,0 +1,45 @@
+--TEST--
+Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+?php include('skipif.inc'); ?
+--FILE--
+?php
+
+ob_start();
+
+function open($save_path, $session_name) {
+return true;
+}
+
+function close() {
+   die(close: goodbye cruel world\n);
+}
+
+function read($id) {
+   return '';
+}
+
+function write($id, $session_data) {
+   die(write: goodbye cruel world\n);
+}
+
+function destroy($id) {
+return true;
+}
+
+function gc($maxlifetime) {
+return true;
+}
+
+session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+session_start();
+session_write_close();
+echo um, hi\n;
+
+?
+--EXPECTF--
+write: goodbye cruel world
+close: goodbye cruel world

Added: php/php-src/trunk/ext/session/tests/bug60634.phpt
===
--- php/php-src/trunk/ext/session/tests/bug60634.phpt   
(rev 0)
+++ php/php-src/trunk/ext/session/tests/bug60634.phpt   2012-01-03 21:47:16 UTC 
(rev 321733)
@@ -0,0 +1,45 @@
+--TEST--
+Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
+--INI--
+session.save_path=
+session.name=PHPSESSID
+--SKIPIF--
+?php include('skipif.inc'); ?
+--FILE--
+?php
+
+ob_start();
+
+function open($save_path, $session_name) {
+return true;
+}
+
+function close() {
+   die(close: goodbye cruel world\n);
+}
+
+function read($id) {
+   return '';
+}
+
+function write($id, $session_data) {
+   die(write: goodbye cruel world\n);
+}
+
+function destroy($id) {
+return true;
+}
+
+function gc($maxlifetime) {
+return true;
+}
+
+session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+session_start();
+session_write_close();
+echo um, hi\n;
+
+?
+--EXPECTF--
+write: goodbye cruel world
+close: goodbye cruel world

-- 
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 branches/PHP_5_3/sapi/fpm/fpm/fastcgi.c branches/PHP_5_3/sapi/fpm/fpm/fastcgi.h branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c branches/PHP_5_4/NEWS branch

2012-01-03 Thread Jérôme Loyet
fat  Tue, 03 Jan 2012 22:26:11 +

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

Log:
- Fixed bug #60629 (memory corruption when web server closed the fcgi fd)

Bug: https://bugs.php.net/60629 (Feedback) memory corruption when web server 
closed the fcgi fd(?)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.c
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.h
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c
U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.h
U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
U   php/php-src/trunk/sapi/fpm/fpm/fastcgi.c
U   php/php-src/trunk/sapi/fpm/fpm/fastcgi.h
U   php/php-src/trunk/sapi/fpm/fpm/fpm_main.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-01-03 21:47:16 UTC (rev 321733)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-01-03 22:26:11 UTC (rev 321734)
@@ -19,7 +19,11 @@
   . Fixed bug #48877 (bindValue and bindParam do not work for PDO 
Firebird).
 (Mariuz)

+- PHP-FPM SAPI:
+  . Fixed bug #60629 (memory corruption when web server closed the fcgi fd).
+(fat)

+
 08 Dec 2011, PHP 5.3.9RC3

 - Filter:

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.c 2012-01-03 21:47:16 UTC 
(rev 321733)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.c 2012-01-03 22:26:11 UTC 
(rev 321734)
@@ -946,7 +946,7 @@
return 1;
 }

-int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int 
len)
+ssize_t fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, 
int len)
 {
int limit, rest;


Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.h
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.h 2012-01-03 21:47:16 UTC 
(rev 321733)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fastcgi.h 2012-01-03 22:26:11 UTC 
(rev 321734)
@@ -127,7 +127,7 @@

 int fcgi_read(fcgi_request *req, char *str, int len);

-int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int 
len);
+ssize_t fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, 
int len);
 int fcgi_flush(fcgi_request *req, int close);

 void fcgi_set_mgmt_var(const char * name, size_t name_len, const char * value, 
size_t value_len);

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c2012-01-03 
21:47:16 UTC (rev 321733)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_main.c2012-01-03 
22:26:11 UTC (rev 321734)
@@ -268,7 +268,7 @@

 static inline size_t sapi_cgibin_single_write(const char *str, uint str_length 
TSRMLS_DC)
 {
-   size_t ret;
+   ssize_t ret;

/* sapi has started which means everyhting must be send through fcgi */
if (fpm_is_running) {
@@ -277,7 +277,7 @@
if (ret = 0) {
return 0;
}
-   return ret;
+   return (size_t)ret;
}

/* sapi has not started, output to stdout instead of fcgi */
@@ -286,7 +286,7 @@
if (ret = 0) {
return 0;
}
-   return ret;
+   return (size_t)ret;
 #else
return fwrite(str, 1, MIN(str_length, 16384), stdout);
 #endif

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-01-03 21:47:16 UTC (rev 321733)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-01-03 22:26:11 UTC (rev 321734)
@@ -18,7 +18,11 @@
 - Intl:
   . Fixed build on Fedora 15 / Ubuntu 11. (Hannes)

+- PHP-FPM SAPI:
+  . Fixed bug #60629 (memory corruption when web server closed the fcgi fd).
+(fat)

+
 22 Dec 2011, PHP 5.4.0 RC4
 - Core:
   . Added max_input_vars directive to prevent attacks based on hash collisions

Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c
===
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c 2012-01-03 21:47:16 UTC 
(rev 321733)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fastcgi.c 2012-01-03 22:26:11 UTC 
(rev 321734)
@@ -946,7 +946,7 @@
return 1;
 }

-int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int 
len)
+ssize_t fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, 
int len)
 {
int limit, rest;


Modified: 

[PHP-CVS] svn: /SVNROOT/ global_avail

2012-01-03 Thread Pierre Joye
pajoye   Tue, 03 Jan 2012 23:46:44 +

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

Log:
- Jenny access to wincache

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2012-01-03 22:26:11 UTC (rev 321734)
+++ SVNROOT/global_avail2012-01-03 23:46:44 UTC (rev 321735)
@@ -325,7 +325,7 @@
 avail|basantk|pecl/memsession
 avail|devour|pecl/geoip
 avail|iekpo|pecl/solr,phpdoc
-avail|ruslany,ksingla,donraman|pecl/wincache,phpdoc
+avail|ruslany,ksingla,donraman,jennylaw|pecl/wincache,phpdoc
 avail|pierrick|pecl/stomp,phpdoc,php/php-src/branches/LEMON
 avail|cyberspice|pecl/dio,pecl/framegrab,phpdoc,pecl/dbus
 avail|crodas|pecl/textcat,phpdoc

-- 
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/php_session.h branches/PHP_5_4/ext/session/session.c branches/PHP_5_4/ext/session/tests/session_set_save_handler_iface_001.phpt branches/PHP_5

2012-01-03 Thread Arpad Ray
arpadWed, 04 Jan 2012 01:16:45 +

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

Log:
add SessionHandlerInterface for session_set_save_handler() - #60551

Bug: https://bugs.php.net/60551 (Duplicate) session_set_save_handler should 
support a core's session handler interface
  
Changed paths:
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_iface_001.phpt
A   
php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_iface_002.phpt
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_iface_001.phpt
A   
php/php-src/trunk/ext/session/tests/session_set_save_handler_iface_002.phpt

Modified: php/php-src/branches/PHP_5_4/ext/session/php_session.h
===
--- php/php-src/branches/PHP_5_4/ext/session/php_session.h	2012-01-04 00:32:05 UTC (rev 321737)
+++ php/php-src/branches/PHP_5_4/ext/session/php_session.h	2012-01-04 01:16:45 UTC (rev 321738)
@@ -274,6 +274,9 @@
 #define PS_CLASS_NAME SessionHandler
 extern zend_class_entry *php_session_class_entry;

+#define PS_IFACE_NAME SessionHandlerInterface
+extern zend_class_entry *php_session_iface_entry;
+
 extern PHP_METHOD(SessionHandler, open);
 extern PHP_METHOD(SessionHandler, close);
 extern PHP_METHOD(SessionHandler, read);

Modified: php/php-src/branches/PHP_5_4/ext/session/session.c
===
--- php/php-src/branches/PHP_5_4/ext/session/session.c	2012-01-04 00:32:05 UTC (rev 321737)
+++ php/php-src/branches/PHP_5_4/ext/session/session.c	2012-01-04 01:16:45 UTC (rev 321738)
@@ -67,6 +67,9 @@
 /* SessionHandler class */
 zend_class_entry *php_session_class_entry;

+/* SessionHandlerInterface */
+zend_class_entry *php_session_iface_entry;
+
 /* ***
* Helpers *
*** */
@@ -1598,8 +1601,8 @@
 		php_shutdown_function_entry shutdown_function_entry;
 		zend_bool register_shutdown = 1;

-		if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, O|b, obj, php_session_class_entry, register_shutdown) == FAILURE) {
-			return;
+		if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, O|b, obj, php_session_iface_entry, register_shutdown) == FAILURE) {
+			RETURN_FALSE;
 		}

 		/* Find implemented methods */
@@ -1673,7 +1676,6 @@
 		efree(name);
 	}

-
 	if (PS(mod)  PS(mod) != ps_mod_user) {
 		zend_alter_ini_entry(session.save_handler, sizeof(session.save_handler), user, sizeof(user)-1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
 	}
@@ -2065,7 +2067,20 @@
 };
 /* }}} */

-/* {{{ session class functions[]
+/* {{{ SessionHandlerInterface functions[]
+*/
+static const zend_function_entry php_session_iface_functions[] = {
+	PHP_ABSTRACT_ME(SessionHandlerInterface, open, arginfo_session_class_open)
+	PHP_ABSTRACT_ME(SessionHandlerInterface, close, arginfo_session_class_close)
+	PHP_ABSTRACT_ME(SessionHandlerInterface, read, arginfo_session_class_read)
+	PHP_ABSTRACT_ME(SessionHandlerInterface, write, arginfo_session_class_write)
+	PHP_ABSTRACT_ME(SessionHandlerInterface, destroy, arginfo_session_class_destroy)
+	PHP_ABSTRACT_ME(SessionHandlerInterface, gc, arginfo_session_class_gc)
+	{ NULL, NULL, NULL }
+};
+/* }}} */
+
+/* {{{ SessionHandler functions[]
  */
 static const zend_function_entry php_session_class_functions[] = {
 	PHP_ME(SessionHandler, open, arginfo_session_class_open, ZEND_ACC_PUBLIC)
@@ -2180,9 +2195,15 @@
 	php_session_rfc1867_orig_callback = php_rfc1867_callback;
 	php_rfc1867_callback = php_session_rfc1867_callback;

+	/* Register interface */
+	INIT_CLASS_ENTRY(ce, PS_IFACE_NAME, php_session_iface_functions);
+	php_session_iface_entry = zend_register_internal_class(ce TSRMLS_CC);
+	php_session_iface_entry-ce_flags |= ZEND_ACC_INTERFACE;
+
 	/* Register base class */
 	INIT_CLASS_ENTRY(ce, PS_CLASS_NAME, php_session_class_functions);
 	php_session_class_entry = zend_register_internal_class(ce TSRMLS_CC);
+	zend_class_implements(php_session_class_entry TSRMLS_CC, 1, php_session_iface_entry);

 	REGISTER_LONG_CONSTANT(PHP_SESSION_DISABLED, php_session_disabled, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT(PHP_SESSION_NONE, php_session_none, CONST_CS | CONST_PERSISTENT);

Added: php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_iface_001.phpt
===
--- php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_iface_001.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/session_set_save_handler_iface_001.phpt	2012-01-04 01:16:45 UTC (rev 321738)
@@ -0,0 +1,113 @@
+--TEST--
+Test session_set_save_handler() function: interface
+--INI--

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

2012-01-03 Thread Arpad Ray
arpadWed, 04 Jan 2012 01:31:30 +

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

Log:
fix return values of inherited session handler to match user handlers - #60640

Bug: https://bugs.php.net/60640 (Assigned) Invalid return values
  
Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS
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/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-01-04 01:22:15 UTC (rev 321740)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-01-04 01:31:30 UTC (rev 321741)
@@ -22,6 +22,8 @@
   . Fixed bug #60629 (memory corruption when web server closed the fcgi fd).
 (fat)

+- Improved Session extension:
+  . Fixed bug #60640 (invalid return values). (Arpad)

 22 Dec 2011, PHP 5.4.0 RC4
 - Core:

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   2012-01-04 
01:22:15 UTC (rev 321740)
+++ php/php-src/branches/PHP_5_4/ext/session/mod_user_class.c   2012-01-04 
01:31:30 UTC (rev 321741)
@@ -48,7 +48,7 @@
}

PS(mod_user_is_open) = 1;
-   RETVAL_LONG(PS(default_mod)-s_open(PS(mod_data), save_path, 
session_name TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_open(PS(mod_data), 
save_path, session_name TSRMLS_CC));
 }
 /* }}} */

@@ -63,7 +63,7 @@
zend_parse_parameters_none();

PS(mod_user_is_open) = 0;
-   RETVAL_LONG(PS(default_mod)-s_close(PS(mod_data) TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_close(PS(mod_data) 
TSRMLS_CC));
 }
 /* }}} */

@@ -104,7 +104,7 @@
return;
}

-   RETVAL_LONG(PS(default_mod)-s_write(PS(mod_data), key, val, val_len 
TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_write(PS(mod_data), key, 
val, val_len TSRMLS_CC));
 }
 /* }}} */

@@ -122,7 +122,7 @@
}

PS(mod_user_is_open) = 0;
-   RETVAL_LONG(PS(default_mod)-s_destroy(PS(mod_data), key TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_destroy(PS(mod_data), key 
TSRMLS_CC));
 }
 /* }}} */

@@ -139,6 +139,6 @@
return;
}

-   RETVAL_LONG(PS(default_mod)-s_gc(PS(mod_data), maxlifetime, nrdels 
TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_gc(PS(mod_data), 
maxlifetime, nrdels TSRMLS_CC));
 }
 /* }}} */

Modified: php/php-src/trunk/ext/session/mod_user_class.c
===
--- php/php-src/trunk/ext/session/mod_user_class.c  2012-01-04 01:22:15 UTC 
(rev 321740)
+++ php/php-src/trunk/ext/session/mod_user_class.c  2012-01-04 01:31:30 UTC 
(rev 321741)
@@ -48,7 +48,7 @@
}

PS(mod_user_is_open) = 1;
-   RETVAL_LONG(PS(default_mod)-s_open(PS(mod_data), save_path, 
session_name TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_open(PS(mod_data), 
save_path, session_name TSRMLS_CC));
 }
 /* }}} */

@@ -63,7 +63,7 @@
zend_parse_parameters_none();

PS(mod_user_is_open) = 0;
-   RETVAL_LONG(PS(default_mod)-s_close(PS(mod_data) TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_close(PS(mod_data) 
TSRMLS_CC));
 }
 /* }}} */

@@ -104,7 +104,7 @@
return;
}

-   RETVAL_LONG(PS(default_mod)-s_write(PS(mod_data), key, val, val_len 
TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_write(PS(mod_data), key, 
val, val_len TSRMLS_CC));
 }
 /* }}} */

@@ -122,7 +122,7 @@
}

PS(mod_user_is_open) = 0;
-   RETVAL_LONG(PS(default_mod)-s_destroy(PS(mod_data), key TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_destroy(PS(mod_data), key 
TSRMLS_CC));
 }
 /* }}} */

@@ -139,6 +139,6 @@
return;
}

-   RETVAL_LONG(PS(default_mod)-s_gc(PS(mod_data), maxlifetime, nrdels 
TSRMLS_CC));
+   RETVAL_BOOL(SUCCESS == PS(default_mod)-s_gc(PS(mod_data), 
maxlifetime, nrdels TSRMLS_CC));
 }
 /* }}} */

-- 
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

2012-01-03 Thread Arpad Ray
arpadWed, 04 Jan 2012 01:34:08 +

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

Log:
NEWS entry for r321738

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   2012-01-04 01:31:30 UTC (rev 321741)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-01-04 01:34:08 UTC (rev 321742)
@@ -24,6 +24,8 @@

 - Improved Session extension:
   . Fixed bug #60640 (invalid return values). (Arpad)
+  . Implement FR #60551 (session_set_save_handler should support a core's
+session handler interface). (Arpad)

 22 Dec 2011, PHP 5.4.0 RC4
 - Core:

-- 
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/tests/lang/ 019.phpt

2012-01-03 Thread Alexey Shein
2012/1/4 Nuno Lopes nlop...@php.net:
 Gah, thank you!
 Nuno


You're welcome.
Could you please also look at this failing test:
http://ci.qa.php.net/job/php-src-trunk-matrix-build/architecture=x86,os=linux-debian-6.0/lastCompletedBuild/testReport/php-src.ext.standard.tests/general_functions/bug39322_phpt___Bug__39322__proc_terminate___loosing_process_resource_/
it seems that you worked on it according to
https://bugs.php.net/bug.php?id=39322. It fails only on 32-bit build,
i can't fail it on my ubuntu-amd64.
Thank you.

 - Original Message -

 shein                                    Mon, 02 Jan 2012 20:02:21 +

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

 Log:
 Fixed broken test (different error message wording in 5.3 branch)

 Changed paths:
   U   php/php-src/branches/PHP_5_3/tests/lang/019.phpt

 Modified: php/php-src/branches/PHP_5_3/tests/lang/019.phpt
 ===
 --- php/php-src/branches/PHP_5_3/tests/lang/019.phpt 2012-01-02 18:49:33
 UTC (rev 321693)
 +++ php/php-src/branches/PHP_5_3/tests/lang/019.phpt 2012-01-02 20:02:21
 UTC (rev 321694)
 @@ -35,4 +35,4 @@
 hey, this is a regular echo'd eval()
 hey, this is a function inside an eval()!

 -Parse error: syntax error, unexpected end of file in %s019.php(12) :
 eval()'d code on line 1
 +Parse error: syntax error, unexpected $end in %s019.php(12) : eval()'d
 code on line 1





-- 
Regards,
Shein Alexey

--
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/ext/session/tests/bug60634.phpt branches/PHP_5_4/ext/session/tests/bug60634.phpt trunk/ext/session/tests/bug60634.phpt

2012-01-03 Thread Alexey Shein
Hello, Arpad,

Could you add XFAIL section to your test since it's failing on all
branches (as can be seen for example here:
http://ci.qa.php.net/job/php-src-trunk-matrix-build/architecture=x86,os=linux-debian-6.0/lastCompletedBuild/testReport/)
or, which is better, fix it :)
Thank you.

2012/1/4 Arpad Ray ar...@php.net:
 arpad                                    Tue, 03 Jan 2012 21:47:16 +

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

 Log:
 add test for #60634

 Bug: https://bugs.php.net/60634 (Verified) Segmentation fault when trying to 
 die() in SessionHandler::write()

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

 Added: php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt
 ===
 --- php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt              
                   (rev 0)
 +++ php/php-src/branches/PHP_5_3/ext/session/tests/bug60634.phpt        
 2012-01-03 21:47:16 UTC (rev 321733)
 @@ -0,0 +1,45 @@
 +--TEST--
 +Bug #60634 (Segmentation fault when trying to die() in 
 SessionHandler::write())
 +--INI--
 +session.save_path=
 +session.name=PHPSESSID
 +--SKIPIF--
 +?php include('skipif.inc'); ?
 +--FILE--
 +?php
 +
 +ob_start();
 +
 +function open($save_path, $session_name) {
 +    return true;
 +}
 +
 +function close() {
 +       die(close: goodbye cruel world\n);
 +}
 +
 +function read($id) {
 +       return '';
 +}
 +
 +function write($id, $session_data) {
 +       die(write: goodbye cruel world\n);
 +}
 +
 +function destroy($id) {
 +    return true;
 +}
 +
 +function gc($maxlifetime) {
 +    return true;
 +}
 +
 +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
 +session_start();
 +session_write_close();
 +echo um, hi\n;
 +
 +?
 +--EXPECTF--
 +write: goodbye cruel world
 +close: goodbye cruel world

 Added: php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt
 ===
 --- php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt              
                   (rev 0)
 +++ php/php-src/branches/PHP_5_4/ext/session/tests/bug60634.phpt        
 2012-01-03 21:47:16 UTC (rev 321733)
 @@ -0,0 +1,45 @@
 +--TEST--
 +Bug #60634 (Segmentation fault when trying to die() in 
 SessionHandler::write())
 +--INI--
 +session.save_path=
 +session.name=PHPSESSID
 +--SKIPIF--
 +?php include('skipif.inc'); ?
 +--FILE--
 +?php
 +
 +ob_start();
 +
 +function open($save_path, $session_name) {
 +    return true;
 +}
 +
 +function close() {
 +       die(close: goodbye cruel world\n);
 +}
 +
 +function read($id) {
 +       return '';
 +}
 +
 +function write($id, $session_data) {
 +       die(write: goodbye cruel world\n);
 +}
 +
 +function destroy($id) {
 +    return true;
 +}
 +
 +function gc($maxlifetime) {
 +    return true;
 +}
 +
 +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
 +session_start();
 +session_write_close();
 +echo um, hi\n;
 +
 +?
 +--EXPECTF--
 +write: goodbye cruel world
 +close: goodbye cruel world

 Added: php/php-src/trunk/ext/session/tests/bug60634.phpt
 ===
 --- php/php-src/trunk/ext/session/tests/bug60634.phpt                         
   (rev 0)
 +++ php/php-src/trunk/ext/session/tests/bug60634.phpt   2012-01-03 21:47:16 
 UTC (rev 321733)
 @@ -0,0 +1,45 @@
 +--TEST--
 +Bug #60634 (Segmentation fault when trying to die() in 
 SessionHandler::write())
 +--INI--
 +session.save_path=
 +session.name=PHPSESSID
 +--SKIPIF--
 +?php include('skipif.inc'); ?
 +--FILE--
 +?php
 +
 +ob_start();
 +
 +function open($save_path, $session_name) {
 +    return true;
 +}
 +
 +function close() {
 +       die(close: goodbye cruel world\n);
 +}
 +
 +function read($id) {
 +       return '';
 +}
 +
 +function write($id, $session_data) {
 +       die(write: goodbye cruel world\n);
 +}
 +
 +function destroy($id) {
 +    return true;
 +}
 +
 +function gc($maxlifetime) {
 +    return true;
 +}
 +
 +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
 +session_start();
 +session_write_close();
 +echo um, hi\n;
 +
 +?
 +--EXPECTF--
 +write: goodbye cruel world
 +close: goodbye cruel world


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



-- 
Regards,
Shein Alexey

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