dmitry          Mon Jul 21 08:42:35 2008 UTC

  Modified files:              
    /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.206&r2=1.207&diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.206 php-src/main/fopen_wrappers.c:1.207
--- php-src/main/fopen_wrappers.c:1.206 Thu Mar 27 10:33:52 2008
+++ php-src/main/fopen_wrappers.c       Mon Jul 21 08:42:35 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: fopen_wrappers.c,v 1.206 2008/03/27 10:33:52 dmitry Exp $ */
+/* $Id: fopen_wrappers.c,v 1.207 2008/07/21 08:42:35 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -433,9 +433,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.771&r2=1.772&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.771 php-src/main/main.c:1.772
--- php-src/main/main.c:1.771   Wed Jun 25 12:18:51 2008
+++ php-src/main/main.c Mon Jul 21 08:42:35 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.771 2008/06/25 12:18:51 dmitry Exp $ */
+/* $Id: main.c,v 1.772 2008/07/21 08:42:35 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -2168,7 +2168,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);
@@ -2257,7 +2257,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.40&r2=1.41&diff_format=u
Index: php-src/sapi/caudium/caudium.c
diff -u php-src/sapi/caudium/caudium.c:1.40 php-src/sapi/caudium/caudium.c:1.41
--- php-src/sapi/caudium/caudium.c:1.40 Wed Mar 19 16:37:49 2008
+++ php-src/sapi/caudium/caudium.c      Mon Jul 21 08:42:35 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: caudium.c,v 1.40 2008/03/19 16:37:49 rasmus Exp $ */
+/* $Id: caudium.c,v 1.41 2008/07/21 08:42:35 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.40 
2008/03/19 16:37:49 rasmus Exp $");
+  php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.41 
2008/07/21 08:42:35 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

Reply via email to