From: foobar Date: Mon, 5 Mar 2001 01:26:36 +0000 (+0000) Subject: Can't output any error messages if there isn't any function initialized X-Git-Tag: php-4.0.5RC1~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81a266921673b0a9b625ec8541c467ed3cfb7340;p=php Can't output any error messages if there isn't any function initialized to do it.. # Bug report: #7650 --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 0c268c866c..d783df6d6c 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -416,6 +416,9 @@ int main(int argc, char *argv[]) setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif + if (php_module_startup(&cgi_sapi_module)==FAILURE) { + return FAILURE; + } /* Make sure we detect we are a cgi - a bit redundancy here, but the default case is that we have to check only the first one. */ @@ -472,9 +475,6 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine ap_php_optarg = orig_optarg; } - if (php_module_startup(&cgi_sapi_module)==FAILURE) { - return FAILURE; - } #ifdef ZTS compiler_globals = ts_resource(compiler_globals_id); executor_globals = ts_resource(executor_globals_id);