cvs: /php4/sapi/cgi cgi_main.c

From: Date: Mon, 27 Dec 1999 21:21:59 +0000
Subject: cvs: /php4/sapi/cgi cgi_main.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-8556@lists.php.net to get a copy of this message
zeev Mon Dec 27 16:21:59 1999 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: @- Fixed -c support in the standalone CGI binary (Zeev) Fixed -c support in the standalone CGI binary (Zeev) Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.12 php4/sapi/cgi/cgi_main.c:1.13 --- php4/sapi/cgi/cgi_main.c:1.12 Mon Dec 20 18:09:51 1999 +++ php4/sapi/cgi/cgi_main.c Mon Dec 27 16:21:26 1999 @@ -214,6 +214,8 @@ int behavior=PHP_MODE_STANDARD; int no_headers=0; int free_path_translated=0; + int orig_optind=optind; + char *orig_optarg=optarg; #if SUPPORT_INTERACTIVE int interactive=0; #endif @@ -280,6 +282,19 @@ #endif /* FORCE_CGI_REDIRECT */ } + if (!cgi) { + while ((c=getopt(argc, argv, "c:d:qvisnaeh?vf:"))!=-1) { + switch (c) { + case 'c': + php_ini_path = strdup(optarg); /* intentional leak */ + break; + } + } + optind = orig_optind; + optarg = orig_optarg; + } + + if (php_module_startup(&sapi_module)==FAILURE) { return FAILURE; } @@ -350,9 +365,6 @@ break; case 'n': behavior=PHP_MODE_INDENT; - break; - case 'c': - php_ini_path = strdup(optarg); /* intentional leak */ break; case 'a': #if SUPPORT_INTERACTIVE

« previous php.version4 (#8556) next »