From 827672cd787b7afe79e4192a3fdf95fb3567cdf2 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sun, 27 Aug 2000 19:51:50 +0000 Subject: [PATCH] - Reverting Sascha's patch although I don't like doing these kind of things - but as it is Sascha who has reverted a zillion patches I don't feel that - bad about it :) - The patch is morally incorrect and it actually also has a crash bug which - I won't point out because it shouldn't be there. - SG(path_translated) should be set by the SAPI module correctly and if it - isn't the SAPI module should be fixed and not add code to PHP. There is - enough special case code in PHP and I would like to clean it up and not - add more. - Last but not least, old_cwd takes 4KB of stack space. We should probably - malloc() it because in ISAPI we only have 10KB of stack space. --- main/main.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main/main.c b/main/main.c index 86c8634804..e1d72551e5 100644 --- a/main/main.c +++ b/main/main.c @@ -1106,10 +1106,9 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ zend_file_handle *prepend_file_p, *append_file_p; zend_file_handle prepend_file, append_file; char old_cwd[4096]; - char new_path[4096]; SLS_FETCH(); - old_cwd[0] = new_path[0] = '\0'; + old_cwd[0] = '\0'; php_hash_environment(ELS_C SLS_CC PLS_CC); zend_activate_modules(); @@ -1149,13 +1148,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ if (primary_file->type == ZEND_HANDLE_FILENAME && primary_file->filename) { V_GETCWD(old_cwd, sizeof(old_cwd)-1); - - if (!IS_ABSOLUTE_PATH(primary_file->filename, strlen(primary_file->filename))) { - snprintf(new_path, sizeof(new_path), "%s%c%s", old_cwd, PHP_DIR_SEPARATOR, primary_file->filename); - new_path[sizeof(new_path)-1] = '\0'; - primary_file->filename = new_path; - } - V_CHDIR_FILE(primary_file->filename); } -- 2.50.1