From: Ilia Alshanetsky Date: Mon, 25 Sep 2006 14:49:34 +0000 (+0000) Subject: MFB: Fixed bug #38904 (apache2filter changes cwd to /). X-Git-Tag: RELEASE_1_0_0RC1~1548 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13e1309f400624139c3610e55fa8c76709fd18e3;p=php MFB: Fixed bug #38904 (apache2filter changes cwd to /). --- diff --git a/main/main.c b/main/main.c index 9121c92698..73bfdc89f0 100644 --- a/main/main.c +++ b/main/main.c @@ -1859,8 +1859,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC) PG(during_request_startup) = 0; - if (primary_file->type == ZEND_HANDLE_FILENAME - && primary_file->filename) { + if ((primary_file->type == ZEND_HANDLE_FILENAME || primary_file->type == ZEND_HANDLE_STREAM) && primary_file->filename) { #if HAVE_BROKEN_GETCWD /* this looks nasty to me */ old_cwd_fd = open(".", 0);