From d1169e735e72694090e8158ef0c1d9732015f9af Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sat, 26 Jun 1999 23:21:18 +0000 Subject: [PATCH] Win32/general patches --- cgi_main.c | 3 +-- ext/standard/pageinfo.c | 2 ++ request_info.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cgi_main.c b/cgi_main.c index 63e97346de..8434ae7209 100644 --- a/cgi_main.c +++ b/cgi_main.c @@ -205,8 +205,6 @@ int main(int argc, char *argv[]) sapi_startup(&sapi_module); - SG(request_info).path_translated = NULL; - #if WIN32|WINNT _fmode = _O_BINARY; /*sets default for file streams to binary */ setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ @@ -262,6 +260,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine } #endif + SG(request_info).path_translated = NULL; init_request_info(SLS_C); SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */ CG(extended_info) = 0; diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 81b0b2aa8a..4299d44130 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -78,6 +78,8 @@ static void _php3_statpage(void) page_mtime = r->finfo.st_mtime; #else if (page_uid == -1) { + SLS_FETCH(); + path = SG(request_info).path_translated; if (path != NULL) { if (stat(path, &sb) == -1) { diff --git a/request_info.c b/request_info.c index 72050423fe..a5b2c35cb1 100644 --- a/request_info.c +++ b/request_info.c @@ -67,9 +67,9 @@ int php3_init_request_info(void *conf) php3_destroy_request_info()! */ #if DISCARD_PATH if (request_info.script_filename) { - request_info.filename = estrdup(request_info.script_filename); + SG(request_info).path_translated = estrdup(request_info.script_filename); } else { - request_info.filename = NULL; + SG(request_info).path_translated = NULL; } #endif return SUCCESS; -- 2.40.0