dmitry Mon Mar 13 09:35:45 2006 UTC
Modified files: (Branch: PHP_5_1)
/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.640.2.18&r2=1.640.2.19&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.18 php-src/main/main.c:1.640.2.19
--- php-src/main/main.c:1.640.2.18 Fri Mar 10 18:19:29 2006
+++ php-src/main/main.c Mon Mar 13 09:35:45 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.18 2006/03/10 18:19:29 bfrance Exp $ */
+/* $Id: main.c,v 1.640.2.19 2006/03/13 09:35:45 dmitry Exp $ */
/* {{{ includes
*/
@@ -1647,7 +1647,6 @@
#else
char *old_cwd;
#endif
- char *old_primary_file_path = NULL;
int retval = 0;
EG(exit_status) = 0;
@@ -1684,16 +1683,15 @@
/* 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)) {
+
+ if (expand_filepath(primary_file->filename, realfile
TSRMLS_CC)) {
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;
- }
}
}
@@ -1722,10 +1720,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