diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2014-03-13 06:32:49 +0900 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2014-03-13 06:32:49 +0900 |
commit | 6f0ad9ea1229a166ec2bd13f28587e49ae43b2ee (patch) | |
tree | 3902a51a206af76a21f9ea6c6d89c8343e2dd5d8 | |
parent | 7dec5789fe67f3b5540b54c9747f9c7a10c1931d (diff) | |
download | php-git-6f0ad9ea1229a166ec2bd13f28587e49ae43b2ee.tar.gz |
Revert "Implement Bug #54649 Create session_serializer_name()"
This reverts commit 678ec306557f61bf54b6df454387e7d9c3f50de5.
Conflicts:
ext/session/tests/session_serializer_name_basic.phpt
-rw-r--r-- | ext/session/session.c | 30 | ||||
-rw-r--r-- | ext/session/tests/session_gc_basic.phpt | 56 |
2 files changed, 0 insertions, 86 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index d6a60fe982..1d60c40188 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1776,31 +1776,6 @@ static PHP_FUNCTION(session_module_name) } /* }}} */ -/* {{{ proto mixed session_serializer_name([string newname]) - Return the current serializer name used for encode/decode session data. If newname is given, the serialzer name is replaced with newname and return bool */ -static PHP_FUNCTION(session_serializer_name) -{ - char *name = NULL; - int name_len; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, &name_len) == FAILURE) { - return; - } - - /* Return serializer name */ - if (!name) { - RETURN_STRING(zend_ini_string("session.serialize_handler", sizeof("session.serialize_handler"), 0), 1); - } - - /* Set serializer name */ - if (zend_alter_ini_entry("session.serialize_handler", sizeof("session.serialize_handler"), name, name_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME) == SUCCESS) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -} -/* }}} */ - /* {{{ proto void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc, string create_sid) Sets user-level functions */ static PHP_FUNCTION(session_set_save_handler) @@ -2238,10 +2213,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_session_module_name, 0, 0, 0) ZEND_ARG_INFO(0, module) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_session_serializer_name, 0, 0, 0) - ZEND_ARG_INFO(0, module) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO_EX(arginfo_session_save_path, 0, 0, 0) ZEND_ARG_INFO(0, path) ZEND_END_ARG_INFO() @@ -2321,7 +2292,6 @@ ZEND_END_ARG_INFO() static const zend_function_entry session_functions[] = { PHP_FE(session_name, arginfo_session_name) PHP_FE(session_module_name, arginfo_session_module_name) - PHP_FE(session_serializer_name, arginfo_session_serializer_name) PHP_FE(session_save_path, arginfo_session_save_path) PHP_FE(session_id, arginfo_session_id) PHP_FE(session_regenerate_id, arginfo_session_regenerate_id) diff --git a/ext/session/tests/session_gc_basic.phpt b/ext/session/tests/session_gc_basic.phpt deleted file mode 100644 index f0726ce93b..0000000000 --- a/ext/session/tests/session_gc_basic.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Test session_gc() function : basic functionality ---SKIPIF-- -<?php include('skipif.inc'); ?> ---INI-- -session.serialize_handler=php -session.save_handler=files -session.maxlifetime=782000 ---FILE-- -<?php -error_reporting(E_ALL); - -ob_start(); - -/* - * Prototype : int session_gc([int maxlifetime]) - * Description : Execute gc and return number of deleted data - * Source code : ext/session/session.c - */ - -echo "*** Testing session_gc() : basic functionality ***\n"; - -// Should fail. It requires active session. -var_dump(session_gc()); - -session_start(); -// Should succeed with some number -var_dump(session_gc()); -// Secound time must be int(0) -var_dump(session_gc()); -session_write_close(); - -// Start&stop session to generate -session_start(); -session_write_close(); -session_start(); -session_write_close(); -session_start(); -session_write_close(); - -session_start(); -$ndeleted = session_gc(0); // Delete all -var_dump($ndeleted >= 3); - -echo "Done".PHP_EOL; - -?> ---EXPECTF-- -*** Testing session_gc() : basic functionality *** - -Warning: session_gc(): Trying to garbage collect without active session in %s on line 15 -bool(false) -int(%d) -int(0) -bool(true) -Done |