]> granicus.if.org Git - php/commitdiff
- Fix problem with DICARD_PATH being defined in windows
authorAndi Gutmans <andi@php.net>
Thu, 29 Jun 2000 13:31:52 +0000 (13:31 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 29 Jun 2000 13:31:52 +0000 (13:31 +0000)
main/config.w32.h
sapi/cgi/cgi_main.c

index d60f17e5ea1d0d7103b9c5a75bc0330b23902818..30b232b2b0e1d90051da6026bafda8ff69fe715f 100644 (file)
    DONT TOUCH!!!!!  Unless you realy know what your messing with!
    ---------------------------------------------------------------*/
 
-#define DISCARD_PATH 1
+#define DISCARD_PATH 0
 #undef HAVE_SETITIMER
 #undef HAVE_IODBC
 #define HAVE_UODBC 1
index f3b91f0ffe64ee1b4a3012937038f699f02811e9..306f6b96d13e98b532272e57a3f53e7425bf8569 100644 (file)
@@ -489,7 +489,10 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
        zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
 
        if (!cgi) {                                     /* never execute the arguments if you are a CGI */
-               SG(request_info).argv0 = NULL;
+               if (!SG(request_info).argv0) {
+                       free(SG(request_info).argv0);
+                       SG(request_info).argv0 = NULL;
+               }
                while ((c = ap_php_getopt(argc, argv, "c:d:z:g:qvisnaeh?vf:")) != -1) {
                        switch (c) {
                                case 'f':
@@ -630,6 +633,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
                SG(request_info).path_translated = estrdup(getenv("SCRIPT_FILENAME"));
 #else
                SG(request_info).path_translated = estrdup(getenv("PATH_TRANSLATED"));
+
 #endif
        }
        if (cgi || SG(request_info).path_translated) {