From: Michael Wallner Date: Thu, 29 Dec 2005 14:53:12 +0000 (+0000) Subject: - no need to check for COMPILE_DL_SESSION X-Git-Tag: RELEASE_0_21_0~15 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=bbb3e0cfaf7e884c82fc42e873e47d0e6024e1b6;p=m6w6%2Fext-http - no need to check for COMPILE_DL_SESSION --- diff --git a/config.w32 b/config.w32 index 64cecdc..af583c2 100644 --- a/config.w32 +++ b/config.w32 @@ -81,6 +81,10 @@ if (PHP_HTTP != "no") { ADD_EXTENSION_DEP("http", "hash", true); } } + + if (PHP_SESSION != "no") { + ADD_EXTENSION_DEP("http", "session", true); + } CURL_LIB = PHP_DEBUG != "no" ? "libcurld.lib":"libcurl.lib"; if (CHECK_HEADER_ADD_INCLUDE("curl/curl.h", "CFLAGS_HTTP") && diff --git a/http.c b/http.c index d22499c..039f720 100644 --- a/http.c +++ b/http.c @@ -129,6 +129,9 @@ static zend_module_dep http_module_dep[] = { # endif # ifdef HTTP_HAVE_EXT_HASH ZEND_MOD_REQUIRED("hash") +# endif +# ifdef HAVE_PHP_SESSION + ZEND_MOD_REQUIRED("session") # endif {NULL, NULL, NULL, 0} }; diff --git a/http_functions.c b/http_functions.c index a1620e6..444637e 100644 --- a/http_functions.c +++ b/http_functions.c @@ -26,7 +26,7 @@ #include "ext/standard/php_string.h" #include "zend_operators.h" -#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION) +#ifdef HAVE_PHP_SESSION # include "ext/session/php_session.h" #endif @@ -672,6 +672,7 @@ PHP_FUNCTION(http_redirect) RETURN_FALSE; } +#ifdef HAVE_PHP_SESSION /* append session info */ if (session) { if (!params) { @@ -679,39 +680,13 @@ PHP_FUNCTION(http_redirect) MAKE_STD_ZVAL(params); array_init(params); } -#ifdef HAVE_PHP_SESSION -# ifdef COMPILE_DL_SESSION - if (SUCCESS == zend_get_module_started("session")) { - zval nm_retval, id_retval, func; - - INIT_PZVAL(&func); - INIT_PZVAL(&nm_retval); - INIT_PZVAL(&id_retval); - ZVAL_NULL(&nm_retval); - ZVAL_NULL(&id_retval); - - ZVAL_STRINGL(&func, "session_id", lenof("session_id"), 0); - call_user_function(EG(function_table), NULL, &func, &id_retval, 0, NULL TSRMLS_CC); - ZVAL_STRINGL(&func, "session_name", lenof("session_name"), 0); - call_user_function(EG(function_table), NULL, &func, &nm_retval, 0, NULL TSRMLS_CC); - - if ( Z_TYPE(nm_retval) == IS_STRING && Z_STRLEN(nm_retval) && - Z_TYPE(id_retval) == IS_STRING && Z_STRLEN(id_retval)) { - if (add_assoc_stringl_ex(params, Z_STRVAL(nm_retval), Z_STRLEN(nm_retval)+1, - Z_STRVAL(id_retval), Z_STRLEN(id_retval), 0) != SUCCESS) { - http_error(HE_WARNING, HTTP_E_RUNTIME, "Could not append session information"); - } - } - } -# else if (PS(session_status) == php_session_active) { if (add_assoc_string(params, PS(session_name), PS(id), 1) != SUCCESS) { http_error(HE_WARNING, HTTP_E_RUNTIME, "Could not append session information"); } } -# endif -#endif } +#endif /* treat params array with http_build_query() */ if (params) { diff --git a/package2.xml b/package2.xml index 26b487c..c88dbfd 100644 --- a/package2.xml +++ b/package2.xml @@ -252,6 +252,7 @@ Special thanks for this release go to Ilia Alshanetsky. + spl session hash