1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

- 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.
This commit is contained in:
Andi Gutmans
2000-08-27 19:51:50 +00:00
parent 490de54fb5
commit 827672cd78
+1 -9
View File
@@ -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);
}