cvs: /php4 php.ini-dist NEWS /php4/ext/session session.c php_session.h
| From: | Sascha Schumann | Date: | Fri, 22 Oct 1999 08:10:09 +0000 |
| Subject: | cvs: /php4 php.ini-dist NEWS /php4/ext/session session.c php_session.h | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-5638@lists.php.net to get a copy of this message | ||
sas Fri Oct 22 04:10:09 1999 EDT
Modified files:
/php4 php.ini-dist NEWS
/php4/ext/session session.c php_session.h
Log:
Add session.use_cookies option
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.7 php4/php.ini-dist:1.8
--- php4/php.ini-dist:1.7 Sat Sep 11 12:32:08 1999
+++ php4/php.ini-dist Fri Oct 22 04:10:07 1999
@@ -273,6 +273,7 @@
session.save_path = /tmp ; argument passed to save_handler
; in the case of files, this is the
; path where data files are stored
+session.use_cookies = 1 ; whether to use cookies
session.name = PHPSESSID ; name of the session
; is used as cookie name
session.auto_start = 0 ; initialize session on request startup
Index: php4/NEWS
diff -u php4/NEWS:1.11 php4/NEWS:1.12
--- php4/NEWS:1.11 Wed Oct 20 21:09:52 1999
+++ php4/NEWS Fri Oct 22 04:10:07 1999
@@ -3,7 +3,8 @@
?? ?? 1999, Version 4.0 Beta 3
-- added getcwd() function. (Thies)
+- Added session.use_cookies option (Sascha)
+- Added getcwd() function. (Thies)
- XML_Parse_Into_Struct no longer eats data. (Thies)
- Fixed parse_url('-') crash. (Thies)
- added === operator support. (Andi & Thies, Zend library)
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.57 php4/ext/session/session.c:1.58
--- php4/ext/session/session.c:1.57 Fri Oct 1 10:54:54 1999
+++ php4/ext/session/session.c Fri Oct 22 04:10:08 1999
@@ -70,6 +70,7 @@
PHP_INI_ENTRY("session.gc_maxlifetime", "1440", PHP_INI_ALL, NULL)
PHP_INI_ENTRY("session.lifetime", "0", PHP_INI_ALL, NULL)
PHP_INI_ENTRY("session.serialize_handler", "php", PHP_INI_ALL, NULL)
+ PHP_INI_ENTRY("session.use_cookies", "1", PHP_INI_ALL, NULL)
PHP_INI_ENTRY("session.extern_referer_check", "", PHP_INI_ALL, NULL)
PHP_INI_ENTRY("session.entropy_file", "", PHP_INI_ALL, NULL)
PHP_INI_ENTRY("session.entropy_length", "0", PHP_INI_ALL, NULL)
@@ -508,7 +509,12 @@
if(!PS(id)) {
PS(id) = _php_create_id(NULL PSLS_CC);
}
-
+
+ if(!PS(use_cookies) && send_cookie) {
+ define_sid = 1;
+ send_cookie = 0;
+ }
+
if(send_cookie) {
_php_session_send_cookie(PSLS_C);
}
@@ -854,6 +860,7 @@
zend_hash_init(&PS(vars), 0, NULL, NULL, 0);
PS(define_sid) = 0;
+ PS(use_cookies) = INI_INT("session.use_cookies");
PS(save_path) = estrdup(INI_STR("session.save_path"));
PS(session_name) = estrdup(INI_STR("session.name"));
PS(entropy_file) = estrdup(INI_STR("session.entropy_file"));
Index: php4/ext/session/php_session.h
diff -u php4/ext/session/php_session.h:1.19 php4/ext/session/php_session.h:1.20
--- php4/ext/session/php_session.h:1.19 Fri Sep 17 01:40:59 1999
+++ php4/ext/session/php_session.h Fri Oct 22 04:10:08 1999
@@ -79,6 +79,7 @@
int entropy_length;
int lifetime;
zend_bool define_sid;
+ zend_bool use_cookies;
ps_module *mod;
void *mod_data;
HashTable vars;