]> granicus.if.org Git - php/commitdiff
add session config to php.ini and adapt the naming scheme for it
authorSascha Schumann <sas@php.net>
Sun, 18 Jul 1999 01:00:42 +0000 (01:00 +0000)
committerSascha Schumann <sas@php.net>
Sun, 18 Jul 1999 01:00:42 +0000 (01:00 +0000)
ext/session/session.c
php.ini-dist

index 03d7ea82f6c688019be88ffa77774820505e9be2..03e7c60c29f829beb8dae53eaaa10fc676cb12ea 100644 (file)
@@ -63,14 +63,14 @@ function_entry session_functions[] = {
 };
 
 PHP_INI_BEGIN()
-       PHP_INI_ENTRY("session_save_path", "/tmp", PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("session_name", "PHPSESSID", PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("session_module_name", "files", PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("session_auto_start", "0", PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("session_gc_probability", "1", PHP_INI_ALL, NULL)
-       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_serializer", "php", PHP_INI_ALL, NULL)
+       PHP_INI_ENTRY("session.save_path", "/tmp", PHP_INI_ALL, NULL)
+       PHP_INI_ENTRY("session.name", "PHPSESSID", PHP_INI_ALL, NULL)
+       PHP_INI_ENTRY("session.save_handler", "files", PHP_INI_ALL, NULL)
+       PHP_INI_ENTRY("session.auto_start", "0", PHP_INI_ALL, NULL)
+       PHP_INI_ENTRY("session.gc_probability", "1", PHP_INI_ALL, NULL)
+       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_END()
 
 PS_SERIALIZER_FUNCS(php);
@@ -614,17 +614,17 @@ PHP_FUNCTION(session_destroy)
 
 static void php_rinit_session_globals(PSLS_D)
 {
-       PS(mod) = _php_find_ps_module(INI_STR("session_module_name") PSLS_CC);
+       PS(mod) = _php_find_ps_module(INI_STR("session.save_handler") PSLS_CC);
        PS(serializer) = \
-               _php_find_ps_serializer(INI_STR("session_serializer") PSLS_CC);
+               _php_find_ps_serializer(INI_STR("session.serialize_handler") PSLS_CC);
                
        zend_hash_init(&PS(vars), 0, NULL, NULL, 0);
-       PS(save_path) = estrdup(INI_STR("session_save_path"));
-       PS(session_name) = estrdup(INI_STR("session_name"));
-       PS(gc_probability) = INI_INT("session_gc_probability");
-       PS(gc_maxlifetime) = INI_INT("session_gc_maxlifetime");
+       PS(save_path) = estrdup(INI_STR("session.save_path"));
+       PS(session_name) = estrdup(INI_STR("session.name"));
+       PS(gc_probability) = INI_INT("session.gc_probability");
+       PS(gc_maxlifetime) = INI_INT("session.gc_maxlifetime");
        PS(id) = NULL;
-       PS(lifetime) = INI_INT("session_lifetime");
+       PS(lifetime) = INI_INT("session.lifetime");
        PS(nr_open_sessions) = 0;
        PS(mod_data) = NULL;
 }
index 4f0933dc5e3684afa4c86d7aedb8026a9c8eaf6c..7bdbf602d1f864ad25b8b874870a06f03875a709 100644 (file)
@@ -241,3 +241,22 @@ ifx.blobinfile                     =       0       ; if set on, the contents of text&byte blobs are dumped to
                                                ; keeping them in memory
 ifx.nullformat                 =       0       ; NULL's are returned as empty strings, unless this is set to 1. In that case,
                                                ; NULL's are returned as string 'NULL'.
+
+[Session]
+session.save_handler = files        ; handler used to store/retrieve data
+session.save_path = /tmp            ; argument passed to save_handler
+                                    ; in the case of files, this is the
+                                    ; path where data files are stored
+session.name = PHPSESSID            ; name of the session
+                                    ; is used as cookie name
+session.auto_start = 0              ; initialize session on request startup
+session.lifetime = 0                ; lifetime in seconds of cookie
+                                    ; or if 0, until browser is restarted
+session.serialize_handler = php     ; handler used to serialize data
+                                    ; php is the standard serializer of PHP
+session.gc_probability = 1          ; procentual probability that the 
+                                    ; 'garbage collection' process is started
+                                    ; on every session initialization
+session.gc_maxlifetime = 1440       ; after this number of seconds, stored
+                                    ; data will be seen as 'garbage' and
+                                    ; cleaned up by the gc process