From: Zeev Suraski Date: Mon, 10 May 1999 19:48:23 +0000 (+0000) Subject: Weed out all BoundsChecker-found bugs X-Git-Tag: BEFORE_PHP4_APACHE_MODULE_CHANGE~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=928e322038d9b7944c8e3d2a710fe3ac9975bde4;p=php Weed out all BoundsChecker-found bugs --- diff --git a/cgi_main.c b/cgi_main.c index 6760dbfba9..a7c01c7f07 100644 --- a/cgi_main.c +++ b/cgi_main.c @@ -436,6 +436,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine php3_header(); /* Make sure headers have been sent */ php_request_shutdown((void *) 0); php_module_shutdown(); + tsrm_shutdown(); return SUCCESS; } diff --git a/main/SAPI.c b/main/SAPI.c index 91f47afc6b..b9f9e36e95 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -94,7 +94,8 @@ SAPI_API void sapi_activate(SLS_D) SG(headers_sent) = 0; SG(read_post_bytes) = 0; if (SG(server_context)) { - if (!strcmp(SG(request_info).request_method, "POST")) { + if (SG(request_info).request_method + && !strcmp(SG(request_info).request_method, "POST")) { sapi_read_post_data(SLS_C); } else { SG(request_info).post_data = NULL; diff --git a/main/main.c b/main/main.c index ef965528ff..65f38cd557 100644 --- a/main/main.c +++ b/main/main.c @@ -470,7 +470,7 @@ static void php3_timeout(int dummy) { PLS_FETCH(); - php3_error(E_ERROR, "Maximum execution time of %d seconds exceeded", PG(max_execution_time)); + php3_error(E_ERROR, "Maximum execution time of %s seconds exceeded", INI_STRING("max_execution_time")); } #endif @@ -603,8 +603,6 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) zend_output_startup(); - php3_set_timeout(PG(max_execution_time)); - #if APACHE /* * For the Apache module version, this bit of code registers a cleanup diff --git a/main/php_globals.h b/main/php_globals.h index 48ad5441f7..0eae5e131c 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -37,7 +37,6 @@ struct _php_core_globals { char *safe_mode_exec_dir; long enable_dl; - long max_execution_time; long memory_limit; long track_errors;