]> granicus.if.org Git - php/commitdiff
Can't output any error messages if there isn't any function initialized
authorfoobar <sniper@php.net>
Mon, 5 Mar 2001 01:26:36 +0000 (01:26 +0000)
committerfoobar <sniper@php.net>
Mon, 5 Mar 2001 01:26:36 +0000 (01:26 +0000)
to do it..
# Bug report: #7650

sapi/cgi/cgi_main.c

index 0c268c866cd753499c4c6ecdd95898f4895dcee2..d783df6d6c815ec24ccad130bc422bf5366817b1 100644 (file)
@@ -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);