]> granicus.if.org Git - php/commitdiff
@Add a php.ini option session.use_trans_sid to enable/disable trans-sid. (Sterling)
authorSterling Hughes <sterling@php.net>
Mon, 4 Sep 2000 22:21:10 +0000 (22:21 +0000)
committerSterling Hughes <sterling@php.net>
Mon, 4 Sep 2000 22:21:10 +0000 (22:21 +0000)
ext/standard/basic_functions.c
ext/standard/basic_functions.h
ext/standard/output.c
main/output.c

index ac2900986d3511c979f8a5496c1cb6894ddb73fc..b8d160885ee60b1c80d62304174d56a7a2965a93 100644 (file)
@@ -588,6 +588,7 @@ static PHP_INI_MH(OnUpdateSafeModeAllowedEnvVars)
 PHP_INI_BEGIN()
        PHP_INI_ENTRY_EX("safe_mode_protected_env_vars",        SAFE_MODE_PROTECTED_ENV_VARS,   PHP_INI_SYSTEM,         OnUpdateSafeModeProtectedEnvVars,               NULL)
        PHP_INI_ENTRY_EX("safe_mode_allowed_env_vars",          SAFE_MODE_ALLOWED_ENV_VARS,             PHP_INI_SYSTEM,         OnUpdateSafeModeAllowedEnvVars,                 NULL)
+       STD_PHP_INI_ENTRY("session.use_trans_sid",          "1",                                                        PHP_INI_ALL,                    OnUpdateBool,                   use_trans_sid,                  php_basic_globals,                      basic_globals)
 PHP_INI_END()
 
 
@@ -755,7 +756,9 @@ PHP_RINIT_FUNCTION(basic)
        PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU);
 
 #ifdef TRANS_SID
-       PHP_RINIT(url_scanner)(INIT_FUNC_ARGS_PASSTHRU);
+       if (BG(use_trans_sid)) {
+               PHP_RINIT(url_scanner)(INIT_FUNC_ARGS_PASSTHRU);
+       }
 #endif
        
        return SUCCESS;
index 4487a0029cf39b53fcd4661bc125bec4cf93b3ec..bf9e1b8dcd9d749ea544370c769b166896ccfa76 100644 (file)
@@ -169,6 +169,7 @@ typedef struct {
 
        /* var.c */
        zend_class_entry *incomplete_class;
+       zend_bool use_trans_sid;
 
 #ifdef TRANS_SID
        /* url_scanner.c */
index 169ad2cd9e7a53098dec7af612ef8f9db37c3cf1..451c39941b7d5c392447befe0cc7c94042916a05 100644 (file)
@@ -22,6 +22,7 @@
 #include "php.h"
 #include "ext/standard/head.h"
 #include "ext/session/php_session.h"
+#include "basic_functions.h"
 #include "SAPI.h"
 
 /* output functions */
@@ -332,8 +333,11 @@ static int php_ub_body_write_no_header(const char *str, uint str_length)
        uint new_length=0;
        int result;
        OLS_FETCH();
+       BLS_FETCH();
 
-       session_adapt_uris(str, str_length, &newstr, &new_length);
+       if (BG(use_trans_sid)) {
+               session_adapt_uris(str, str_length, &newstr, &new_length);
+       }
                
        if (newstr) {
                str = newstr;
index 169ad2cd9e7a53098dec7af612ef8f9db37c3cf1..451c39941b7d5c392447befe0cc7c94042916a05 100644 (file)
@@ -22,6 +22,7 @@
 #include "php.h"
 #include "ext/standard/head.h"
 #include "ext/session/php_session.h"
+#include "basic_functions.h"
 #include "SAPI.h"
 
 /* output functions */
@@ -332,8 +333,11 @@ static int php_ub_body_write_no_header(const char *str, uint str_length)
        uint new_length=0;
        int result;
        OLS_FETCH();
+       BLS_FETCH();
 
-       session_adapt_uris(str, str_length, &newstr, &new_length);
+       if (BG(use_trans_sid)) {
+               session_adapt_uris(str, str_length, &newstr, &new_length);
+       }
                
        if (newstr) {
                str = newstr;