cvs: php4 /sapi/cgi cgi_main.c
| From: | Stanislav Malyshev | Date: | Thu, 13 Jul 2000 09:17:40 +0000 |
| Subject: | cvs: php4 /sapi/cgi cgi_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-732@lists.php.net to get a copy of this message | ||
stas Thu Jul 13 02:17:40 2000 EDT
Modified files:
/php4/sapi/cgi cgi_main.c
Log:
make -c in stand-alone mode work again.
Setting ini_path after php_module_startup doesn't do much good -
since php_module_startup reads .ini.
# This fix is very ugly. Everyone is welcome to make better fix
# that won't report errors twice and won't scan argument 3 times
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.61 php4/sapi/cgi/cgi_main.c:1.62
--- php4/sapi/cgi/cgi_main.c:1.61 Thu Jun 29 06:34:57 2000
+++ php4/sapi/cgi/cgi_main.c Thu Jul 13 02:17:39 2000
@@ -447,6 +447,19 @@
#endif /* FORCE_CGI_REDIRECT */
}
+ if (!cgi) {
+ while ((c=ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:"))!=-1) {
+ switch (c) {
+ case 'c':
+ php_ini_path = strdup(ap_php_optarg); /* intentional leak */
+ break;
+ }
+
+ }
+ ap_php_optind = orig_optind;
+ ap_php_optarg = orig_optarg;
+ }
+
if (php_module_startup(&sapi_module)==FAILURE) {
return FAILURE;
}
@@ -463,9 +476,6 @@
if (!cgi) {
while ((c=ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:"))!=-1) {
switch (c) {
- case 'c':
- php_ini_path = strdup(ap_php_optarg); /* intentional leak */
- break;
case '?':
no_headers = 1;
php_output_startup();