diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 750661ed4f6..a46b84a6a2b 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -19,46 +19,7 @@ */ /* $Id$ */ -#define NO_REGEX_EXTRA_H -#ifdef WIN32 -#include -#include -#endif - -#include "zend.h" -#include "php.h" -#include "php_variables.h" - -#include "httpd.h" -#include "http_config.h" -#if MODULE_MAGIC_NUMBER > 19980712 -# include "ap_compat.h" -#else -# if MODULE_MAGIC_NUMBER > 19980324 -# include "compat.h" -# endif -#endif -#include "http_core.h" -#include "http_main.h" -#include "http_protocol.h" -#include "http_request.h" -#include "http_log.h" - -#include "php_ini.h" -#include "php_globals.h" -#include "SAPI.h" -#include "php_main.h" - -#include "zend_compile.h" -#include "zend_execute.h" -#include "zend_highlight.h" -#include "zend_indent.h" - -#include "ext/standard/php_standard.h" - -#include "util_script.h" - -#include "mod_php4.h" +#include "php_apache_http.h" #undef shutdown @@ -434,7 +395,7 @@ static void init_request_info(TSRMLS_D) authorization = table_get(r->headers_in, "Authorization"); } if (authorization -/* && !auth_type(r) */ + && !auth_type(r) && !strcasecmp(getword(r->pool, &authorization, ' '), "Basic")) { tmp = uudecode(r->pool, authorization); SG(request_info).auth_user = getword_nulls_nc(r->pool, &tmp, ':'); diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 4fff27fae11..b1a5b0e6d35 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -19,37 +19,7 @@ */ /* $Id$ */ -#define NO_REGEX_EXTRA_H - -#ifdef WIN32 -#include -#include -#endif - -#include "php.h" -#include "ext/standard/head.h" -#include "php_globals.h" -#include "php_ini.h" -#include "SAPI.h" -#include "mod_php4.h" -#include "ext/standard/info.h" - -#include -#if HAVE_UNISTD_H -#include -#endif -#include -#include -#include - #include "php_apache_http.h" -#include "http_request.h" - -#ifdef ZTS -int php_apache_info_id; -#else -php_apache_info_struct php_apache_info; -#endif #ifdef PHP_WIN32 #include "zend.h" @@ -58,6 +28,12 @@ php_apache_info_struct php_apache_info; #include "build-defs.h" #endif +#ifdef ZTS +int php_apache_info_id; +#else +php_apache_info_struct php_apache_info; +#endif + #define SECTION(name) PUTS("

" name "

\n") extern module *top_module; diff --git a/sapi/apache/php_apache_http.h b/sapi/apache/php_apache_http.h index a878b8fa3e1..6d41f418ab0 100644 --- a/sapi/apache/php_apache_http.h +++ b/sapi/apache/php_apache_http.h @@ -1,24 +1,34 @@ -# if HAVE_AP_CONFIG_H -#include "ap_config_auto.h" -#ifdef RHAPSODY -#undef HAVE_SNPRINTF +#define NO_REGEX_EXTRA_H + +#ifdef WIN32 +#include +#include #endif -#include "ap_config.h" -#ifdef RHAPSODY -#undef HAVE_SNPRINTF -#define HAVE_SNPRINTF 1 -#endif -# endif -# if HAVE_OLD_COMPAT_H -#include "compat.h" -# endif -# if HAVE_AP_COMPAT_H -#include "ap_compat.h" -# endif + +#include "zend.h" +#include "php_regex.h" + #include "httpd.h" -#include "http_main.h" -#include "http_core.h" -#include "http_request.h" -#include "http_protocol.h" #include "http_config.h" -#include "http_log.h" + +#if MODULE_MAGIC_NUMBER > 19980712 +# include "ap_compat.h" +#else +# if MODULE_MAGIC_NUMBER > 19980324 +# include "compat.h" +# endif +#endif + +#include "http_core.h" +#include "http_main.h" +#include "http_protocol.h" +#include "http_request.h" +#include "http_log.h" +#include "util_script.h" + +#include "php_variables.h" +#include "php_main.h" +#include "php_ini.h" +#include "ext/standard/php_standard.h" + +#include "mod_php4.h" diff --git a/sapi/apache/sapi_apache.c b/sapi/apache/sapi_apache.c index ae2c827a6e0..aa935b90dbb 100644 --- a/sapi/apache/sapi_apache.c +++ b/sapi/apache/sapi_apache.c @@ -21,42 +21,7 @@ */ /* $Id$ */ -#define NO_REGEX_EXTRA_H -#ifdef WIN32 -#include -#include -#endif - -#include "php.h" - -#include "httpd.h" -#include "http_config.h" -#if MODULE_MAGIC_NUMBER > 19980712 -# include "ap_compat.h" -#else -# if MODULE_MAGIC_NUMBER > 19980324 -# include "compat.h" -# endif -#endif -#include "http_core.h" -#include "http_main.h" -#include "http_protocol.h" -#include "http_request.h" -#include "http_log.h" - -#include "zend.h" -#include "php_ini.h" -#include "php_globals.h" -#include "SAPI.h" -#include "php_main.h" -#include "zend_compile.h" -#include "zend_execute.h" -#include "zend_highlight.h" -#include "zend_indent.h" -#include "ext/standard/php_standard.h" -#include "util_script.h" -#include "php_version.h" -#include "mod_php4.h" +#include "php_apache_http.h" /* {{{ apache_php_module_main */