dmitry Mon Jul 21 08:43:36 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main fopen_wrappers.c main.c /php-src/sapi/caudium caudium.c Log: Fixed chdir() into requested file directory inconsistencies http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.3.2.13.2.10&r2=1.175.2.3.2.13.2.11&diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.10 php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.11 --- php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.10 Thu Mar 27 10:33:40 2008 +++ php-src/main/fopen_wrappers.c Mon Jul 21 08:43:36 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fopen_wrappers.c,v 1.175.2.3.2.13.2.10 2008/03/27 10:33:40 dmitry Exp $ */ +/* $Id: fopen_wrappers.c,v 1.175.2.3.2.13.2.11 2008/07/21 08:43:36 dmitry Exp $ */ /* {{{ includes */ @@ -425,9 +425,6 @@ file_handle->opened_path = expand_filepath(filename, NULL TSRMLS_CC); - if (!(SG(options) & SAPI_OPTION_NO_CHDIR)) { - VCWD_CHDIR_FILE(filename); - } SG(request_info).path_translated = filename; file_handle->filename = SG(request_info).path_translated; http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.24&r2=1.640.2.23.2.57.2.25&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.24 php-src/main/main.c:1.640.2.23.2.57.2.25 --- php-src/main/main.c:1.640.2.23.2.57.2.24 Wed Jun 25 12:18:36 2008 +++ php-src/main/main.c Mon Jul 21 08:43:36 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.24 2008/06/25 12:18:36 dmitry Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.25 2008/07/21 08:43:36 dmitry Exp $ */ /* {{{ includes */ @@ -2027,7 +2027,7 @@ PG(during_request_startup) = 0; - if ((primary_file->type == ZEND_HANDLE_FILENAME || primary_file->type == ZEND_HANDLE_STREAM) && primary_file->filename) { + if (primary_file->filename && !(SG(options) & SAPI_OPTION_NO_CHDIR)) { #if HAVE_BROKEN_GETCWD /* this looks nasty to me */ old_cwd_fd = open(".", 0); @@ -2117,7 +2117,7 @@ PG(during_request_startup) = 0; - if (primary_file->type == ZEND_HANDLE_FILENAME && primary_file->filename) { + if (primary_file->filename && !(SG(options) & SAPI_OPTION_NO_CHDIR)) { VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1); VCWD_CHDIR_FILE(primary_file->filename); } http://cvs.php.net/viewvc.cgi/php-src/sapi/caudium/caudium.c?r1=1.36.2.1.2.1.2.2&r2=1.36.2.1.2.1.2.3&diff_format=u Index: php-src/sapi/caudium/caudium.c diff -u php-src/sapi/caudium/caudium.c:1.36.2.1.2.1.2.2 php-src/sapi/caudium/caudium.c:1.36.2.1.2.1.2.3 --- php-src/sapi/caudium/caudium.c:1.36.2.1.2.1.2.2 Tue Mar 18 22:23:20 2008 +++ php-src/sapi/caudium/caudium.c Mon Jul 21 08:43:36 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: caudium.c,v 1.36.2.1.2.1.2.2 2008/03/18 22:23:20 rasmus Exp $ */ +/* $Id: caudium.c,v 1.36.2.1.2.1.2.3 2008/07/21 08:43:36 dmitry Exp $ */ #include "php.h" #ifdef HAVE_CAUDIUM @@ -444,7 +444,7 @@ { /* char buf[512]; */ php_info_print_table_start(); - php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.36.2.1.2.1.2.2 2008/03/18 22:23:20 rasmus Exp $"); + php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.36.2.1.2.1.2.3 2008/07/21 08:43:36 dmitry Exp $"); /* php_info_print_table_row(2, "Build date", Ns_InfoBuildDate()); php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile()); php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog()); @@ -639,15 +639,6 @@ THREADS_ALLOW(); #endif -#ifdef VIRTUAL_DIR - /* Change virtual directory, if the feature is enabled, which is - * (almost) a requirement for PHP in Caudium. Might want to fail if it - * isn't. Not a problem though, since it's on by default when using ZTS - * which we require. - */ - VCWD_CHDIR_FILE(THIS->filename->str); -#endif - file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = THIS->filename->str; file_handle.opened_path = NULL;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php