summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2000-09-04 22:21:10 +0000
committerSterling Hughes <sterling@php.net>2000-09-04 22:21:10 +0000
commit9f86ff884fe62c9a5c25e65a30fc6d7aae702a25 (patch)
tree5be3c714efb92a5aed7925a25545566f314fd63b /ext
parent5dca99232e64336a389c73d19342ab224074bc8b (diff)
downloadphp-git-9f86ff884fe62c9a5c25e65a30fc6d7aae702a25.tar.gz
@Add a php.ini option session.use_trans_sid to enable/disable trans-sid. (Sterling)
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/basic_functions.c5
-rw-r--r--ext/standard/basic_functions.h1
-rw-r--r--ext/standard/output.c6
3 files changed, 10 insertions, 2 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index ac2900986d..b8d160885e 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -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;
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 4487a0029c..bf9e1b8dcd 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -169,6 +169,7 @@ typedef struct {
/* var.c */
zend_class_entry *incomplete_class;
+ zend_bool use_trans_sid;
#ifdef TRANS_SID
/* url_scanner.c */
diff --git a/ext/standard/output.c b/ext/standard/output.c
index 169ad2cd9e..451c39941b 100644
--- a/ext/standard/output.c
+++ b/ext/standard/output.c
@@ -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;