cellog          Sun Jun 22 00:50:32 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/phar   cgidebug phar.c phar.phar tar.c 
  Log:
  fix inode calculation, we need fname to be set for phar/tar formats prior to 
manifest parsing
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/cgidebug?r1=1.3.2.1&r2=1.3.2.2&diff_format=u
Index: php-src/ext/phar/cgidebug
diff -u php-src/ext/phar/cgidebug:1.3.2.1 php-src/ext/phar/cgidebug:1.3.2.2
--- php-src/ext/phar/cgidebug:1.3.2.1   Sun May 18 23:41:08 2008
+++ php-src/ext/phar/cgidebug   Sun Jun 22 00:50:32 2008
@@ -1,11 +1,11 @@
 #!/bin/sh
-export SCRIPT_NAME=/front.phar.php
-export PATH_INFO=/index.php
-export 
SCRIPT_FILENAME=/home/cellog/workspace/php5/ext/phar/tests/front.phar.php
-export 
PATH_TRANSLATED=/home/cellog/workspace/php5/ext/phar/tests/front.phar.php
+export SCRIPT_NAME=/frontcontroller9.php
+export PATH_INFO=/hi
+export 
SCRIPT_FILENAME=/home/cellog/workspace/php5/ext/phar/tests/cache_list/frontcontroller9.php
+export 
PATH_TRANSLATED=/home/cellog/workspace/php5/ext/phar/tests/cache_list/frontcontroller9.php
 export REDIRECT_STATUS=1
 export REQUEST_METHOD=GET
-export REQUEST_URI=/front.phar.php/index.php
-cd /home/cellog/workspace/php5/
-ddd sapi/cgi/php-cgi &
+export REQUEST_URI=/frontcontroller9.php/hi
+cd /home/cellog/workspace/php5/ext/phar/tests/cache_list
+ddd ../../../../sapi/cgi/php-cgi &
 cd /home/cellog/workspace/php5/ext/phar
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.27&r2=1.370.2.28&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.27 php-src/ext/phar/phar.c:1.370.2.28
--- php-src/ext/phar/phar.c:1.370.2.27  Sat Jun 21 18:57:53 2008
+++ php-src/ext/phar/phar.c     Sun Jun 22 00:50:32 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar.c,v 1.370.2.27 2008/06/21 18:57:53 sfox Exp $ */
+/* $Id: phar.c,v 1.370.2.28 2008/06/22 00:50:32 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -986,6 +986,11 @@
                zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent);
        zend_hash_init(&mydata->virtual_dirs, manifest_count * 2,
                zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent);
+       mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent);
+#ifdef PHP_WIN32
+       phar_unixify_path_separators(mydata->fname, fname_len);
+#endif
+       mydata->fname_len = fname_len;
        offset = halt_offset + manifest_len + 4;
        memset(&entry, 0, sizeof(phar_entry_info));
        entry.phar = mydata;
@@ -1096,11 +1101,6 @@
        mydata->internal_file_start = halt_offset + manifest_len + 4;
        mydata->halt_offset = halt_offset;
        mydata->flags = manifest_flags;
-       mydata->fname = pestrndup(fname, fname_len, mydata->is_persistent);
-#ifdef PHP_WIN32
-       phar_unixify_path_separators(mydata->fname, fname_len);
-#endif
-       mydata->fname_len = fname_len;
        endbuffer = strrchr(mydata->fname, '/');
        if (endbuffer) {
                mydata->ext = memchr(endbuffer, '.', (mydata->fname + 
fname_len) - endbuffer);
@@ -3408,7 +3408,7 @@
        php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
        php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
        php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
-       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.27 $");
+       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.28 $");
        php_info_print_table_row(2, "Phar-based phar archives", "enabled");
        php_info_print_table_row(2, "Tar-based phar archives", "enabled");
        php_info_print_table_row(2, "ZIP-based phar archives", "enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.phar?r1=1.7.2.24&r2=1.7.2.25&diff_format=u
Index: php-src/ext/phar/phar.phar
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.55.2.13&r2=1.55.2.14&diff_format=u
Index: php-src/ext/phar/tar.c
diff -u php-src/ext/phar/tar.c:1.55.2.13 php-src/ext/phar/tar.c:1.55.2.14
--- php-src/ext/phar/tar.c:1.55.2.13    Fri Jun 20 14:40:53 2008
+++ php-src/ext/phar/tar.c      Sun Jun 22 00:50:32 2008
@@ -223,6 +223,11 @@
                zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent);
        zend_hash_init(&myphar->virtual_dirs, 4 + (totalsize >> 11),
                zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent);
+       myphar->fname = pestrndup(fname, fname_len, myphar->is_persistent);
+#ifdef PHP_WIN32
+       phar_unixify_path_separators(myphar->fname, fname_len);
+#endif
+       myphar->fname_len = fname_len;
        myphar->is_tar = 1;
        /* remember whether this entire phar was compressed with gz/bzip2 */
        myphar->flags = compression;
@@ -544,11 +549,6 @@
                return FAILURE;
        }
 
-       myphar->fname = pestrndup(fname, fname_len, myphar->is_persistent);
-#ifdef PHP_WIN32
-       phar_unixify_path_separators(myphar->fname, fname_len);
-#endif
-       myphar->fname_len = fname_len;
        myphar->fp = fp;
        p = strrchr(myphar->fname, '/');
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to