dmitry Mon Mar 13 09:36:05 2006 UTC Modified files: /php-src/main main.c Log: Fixed realpath() cache for main script with FastCGI SAPI http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.672&r2=1.673&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.672 php-src/main/main.c:1.673 --- php-src/main/main.c:1.672 Fri Mar 10 18:16:24 2006 +++ php-src/main/main.c Mon Mar 13 09:36:05 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.672 2006/03/10 18:16:24 bfrance Exp $ */ +/* $Id: main.c,v 1.673 2006/03/13 09:36:05 dmitry Exp $ */ /* {{{ includes */ @@ -1752,7 +1752,6 @@ #else char *old_cwd; #endif - char *old_primary_file_path = NULL; int retval = 0; EG(exit_status) = 0; @@ -1789,16 +1788,14 @@ /* Only lookup the real file path and add it to the included_files list if already opened * otherwise it will get opened and added to the included_files list in zend_execute_scripts */ - if (primary_file->filename && primary_file->type != ZEND_HANDLE_FILENAME) { + if (primary_file->filename && + primary_file->opened_path == NULL && + primary_file->type != ZEND_HANDLE_FILENAME) { int realfile_len; int dummy = 1; if (VCWD_REALPATH(primary_file->filename, realfile)) { realfile_len = strlen(realfile); zend_hash_add(&EG(included_files), realfile, realfile_len+1, (void *)&dummy, sizeof(int), NULL); - if (strncmp(realfile, primary_file->filename, realfile_len)) { - old_primary_file_path = primary_file->filename; - primary_file->filename = realfile; - } } } @@ -1827,10 +1824,6 @@ zend_set_timeout(INI_INT("max_execution_time")); retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS); - if (old_primary_file_path) { - primary_file->filename = old_primary_file_path; - } - } zend_end_try(); #if HAVE_BROKEN_GETCWD
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php