diff options
| author | Stig Bakken <ssb@php.net> | 1999-06-18 13:02:34 +0000 |
|---|---|---|
| committer | Stig Bakken <ssb@php.net> | 1999-06-18 13:02:34 +0000 |
| commit | 2ca540404621c1599472e848d1f0cf70c5871701 (patch) | |
| tree | bbc5d8e5f0742cf71461e60962a0be2367e09591 /main/fopen_wrappers.c | |
| parent | 5d62d88ece1ab91a0d3739533e32618477bfa658 (diff) | |
| download | php-git-2ca540404621c1599472e848d1f0cf70c5871701.tar.gz | |
make CGI version work again
Diffstat (limited to 'main/fopen_wrappers.c')
| -rw-r--r-- | main/fopen_wrappers.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index fde1497900..2e7300ebe3 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -226,7 +226,7 @@ PHPAPI FILE *php3_fopen_for_parser(void) PLS_FETCH(); SLS_FETCH(); - fn = SG(request_info).path_translated; + fn = request_info.filename; path_info = SG(request_info).request_uri; #if HAVE_PWD_H if (PG(user_dir) && *PG(user_dir) @@ -254,8 +254,8 @@ PHPAPI FILE *php3_fopen_for_parser(void) strcat(fn, PG(user_dir)); /* safe */ strcat(fn, "/"); /* safe */ strcat(fn, s + 1); /* safe (shorter than path_info) */ - STR_FREE(SG(request_info).path_translated); - SG(request_info).path_translated = fn; + STR_FREE(request_info.filename); + request_info.filename = fn; } } } @@ -277,17 +277,17 @@ PHPAPI FILE *php3_fopen_for_parser(void) if ('/' == path_info[0]) l--; strcpy(fn + l, path_info); - STR_FREE(SG(request_info).path_translated); - SG(request_info).path_translated = fn; + STR_FREE(request_info.filename); + request_info.filename = fn; } } /* if doc_root && path_info */ if (!fn) { - /* we have to free SG(request_info).path_translated here because + /* we have to free request_info.filename here because php3_destroy_request_info assumes that it will get freed when the include_names hash is emptied, but we're not adding it in this case */ - STR_FREE(SG(request_info).path_translated); - SG(request_info).path_translated = NULL; + STR_FREE(request_info.filename); + request_info.filename = NULL; return NULL; } fp = fopen(fn, "r"); @@ -299,7 +299,7 @@ PHPAPI FILE *php3_fopen_for_parser(void) } if (!fp) { php3_error(E_CORE_ERROR, "Unable to open %s", fn); - STR_FREE(SG(request_info).path_translated); /* for same reason as above */ + STR_FREE(request_info.filename); /* for same reason as above */ return NULL; } |
