[PHP-CVS] Re: svn: /php/php-src/branches/PHP_5_3/ext/phar/tests/ phar_buildfromdirectory6.phpt
Brian Shire wrote: shireSat, 21 Nov 2009 05:40:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291108 Log: MFH: Fix phar regex test when '.php' is part of the path, instead be more specific with '.php$' regex. Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/tests/phar_buildfromdirectory6.phpt Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/phar_buildfromdirectory6.phpt === --- php/php-src/branches/PHP_5_3/ext/phar/tests/phar_buildfromdirectory6.phpt 2009-11-21 05:38:58 UTC (rev 291107) +++ php/php-src/branches/PHP_5_3/ext/phar/tests/phar_buildfromdirectory6.phpt 2009-11-21 05:40:16 UTC (rev 291108) @@ -15,7 +15,7 @@ try { $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory.phar'); - var_dump($phar-buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.php/')); + var_dump($phar-buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.php$/')); } catch (Exception $e) { var_dump(get_class($e)); echo $e-getMessage() . \n; Hi, Thanks for this fix, do you mind merging to pecl/phar/trunk? Thanks, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: svn: /php/php-src/trunk/ext/phar/tests/tar/ bug49910.phpt
David Coallier wrote: davidc Thu, 12 Nov 2009 17:45:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290603 Log: - Added an extra skipif for zlib Changed paths: U php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt Modified: php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt === --- php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt2009-11-12 17:44:57 UTC (rev 290602) +++ php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt2009-11-12 17:45:08 UTC (rev 290603) @@ -2,6 +2,7 @@ Bug #49910: no support for ././@LongLink for long filenames in phar tar support --SKIPIF-- ?php if (!extension_loaded(phar)) die(skip); ? +?php if (!extension_loaded(zlib)) die(skip); ? --FILE-- ?php $fname = str_replace('\\', '/', dirname(__FILE__) . '/files/Structures_Graph-1.0.3.tgz'); @@ -46,4 +47,4 @@ [27] = phar://*/Structures_Graph-1.0.3/tests/testCase/BasicGraph.php [28] = phar://*/package.xml ) -===DONE=== \ No newline at end of file +===DONE=== Thanks David. pecl/phar/trunk/tests/tar/bug49910.phpt is lonely, and wants this patch too. :) Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
cellog Fri, 13 Nov 2009 00:41:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290646 Log: fix completely random ordering of bugs in NEWS (what happened here?) Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-11-13 00:24:43 UTC (rev 290645) +++ php/php-src/branches/PHP_5_3/NEWS 2009-11-13 00:41:37 UTC (rev 290646) @@ -29,27 +29,27 @@ - Fixed bug #50023 (pdo_mysql doesn't use PHP_MYSQL_UNIX_SOCK_ADDR). (Ilia) - Fixed bug #50005 (Throwing through Reflection modified Exception object makes segmentation fault). (Felipe) -- Fixed bug #49910 (no support for ././@LongLink for long filenames in phar - tar support). (Greg) -- Fixed bug #49908 (throwing exception in __autoload crashes when interface - is not defined). (Felipe) -- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private - property in base class). (Felipe) -- Fixed bug #49142 (crash when exception thrown from __tostring()). - (David Soria Parra) - Fixed bug #49990 (SNMP3 warning message about security level printed twice). (Jani) - Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction). (ben dot pineau at gmail dot com, Ilia, Matteo) - Fixed bug #49921 (Curl post upload functions changed). (Ilia) +- Fixed bug #49910 (no support for ././@LongLink for long filenames in phar + tar support). (Greg) +- Fixed bug #49908 (throwing exceptions in __autoload crashes when interface + is not defined). (Felipe) - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). (Ilia, wmeler at wp-sa dot pl) +- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private + property in base class). (Felipe) - Fixed bug #49647 (DOMUserData does not exist). (Rob) - Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd) - Fixed bug #49224 (Compile error due to old DNS functions on AIX systems). (Scott) +- Fixed bug #49142 (crash when exception thrown from __tostring()). + (David Soria Parra) - Fixed bug #49098 (mysqli segfault on error). (Rasmus) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: / pecl/phar/trunk/package.php pecl/phar/trunk/phar_object.c pecl/phar/trunk/tests/phar_begin_setstub_commit.phpt pecl/phar/trunk/tests/phar_begin_setstub_commitU.phpt pecl/phar/trunk/te
cellog Fri, 13 Nov 2009 00:58:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290647 Log: fix PHP Bug #49938: Phar::isBuffering() returns inverted value Bug: http://bugs.php.net/49938 (Analyzed) Phar::isBuffering() returns inverted value Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/phar_object.c U pecl/phar/trunk/tests/phar_begin_setstub_commit.phpt U pecl/phar/trunk/tests/phar_begin_setstub_commitU.phpt U pecl/phar/trunk/tests/tar/phar_begin_setstub_commit.phpt U pecl/phar/trunk/tests/tar/phar_begin_setstub_commitU.phpt U pecl/phar/trunk/tests/zip/phar_begin_setstub_commit.phpt U pecl/phar/trunk/tests/zip/phar_begin_setstub_commitU.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/tests/phar_begin_setstub_commit.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/phar_begin_setstub_commitU.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/phar_begin_setstub_commit.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/phar_begin_setstub_commit.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt U php/php-src/trunk/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/tests/phar_begin_setstub_commit.phpt U php/php-src/trunk/ext/phar/tests/phar_begin_setstub_commitU.phpt U php/php-src/trunk/ext/phar/tests/tar/phar_begin_setstub_commit.phpt U php/php-src/trunk/ext/phar/tests/tar/phar_begin_setstub_commitU.phpt U php/php-src/trunk/ext/phar/tests/zip/phar_begin_setstub_commit.phpt U php/php-src/trunk/ext/phar/tests/zip/phar_begin_setstub_commitU.phpt Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-11-13 00:41:37 UTC (rev 290646) +++ pecl/phar/trunk/package.php 2009-11-13 00:58:11 UTC (rev 290647) @@ -2,6 +2,7 @@ $notes = ' Bugfix release + * Fix PHP Bug #49938: Phar::isBuffering() returns inverted value * Fix PHP Bug #49910: no support for ././@LongLink for long filenames in phar tar support '; Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-11-13 00:41:37 UTC (rev 290646) +++ pecl/phar/trunk/phar_object.c 2009-11-13 00:58:11 UTC (rev 290647) @@ -2945,7 +2945,7 @@ { PHAR_ARCHIVE_OBJECT(); - RETURN_BOOL(!phar_obj-arc.archive-donotflush); + RETURN_BOOL(phar_obj-arc.archive-donotflush); } /* }}} */ Modified: pecl/phar/trunk/tests/phar_begin_setstub_commit.phpt === --- pecl/phar/trunk/tests/phar_begin_setstub_commit.phpt 2009-11-13 00:41:37 UTC (rev 290646) +++ pecl/phar/trunk/tests/phar_begin_setstub_commit.phpt 2009-11-13 00:58:11 UTC (rev 290647) @@ -36,8 +36,8 @@ unlink(dirname(__FILE__) . '/brandnewphar.phar'); ? --EXPECT-- +bool(false) bool(true) -bool(false) string(5) Hello string(84) ?php var_dump(First); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? @@ -45,7 +45,7 @@ string(85) ?php var_dump(Second); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? ===COMMIT=== -bool(true) +bool(false) string(5) Hello string(5) World string(85) ?php var_dump(Second); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? Modified: pecl/phar/trunk/tests/phar_begin_setstub_commitU.phpt === --- pecl/phar/trunk/tests/phar_begin_setstub_commitU.phpt 2009-11-13 00:41:37 UTC (rev 290646) +++ pecl/phar/trunk/tests/phar_begin_setstub_commitU.phpt 2009-11-13 00:58:11 UTC (rev 290647) @@ -36,8 +36,8 @@ unlink(dirname(__FILE__) . '/brandnewphar.phar'); ? --EXPECT-- +bool(false) bool(true) -bool(false) unicode(5) Hello string(84) ?php var_dump(First); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? @@ -45,7 +45,7 @@ string(85) ?php var_dump(Second); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? ===COMMIT=== -bool(true) +bool(false) unicode(5) Hello unicode(5) World string(85) ?php var_dump(Second); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? Modified: pecl/phar/trunk/tests/tar/phar_begin_setstub_commit.phpt === --- pecl/phar/trunk/tests/tar/phar_begin_setstub_commit.phpt 2009-11-13 00:41:37 UTC (rev 290646) +++ pecl/phar/trunk/tests/tar/phar_begin_setstub_commit.phpt 2009-11-13 00:58:11 UTC (rev 290647) @@ -37,8 +37,8 @@ ? --EXPECT-- bool(true) +bool(false) bool(true) -bool(false) string(5) Hello string(84) ?php var_dump(First); Phar::mapPhar(brandnewphar.phar); __HALT_COMPILER(); ? @@ -46,7 +46,7 @@ string(85) ?php
[PHP-CVS] svn: / pear/peardoc/trunk/en/pyrus/extending/registry.xml pecl/phar/trunk/package.php pecl/phar/trunk/php_phar.h pecl/phar/trunk/tar.c pecl/phar/trunk/tests/tar/bug49910.phpt pecl/phar/trunk
cellog Wed, 11 Nov 2009 21:02:59 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290527 Log: fix PHP Bug #49910: no support for ././@LongLink for long filenames in phar tar support Bug: http://bugs.php.net/49910 (Open) no support for ././@LongLink for long filenames in phar tar support Changed paths: U pear/peardoc/trunk/en/pyrus/extending/registry.xml U pecl/phar/trunk/package.php U pecl/phar/trunk/php_phar.h U pecl/phar/trunk/tar.c A pecl/phar/trunk/tests/tar/bug49910.phpt A pecl/phar/trunk/tests/tar/files/Structures_Graph-1.0.3.tgz U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/php_phar.h U php/php-src/branches/PHP_5_3/ext/phar/tar.c A php/php-src/branches/PHP_5_3/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz U php/php-src/trunk/ext/phar/php_phar.h U php/php-src/trunk/ext/phar/tar.c A php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt A php/php-src/trunk/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz Modified: pear/peardoc/trunk/en/pyrus/extending/registry.xml === --- pear/peardoc/trunk/en/pyrus/extending/registry.xml 2009-11-11 21:00:19 UTC (rev 290526) +++ pear/peardoc/trunk/en/pyrus/extending/registry.xml 2009-11-11 21:02:59 UTC (rev 290527) @@ -389,7 +389,7 @@ section xml:id=pyrus.extending.registry.channelregistry infotitleChannel registry/title/info para - This document is a work in progress. + /para /section /section Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-11-11 21:00:19 UTC (rev 290526) +++ pecl/phar/trunk/package.php 2009-11-11 21:02:59 UTC (rev 290527) @@ -1,77 +1,9 @@ ?php $notes = ' -BC BREAKING RELEASE - BC breaks: - * Phar object Compression API is rewritten. Use Phar::compress() and decompress(), - Phar::compressFiles()/decompressFiles() and PharFileInfo-compress()/decompress(). - * phar.extract_list and Phar::getExtractList() are removed - -Major feature functionality release - * phar.cache_list allows web-based phar applications to run at equal or faster than - their on-disk equivalent [Greg] - * new default stub allows running of phar-based phars without phar extension [Greg/Steph] - * add support for tar-based and zip-based phar archives [Greg] - * add support for OpenSSL-based true signatures [Greg] - * add support for signatures to tar-based phar archives [Greg] - * add Phar::isFileFormat() [Greg] - * add Phar::convertToExecutable(), Phar::convertToData() [Greg] - * add Phar::compress() [Greg] - * rename Phar::compressAllFiles() to compressFiles(), uncompressAllFiles() to - decompressFiles() [Greg] - * conversion to compressed or to other file formats automatically copies the archive - to a new extension (i.e. .phar to .phar.tar or .tar to .tar.gz) [Steph] - * add Phar::webPhar() for running a web-based application unmodified - directly from a phar archive [Greg] - * file functions (fopen-based and stat-based) can be instructed to only look for - relative paths within a phar via Phar::interceptFileFuncs() - * add PharData class to allow manipulation/creation of non-executable tar and zip archives. [Steph] - non-executable tar/zip manipulation is allowed even when phar.readonly=1 [Greg] - * paths with . and .. work (phar://blah.phar/a/../b.php = phar://blah.phar/b.php) [Greg] - * add support for mkdir()/rmdir() and support for empty directories to phar file format [Greg] - * add option to compress the entire phar file for phar/tar file format [Greg] - * implement Phar::isCompressed() returning 0, Phar::GZ or Phar::BZ2 [Greg] - * implement Phar::copy(string $from, string $to) [Greg] - * implement Phar::running(), returns path or URL to currently executed phar - * implement Phar::buildFromIterator(Iterator $it[, string $base_directory]) [Greg] - * implement Phar::buildFromDirectory(string $base_directory[, string $regex]) [Steph] - * implement Phar::mount() for mounting external paths or files to locations inside a phar [Greg] - * add Phar::delete() [Greg] - * implement Phar::unlinkArchive() [Greg] - -Security addition - * aliases are validated so that they contain no directory separators as intended - * on conversion to other formats, user-supplied aliases are validated - -Changes since 2.0.0RC2: - fixed PHP Bug #49021: phar tar signature algorithm reports as Unknown (0) in - getSignature() call - fixed PHP Bug #49020: phar misinterprets ustar long filename standard - fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed - fixed PHP Bug #48791: open office files always reported as corrupted - fixed PHP Bug #48783: make install will fail saying phar file exists - fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location - fixed PHP Bug #48681:
[PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_3/ext/phar/phar.c trunk/ext/phar/phar.c
Rasmus Lerdorf wrote: rasmus Mon, 09 Nov 2009 17:21:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290435 Log: Fix bug #50129 Bug: http://bugs.php.net/50129 (Open) phpinfo() reports CVS revision rather than SVN revision Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/phar.c U php/php-src/trunk/ext/phar/phar.c Hi Rasmus, Thanks for the quick fix. Do you mind merging this to trunk and pecl/phar/trunk? Thanks, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_3/ext/phar/tests/zip/phar_stub.phpt trunk/ext/phar/tests/zip/phar_stub.phpt
Dmitry Stogov wrote: dmitry Mon, 21 Sep 2009 15:23:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288535 Log: Fixed tests (removed irrelevant check which makes test to fail from time to time) Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/phar_stub.phpt U php/php-src/trunk/ext/phar/tests/zip/phar_stub.phpt you forgot pecl. Also, this is not an irrelevant check because a bug in the past stored the wrong mtime. Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/skeleton/ php_skeleton.h skeleton.c
cellog Wed, 05 Aug 2009 15:58:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286846 Log: use x.y.z version number, use a #define for version number Changed paths: U php/php-src/trunk/ext/skeleton/php_skeleton.h U php/php-src/trunk/ext/skeleton/skeleton.c Modified: php/php-src/trunk/ext/skeleton/php_skeleton.h === --- php/php-src/trunk/ext/skeleton/php_skeleton.h 2009-08-05 15:47:47 UTC (rev 286845) +++ php/php-src/trunk/ext/skeleton/php_skeleton.h 2009-08-05 15:58:50 UTC (rev 286846) @@ -3,6 +3,8 @@ #ifndef PHP_EXTNAME_H #define PHP_EXTNAME_H +#define PHP_EXTNAME_VERSION 0.1.0 /* Replace with version number for your extension */ + extern zend_module_entry extname_module_entry; #define phpext_extname_ptr extname_module_entry Modified: php/php-src/trunk/ext/skeleton/skeleton.c === --- php/php-src/trunk/ext/skeleton/skeleton.c 2009-08-05 15:47:47 UTC (rev 286845) +++ php/php-src/trunk/ext/skeleton/skeleton.c 2009-08-05 15:58:50 UTC (rev 286846) @@ -41,7 +41,7 @@ PHP_RSHUTDOWN(extname), /* Replace with NULL if there's nothing to do at request end */ PHP_MINFO(extname), #if ZEND_MODULE_API_NO = 20010901 - 0.1, /* Replace with version number for your extension */ + PHP_EXTNAME_VERSION, #endif STANDARD_MODULE_PROPERTIES }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/pear/Makefile.frag PHP_5_3/pear/Makefile.frag
cellog Sun, 02 Aug 2009 19:11:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286687 Log: fix Bug #43857 Bug: http://bugs.php.net/43857 (Assigned) --program-suffix not always reflected everywhere Changed paths: U php/php-src/branches/PHP_5_2/pear/Makefile.frag U php/php-src/branches/PHP_5_3/pear/Makefile.frag Modified: php/php-src/branches/PHP_5_2/pear/Makefile.frag === --- php/php-src/branches/PHP_5_2/pear/Makefile.frag 2009-08-02 17:38:57 UTC (rev 286686) +++ php/php-src/branches/PHP_5_2/pear/Makefile.frag 2009-08-02 19:11:15 UTC (rev 286687) @@ -3,12 +3,15 @@ peardir=$(PEAR_INSTALLDIR) # Skip all php.ini files altogether -PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 +PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0 + WGET = `which wget 2/dev/null` FETCH = `which fetch 2/dev/null` +PEAR_PREFIX = -dp a${program_prefix} +PEAR_SUFFIX = -ds a$(program_suffix) install-pear-installer: $(SAPI_CLI_PATH) - @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d $(peardir) -b $(bindir) + @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d $(peardir) -b $(bindir) ${PEAR_PREFIX} ${PEAR_SUFFIX} install-pear: @echo Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/ @@ -21,9 +24,7 @@ elif test ! -z $(FETCH) test -x $(FETCH); then \ $(FETCH) -o $(builddir)/ http://pear.php.net/install-pear-nozlib.phar; \ else \ - echo ; \ - echo No download utilities found. Don't know how to download PEAR archive.; \ - echo ; \ + $(top_builddir)/sapi/cli/php -n $(srcdir)/fetch.php http://pear.php.net/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \ fi \ fi \ fi Modified: php/php-src/branches/PHP_5_3/pear/Makefile.frag === --- php/php-src/branches/PHP_5_3/pear/Makefile.frag 2009-08-02 17:38:57 UTC (rev 286686) +++ php/php-src/branches/PHP_5_3/pear/Makefile.frag 2009-08-02 19:11:15 UTC (rev 286687) @@ -7,9 +7,11 @@ WGET = `which wget 2/dev/null` FETCH = `which fetch 2/dev/null` +PEAR_PREFIX = -dp a${program_prefix} +PEAR_SUFFIX = -ds a$(program_suffix) install-pear-installer: $(SAPI_CLI_PATH) - @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d $(peardir) -b $(bindir) + @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d $(peardir) -b $(bindir) ${PEAR_PREFIX} ${PEAR_SUFFIX} install-pear: @echo Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/pear/ fetch.php
cellog Sun, 02 Aug 2009 19:13:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286688 Log: add missing fetch.php Changed paths: A php/php-src/branches/PHP_5_2/pear/fetch.php Added: php/php-src/branches/PHP_5_2/pear/fetch.php === --- php/php-src/branches/PHP_5_2/pear/fetch.php (rev 0) +++ php/php-src/branches/PHP_5_2/pear/fetch.php 2009-08-02 19:13:43 UTC (rev 286688) @@ -0,0 +1,76 @@ +?php + +function usage($argv) { +echo Usage:\n; +printf(\tphp %s http://example.com/file localfile\n, $argv[0]); +exit(1); +} + +function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { +static $filesize = null; + +switch($notification_code) { +case STREAM_NOTIFY_RESOLVE: +case STREAM_NOTIFY_AUTH_REQUIRED: +case STREAM_NOTIFY_COMPLETED: +case STREAM_NOTIFY_FAILURE: +case STREAM_NOTIFY_AUTH_RESULT: +/* Ignore */ +break; + +case STREAM_NOTIFY_REDIRECTED: +echo Being redirected to: , $message, \n; +break; + +case STREAM_NOTIFY_CONNECT: +echo Connected...\n; +break; + +case STREAM_NOTIFY_FILE_SIZE_IS: +$filesize = $bytes_max; +echo Filesize: , $filesize, \n; +break; + +case STREAM_NOTIFY_MIME_TYPE_IS: +echo Mime-type: , $message, \n; +break; + +case STREAM_NOTIFY_PROGRESS: +if ($bytes_transferred 0) { +if (!isset($filesize)) { +printf(\rUnknown filesize.. %2d kb done.., $bytes_transferred/1024); +} else { +$length = (int)(($bytes_transferred/$filesize)*100); +printf(\r[%-100s] %d%% (%2d/%2d kb), str_repeat(=, $length). , $length, ($bytes_transferred/1024), $filesize/1024); +} +} +break; +} +} + +isset($argv[1], $argv[2]) or usage($argv); + +if (!isset($_ENV['http_proxy'])) { +$copt = null; +} else { +$copt = array( +'http' = array( +'proxy' = preg_replace('/^http/i', 'tcp', $_ENV['http_proxy']), +'request_fulluri' = true, +), +); +} + +$ctx = stream_context_create($copt, array(notification = stream_notification_callback)); + +$fp = fopen($argv[1], r, false, $ctx); +if (is_resource($fp) file_put_contents($argv[2], $fp)) { +echo \nDone!\n; +exit(0); +} + +$err = error_get_last(); +echo \nError..\n, $err[message], \n; +exit(1); + + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ .gdbinit
cellog Fri, 31 Jul 2009 21:01:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286601 Log: fix invalid use of c syntax instead of .gdbinit syntax Changed paths: U php/php-src/trunk/.gdbinit Modified: php/php-src/trunk/.gdbinit === --- php/php-src/trunk/.gdbinit 2009-07-31 20:09:47 UTC (rev 286600) +++ php/php-src/trunk/.gdbinit 2009-07-31 21:01:18 UTC (rev 286601) @@ -393,11 +393,11 @@ if $p-nKeyLength 0 printf \ - if ($p-key.arKey.u.s[1] == '\0') { + if $p-key.arKey.u.s[1] == '\0' printu $p-key.arKey.u $p-nKeyLength - } else { + else printt $unicode $p-key.arKey.u $p-nKeyLength - } + end printf \ = else printf %d = , $p-h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ php_streams.h
cellog Fri, 31 Jul 2009 23:44:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286603 Log: fix segfault when running run-tests.php, and general potential for corruption by calling php_stream_path_encode for unicode strings, php_stream_path_param_encode decrements the refcount, but never restores it, which can cause freeing of zvals before they are done being used. Changed paths: U php/php-src/trunk/main/php_streams.h Modified: php/php-src/trunk/main/php_streams.h === --- php/php-src/trunk/main/php_streams.h2009-07-31 21:09:45 UTC (rev 286602) +++ php/php-src/trunk/main/php_streams.h2009-07-31 23:44:52 UTC (rev 286603) @@ -422,6 +422,7 @@ if (FAILURE == php_stream_path_encode(NULL, path, path_len, Z_USTRVAL_PP(ppzval), Z_USTRLEN_PP(ppzval), options, context)) { return FAILURE; } + Z_ADDREF_PP(ppzval); /* the conversion removes a refcount */ MAKE_STD_ZVAL(zpath); ZVAL_STRINGL(zpath, path, path_len, 0); Z_UNSET_ISREF_P(zpath); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ .gdbinit
cellog Thu, 30 Jul 2009 22:11:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286570 Log: finish unicode string with quote Changed paths: U php/php-src/trunk/.gdbinit Modified: php/php-src/trunk/.gdbinit === --- php/php-src/trunk/.gdbinit 2009-07-30 20:20:56 UTC (rev 286569) +++ php/php-src/trunk/.gdbinit 2009-07-30 22:11:43 UTC (rev 286570) @@ -239,6 +239,7 @@ if $type == 10 printf (%d): [%p]: \, $zvalue-value.str.len, $zvalue-value.str.val printu $zvalue-value.ustr.val $zvalue-value.str.len + printf \ end if $type 10 end @@ -448,6 +449,9 @@ if $znode-op_type == 8 set $optype = IS_UNUSED end + if $znode-op_type == 16 + set $optype = IS_CV + end printf [0x%08x] %s, $znode, $optype @@ -468,6 +472,9 @@ if $znode-op_type == 8 printf \n end + if $znode-op_type == 16 + printf \n + end end document printzn -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ .gdbinit
cellog Thu, 30 Jul 2009 23:13:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286571 Log: fix hashtable dumping helpers Changed paths: U php/php-src/trunk/.gdbinit Modified: php/php-src/trunk/.gdbinit === --- php/php-src/trunk/.gdbinit 2009-07-30 22:11:43 UTC (rev 286570) +++ php/php-src/trunk/.gdbinit 2009-07-30 23:13:07 UTC (rev 286571) @@ -321,7 +321,7 @@ end else printf \ - printt $unicode $p-key.arKey.u $p-nKeyLength + printt $p-key.type $p-key.arKey.s $p-nKeyLength printf \ = end else @@ -346,7 +346,7 @@ define print_ht set $ind = 1 printf [0x%08x] (%d) {\n, $arg0, $arg0-nNumOfElements - print_ht $arg0 0 1 + print_ht $arg0 1 printf }\n end @@ -357,7 +357,7 @@ define print_htptr set $ind = 1 printf [0x%08x] (%d) {\n, $arg0, $arg0-nNumOfElements - print_ht $arg0 0 0 + print_ht $arg0 0 printf }\n end @@ -368,7 +368,7 @@ define print_htstr set $ind = 1 printf [0x%08x] (%d) {\n, $arg0, $arg0-nNumOfElements - print_ht $arg0 0 2 + print_ht $arg0 2 printf }\n end @@ -390,9 +390,13 @@ set $i = $i - 1 end - if $p-nKeyLength 0 + if $p-nKeyLength 0 printf \ - printt $unicode $p-key.arKey.u $p-nKeyLength + if ($p-key.arKey.u.s[1] == '\0') { + printu $p-key.arKey.u $p-nKeyLength + } else { + printt $unicode $p-key.arKey.u $p-nKeyLength + } printf \ = else printf %d = , $p-h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ .gdbinit
cellog Thu, 30 Jul 2009 23:16:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286572 Log: don't print NULLNULL for null values in a zval Changed paths: U php/php-src/trunk/.gdbinit Modified: php/php-src/trunk/.gdbinit === --- php/php-src/trunk/.gdbinit 2009-07-30 23:13:07 UTC (rev 286571) +++ php/php-src/trunk/.gdbinit 2009-07-30 23:16:42 UTC (rev 286572) @@ -158,8 +158,9 @@ printf ) if $type == 0 printf NULL + else + printz_type $type end - printz_type $type if $type == 1 printf : %ld, $zvalue-value.lval end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ run-tests.php
cellog Wed, 29 Jul 2009 09:22:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286499 Log: fix EXPECTF tests that have binary in their output by always processing output and expected output as binary Changed paths: U php/php-src/trunk/run-tests.php Modified: php/php-src/trunk/run-tests.php === --- php/php-src/trunk/run-tests.php 2009-07-29 09:10:52 UTC (rev 286498) +++ php/php-src/trunk/run-tests.php 2009-07-29 09:22:57 UTC (rev 286499) @@ -1023,7 +1023,7 @@ { global $leak_check, $cwd; - $data = ''; + $data = b''; $bin_env = array(); foreach((array)$env as $key = $value) { @@ -1059,23 +1059,23 @@ break; } else if ($n === 0) { /* timed out */ - $data .= \n ** ERROR: process timed out **\n; + $data .= b\n ** ERROR: process timed out **\n; proc_terminate($proc); return $data; } else if ($n 0) { - $line = fread($pipes[1], 8192); + $line = (binary) fread($pipes[1], 8192); if (strlen($line) == 0) { /* EOF */ break; } - $data .= (binary) $line; + $data .= $line; } } $stat = proc_get_status($proc); if ($stat['signaled']) { - $data .= \nTermsig= . $stat['stopsig']; + $data .= b\nTermsig= . $stat['stopsig']; } $code = proc_close($proc); @@ -1649,7 +1649,7 @@ COMMAND $cmd ; - $out = system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null); + $out = (binary) system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null); if (array_key_exists('CLEAN', $section_text) (!$no_clean || $cfg['keep']['clean'])) { @@ -1686,19 +1686,19 @@ } // Does the output match what is expected? - $output = preg_replace(/\r\n/, \n, trim($out)); + $output = preg_replace(b/\r\n/, b\n, trim($out)); /* when using CGI, strip the headers from the output */ - $headers = ; + $headers = b; - if (isset($old_php) preg_match(/^(.*?)\r?\n\r?\n(.*)/s, $out, $match)) { + if (isset($old_php) preg_match(b/^(.*?)\r?\n\r?\n(.*)/s, $out, $match)) { $output = trim($match[2]); - $rh = preg_split(/[\n\r]+/, $match[1]); + $rh = preg_split(b/[\n\r]+/, $match[1]); $headers = array(); foreach ($rh as $line) { - if (strpos($line, ':') !== false) { -$line = explode(':', $line, 2); + if (strpos($line, b':') !== false) { +$line = explode(b':', $line, 2); $headers[trim($line[0])] = trim($line[1]); } } @@ -1709,13 +1709,13 @@ if (isset($section_text['EXPECTHEADERS'])) { $want = array(); $wanted_headers = array(); - $lines = preg_split(/[\n\r]+/, $section_text['EXPECTHEADERS']); + $lines = preg_split(b/[\n\r]+/, (binary) $section_text['EXPECTHEADERS']); foreach($lines as $line) { - if (strpos($line, ':') !== false) { -$line = explode(':', $line, 2); + if (strpos($line, b':') !== false) { +$line = explode(b':', $line, 2); $want[trim($line[0])] = trim($line[1]); -$wanted_headers[] = trim($line[0]) . ': ' . trim($line[1]); +$wanted_headers[] = trim($line[0]) . b': ' . trim($line[1]); } } @@ -1727,7 +1727,7 @@ if (isset($org_headers[$k])) { $headers = $org_headers[$k]; -$output_headers[] = $k . ': ' . $org_headers[$k]; +$output_headers[] = $k . b': ' . $org_headers[$k]; } if (!isset($org_headers[$k]) || $org_headers[$k] != $v) { @@ -1736,9 +1736,9 @@ } ksort($wanted_headers); - $wanted_headers = join(\n, $wanted_headers); + $wanted_headers = join(b\n, $wanted_headers); ksort($output_headers); - $output_headers = join(\n, $output_headers); + $output_headers = join(b\n, $output_headers); } show_file_block('out', $output); @@ -1752,13 +1752,13 @@ } show_file_block('exp', $wanted); - $wanted_re = preg_replace('/\r\n/', \n, $wanted); + $wanted_re = preg_replace(b'/\r\n/', b\n, $wanted); if (isset($section_text['EXPECTF'])) { // do preg_quote, but miss out any %r delimited sections - $temp = ; - $r = %r; + $temp = b; + $r = b%r; $startOffset = 0; $length = strlen($wanted_re); while($startOffset $length) { @@ -1775,45 +1775,45 @@ $start = $end = $length; } // quote a non re portion of the string -$temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); +$temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), b'/'); // add the re unquoted. -$temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')'; +$temp = $temp . b'(' . substr($wanted_re, $start+2, ($end - $start-2)). b')'; $startOffset = $end + 2; } $wanted_re = $temp; $wanted_re = str_replace( -array('%binary_string_optional%'), -version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'binary string', +array(b'%binary_string_optional%'), +version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? b'string' : b'binary string',
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/run-tests.php PHP_5_3/run-tests.php
cellog Wed, 29 Jul 2009 10:06:55 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286503 Log: sync run-tests.php with revision 286499 changes making php 6 tests with EXPECTF that can have arbitrary binary data in output work Changed paths: U php/php-src/branches/PHP_5_2/run-tests.php U php/php-src/branches/PHP_5_3/run-tests.php Modified: php/php-src/branches/PHP_5_2/run-tests.php === --- php/php-src/branches/PHP_5_2/run-tests.php 2009-07-29 10:05:12 UTC (rev 286502) +++ php/php-src/branches/PHP_5_2/run-tests.php 2009-07-29 10:06:55 UTC (rev 286503) @@ -1023,7 +1023,7 @@ { global $leak_check, $cwd; - $data = ''; + $data = b''; $bin_env = array(); foreach((array)$env as $key = $value) { @@ -1059,23 +1059,23 @@ break; } else if ($n === 0) { /* timed out */ - $data .= \n ** ERROR: process timed out **\n; + $data .= b\n ** ERROR: process timed out **\n; proc_terminate($proc); return $data; } else if ($n 0) { - $line = fread($pipes[1], 8192); + $line = (binary) fread($pipes[1], 8192); if (strlen($line) == 0) { /* EOF */ break; } - $data .= (binary) $line; + $data .= $line; } } $stat = proc_get_status($proc); if ($stat['signaled']) { - $data .= \nTermsig= . $stat['stopsig']; + $data .= b\nTermsig= . $stat['stopsig']; } $code = proc_close($proc); @@ -1140,7 +1140,6 @@ global $leak_check, $temp_source, $temp_target, $cfg, $environment; global $no_clean; global $valgrind_version; - $temp_filenames = null; $org_file = $file; @@ -1649,7 +1648,7 @@ COMMAND $cmd ; - $out = system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null); + $out = (binary) system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null); if (array_key_exists('CLEAN', $section_text) (!$no_clean || $cfg['keep']['clean'])) { @@ -1686,19 +1685,19 @@ } // Does the output match what is expected? - $output = preg_replace(/\r\n/, \n, trim($out)); + $output = preg_replace(b/\r\n/, b\n, trim($out)); /* when using CGI, strip the headers from the output */ - $headers = ; + $headers = b; - if (isset($old_php) preg_match(/^(.*?)\r?\n\r?\n(.*)/s, $out, $match)) { + if (isset($old_php) preg_match(b/^(.*?)\r?\n\r?\n(.*)/s, $out, $match)) { $output = trim($match[2]); - $rh = preg_split(/[\n\r]+/, $match[1]); + $rh = preg_split(b/[\n\r]+/, $match[1]); $headers = array(); foreach ($rh as $line) { - if (strpos($line, ':') !== false) { -$line = explode(':', $line, 2); + if (strpos($line, b':') !== false) { +$line = explode(b':', $line, 2); $headers[trim($line[0])] = trim($line[1]); } } @@ -1709,13 +1708,13 @@ if (isset($section_text['EXPECTHEADERS'])) { $want = array(); $wanted_headers = array(); - $lines = preg_split(/[\n\r]+/, $section_text['EXPECTHEADERS']); + $lines = preg_split(b/[\n\r]+/, (binary) $section_text['EXPECTHEADERS']); foreach($lines as $line) { - if (strpos($line, ':') !== false) { -$line = explode(':', $line, 2); + if (strpos($line, b':') !== false) { +$line = explode(b':', $line, 2); $want[trim($line[0])] = trim($line[1]); -$wanted_headers[] = trim($line[0]) . ': ' . trim($line[1]); +$wanted_headers[] = trim($line[0]) . b': ' . trim($line[1]); } } @@ -1727,7 +1726,7 @@ if (isset($org_headers[$k])) { $headers = $org_headers[$k]; -$output_headers[] = $k . ': ' . $org_headers[$k]; +$output_headers[] = $k . b': ' . $org_headers[$k]; } if (!isset($org_headers[$k]) || $org_headers[$k] != $v) { @@ -1736,9 +1735,9 @@ } ksort($wanted_headers); - $wanted_headers = join(\n, $wanted_headers); + $wanted_headers = join(b\n, $wanted_headers); ksort($output_headers); - $output_headers = join(\n, $output_headers); + $output_headers = join(b\n, $output_headers); } show_file_block('out', $output); @@ -1752,13 +1751,13 @@ } show_file_block('exp', $wanted); - $wanted_re = preg_replace('/\r\n/', \n, $wanted); + $wanted_re = preg_replace(b'/\r\n/', b\n, $wanted); if (isset($section_text['EXPECTF'])) { // do preg_quote, but miss out any %r delimited sections - $temp = ; - $r = %r; + $temp = b; + $r = b%r; $startOffset = 0; $length = strlen($wanted_re); while($startOffset $length) { @@ -1775,45 +1774,45 @@ $start = $end = $length; } // quote a non re portion of the string -$temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), '/'); +$temp = $temp . preg_quote(substr($wanted_re, $startOffset, ($start - $startOffset)), b'/'); // add the re unquoted. -$temp = $temp . '(' . substr($wanted_re, $start+2, ($end - $start-2)). ')'; +$temp = $temp . b'(' . substr($wanted_re, $start+2, ($end - $start-2)). b')'; $startOffset = $end + 2;
[PHP-CVS] svn: /php/php-src/trunk/ run-tests.php
cellog Wed, 29 Jul 2009 16:14:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286517 Log: restore removed line (thanks Jani) Changed paths: U php/php-src/trunk/run-tests.php Modified: php/php-src/trunk/run-tests.php === --- php/php-src/trunk/run-tests.php 2009-07-29 15:41:21 UTC (rev 286516) +++ php/php-src/trunk/run-tests.php 2009-07-29 16:14:07 UTC (rev 286517) @@ -1140,6 +1140,7 @@ global $leak_check, $temp_source, $temp_target, $cfg, $environment; global $no_clean; global $valgrind_version; + $temp_filenames = null; $org_file = $file; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: / pecl/phar/trunk/package.php pecl/phar/trunk/package.xml pecl/phar/trunk/phar_object.c pecl/phar/trunk/php_phar.h pecl/phar/trunk/tests/bug46032.phpt pecl/phar/trunk/tests/cache_li
Jani Taskinen wrote: On 07/29/2009 01:14 PM, Greg Beaver wrote: cellog Wed, 29 Jul 2009 10:14:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286504 Log: make phar tests pass in php 5.2, prepare for release of pecl/phar 2.0.0, merge Gwynne's TSRM fix to phar_object.c to other branches Changed paths: [snip] U php/php-src/trunk/run-tests.php Why the removing of that empty line in this file again..? :) It's out of sync in other branches, again. Hi, Thanks for this catch, I had been peppering debug statements throughout run-tests.php to try to locate the cause of a recurring segfault before I figured out how to simply run make test within gdb, and must have thought there was no newline when I removed the debug statement there. It looks like occasionally values returned from internal functions (getcwd, getenv are 2 examples) that do RETURN_RT_STRING() have their unicode values efree()d, but this efree is erratic at best, so there must be some kind of corruption happening (yes, I did vcsclean and rebuild to eliminate PEBKAC) :) Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: / pecl/phar/trunk/package.php pecl/phar/trunk/package.xml php/php-src/branches/PHP_5_3/ext/phar/package.php php/php-src/branches/PHP_5_3/ext/phar/package.xml php/php-src/trunk/ext/phar/
cellog Wed, 29 Jul 2009 16:29:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286521 Log: oops, released as beta instead of stable, Gwynne: svn rm tags/RELEASE_2_0_0 fails, perhaps this can be allowed? Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/package.xml U php/php-src/branches/PHP_5_3/ext/phar/package.php U php/php-src/branches/PHP_5_3/ext/phar/package.xml U php/php-src/trunk/ext/phar/package.php U php/php-src/trunk/ext/phar/package.xml Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-29 16:20:25 UTC (rev 286520) +++ pecl/phar/trunk/package.php 2009-07-29 16:29:30 UTC (rev 286521) @@ -124,8 +124,8 @@ $package-addRelease(); $package-setReleaseVersion(phpversion('phar')); $package-setAPIVersion(Phar::apiVersion()); -$package-setReleaseStability('beta'); -$package-setAPIStability('beta'); +$package-setReleaseStability('stable'); +$package-setAPIStability('stable'); $package-setNotes(\n$notes\n); //$package-addGlobalReplacement('package-info', '@package_version@', 'version'); $package-generateContents(); Modified: pecl/phar/trunk/package.xml === --- pecl/phar/trunk/package.xml 2009-07-29 16:20:25 UTC (rev 286520) +++ pecl/phar/trunk/package.xml 2009-07-29 16:29:30 UTC (rev 286521) @@ -49,8 +49,8 @@ api1.1.1/api /version stability - releasebeta/release - apibeta/api + releasestable/release + apistable/api /stability license uri=http://www.php.net/license;PHP License/license notes Modified: php/php-src/branches/PHP_5_3/ext/phar/package.php === --- php/php-src/branches/PHP_5_3/ext/phar/package.php 2009-07-29 16:20:25 UTC (rev 286520) +++ php/php-src/branches/PHP_5_3/ext/phar/package.php 2009-07-29 16:29:30 UTC (rev 286521) @@ -124,8 +124,8 @@ $package-addRelease(); $package-setReleaseVersion(phpversion('phar')); $package-setAPIVersion(Phar::apiVersion()); -$package-setReleaseStability('beta'); -$package-setAPIStability('beta'); +$package-setReleaseStability('stable'); +$package-setAPIStability('stable'); $package-setNotes(\n$notes\n); //$package-addGlobalReplacement('package-info', '@package_version@', 'version'); $package-generateContents(); Modified: php/php-src/branches/PHP_5_3/ext/phar/package.xml === --- php/php-src/branches/PHP_5_3/ext/phar/package.xml 2009-07-29 16:20:25 UTC (rev 286520) +++ php/php-src/branches/PHP_5_3/ext/phar/package.xml 2009-07-29 16:29:30 UTC (rev 286521) @@ -49,8 +49,8 @@ api1.1.1/api /version stability - releasebeta/release - apibeta/api + releasestable/release + apistable/api /stability license uri=http://www.php.net/license;PHP License/license notes Modified: php/php-src/trunk/ext/phar/package.php === --- php/php-src/trunk/ext/phar/package.php 2009-07-29 16:20:25 UTC (rev 286520) +++ php/php-src/trunk/ext/phar/package.php 2009-07-29 16:29:30 UTC (rev 286521) @@ -124,8 +124,8 @@ $package-addRelease(); $package-setReleaseVersion(phpversion('phar')); $package-setAPIVersion(Phar::apiVersion()); -$package-setReleaseStability('beta'); -$package-setAPIStability('beta'); +$package-setReleaseStability('stable'); +$package-setAPIStability('stable'); $package-setNotes(\n$notes\n); //$package-addGlobalReplacement('package-info', '@package_version@', 'version'); $package-generateContents(); Modified: php/php-src/trunk/ext/phar/package.xml === --- php/php-src/trunk/ext/phar/package.xml 2009-07-29 16:20:25 UTC (rev 286520) +++ php/php-src/trunk/ext/phar/package.xml 2009-07-29 16:29:30 UTC (rev 286521) @@ -49,8 +49,8 @@ api1.1.1/api /version stability - releasebeta/release - apibeta/api + releasestable/release + apistable/api /stability license uri=http://www.php.net/license;PHP License/license notes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: svn: /php/php-src/ branches/PHP_5_3/ext/phar/phar_object.c trunk/ext/phar/phar_object.c
Felipe Pena wrote: felipe Wed, 29 Jul 2009 16:17:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286518 Log: - Fixed memleak on Phar::mungServer() Changed paths: U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/phar_object.c Hi Felipe, don't forget pecl/phar/trunk/phar_object.c Thanks, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ .gdbinit
cellog Wed, 29 Jul 2009 23:18:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286537 Log: make dump_bt work with unicode function names Changed paths: U php/php-src/trunk/.gdbinit Modified: php/php-src/trunk/.gdbinit === --- php/php-src/trunk/.gdbinit 2009-07-29 23:04:36 UTC (rev 286536) +++ php/php-src/trunk/.gdbinit 2009-07-29 23:18:41 UTC (rev 286537) @@ -15,27 +15,6 @@ ZTS detection is automatically based on ext/standard module struct end -define dump_bt - set $t = $arg0 - while $t - printf [0x%08x] , $t - if $t-function_state.function-common.function_name - printf %s() , $t-function_state.function-common.function_name - else - printf ??? - end - if $t-op_array != 0 - printf %s:%d , $t-op_array-filename, $t-opline-lineno - end - set $t = $t-prev_execute_data - printf \n - end -end - -document dump_bt - dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data -end - define printztype printz_type $arg0 printf \n @@ -146,6 +125,28 @@ If unicode is 1 the function calls printu, else it uses printf. end +define dump_bt + set $t = $arg0 + while $t + printf [0x%08x] , $t + if $t-function_state.function-common.function_name + printu $t-function_state.function-common.function_name.u 50 + printf () + else + printf ??? + end + if $t-op_array != 0 + printf %s:%d , $t-op_array-filename, $t-opline-lineno + end + set $t = $t-prev_execute_data + printf \n + end +end + +document dump_bt + dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data +end + define printzv_contents set $zvalue = $arg0 set $type = $zvalue-type -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ pear_avail
cellog Sat, 25 Jul 2009 16:30:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286313 Log: give the global folks and global pear folks access to pear2 as well Changed paths: U SVNROOT/pear_avail Modified: SVNROOT/pear_avail === --- SVNROOT/pear_avail 2009-07-25 15:51:16 UTC (rev 286312) +++ SVNROOT/pear_avail 2009-07-25 16:30:41 UTC (rev 286313) @@ -16,12 +16,12 @@ # The PHP Developers have full access to the full source trees for # PHP and PEAR, as well as the documentation. -avail|mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,jani,kguest,rquadling,saltybea! gle|pear/packages,pear/peardoc +avail|mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,jani,kguest,rquadling,saltybea! gle|pear/packages,pear/peardoc,pear2 # The PEAR Team has access to the full PEAR tree, the PEAR portion of # the PHP tree, the PEAR website, and the PEAR documentation. -avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,darknoise,! tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate,anant,hirose31,amistry,thesee,jausions,ostborn,wiesemann,amir,clockwerx|pear/packages,pear/peardoc
[PHP-CVS] svn: / pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.inc pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.zip pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.inc pecl/ph
cellog Sun, 26 Jul 2009 00:39:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286337 Log: fix zip front controller tests for php6 Changed paths: U pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.inc U pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.zip U pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.inc U pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.zip U pecl/phar/trunk/tests/zip/files/frontcontroller4.phar.inc U pecl/phar/trunk/tests/zip/files/frontcontroller4.phar.zip U pecl/phar/trunk/tests/zip/frontcontroller21.phar.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/frontcontroller12.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/frontcontroller12.phar.zip U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/frontcontroller3.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/frontcontroller3.phar.zip U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/frontcontroller4.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/frontcontroller4.phar.zip U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/frontcontroller21.phar.phpt U php/php-src/trunk/ext/phar/tests/zip/files/frontcontroller12.phar.inc U php/php-src/trunk/ext/phar/tests/zip/files/frontcontroller12.phar.zip U php/php-src/trunk/ext/phar/tests/zip/files/frontcontroller3.phar.inc U php/php-src/trunk/ext/phar/tests/zip/files/frontcontroller3.phar.zip U php/php-src/trunk/ext/phar/tests/zip/files/frontcontroller4.phar.inc U php/php-src/trunk/ext/phar/tests/zip/files/frontcontroller4.phar.zip U php/php-src/trunk/ext/phar/tests/zip/frontcontroller21.phar.phpt Modified: pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.inc === --- pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.inc 2009-07-26 00:35:17 UTC (rev 286336) +++ pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.inc 2009-07-26 00:39:40 UTC (rev 286337) @@ -3,13 +3,13 @@ $a = new Phar(dirname(__FILE__) . '/frontcontroller12.phar.zip'); $a['index.php'] = '?php var_dump($_SERVER[PHP_SELF]); -var_dump($_SERVER[SCRIPT_NAME]); -var_dump($_SERVER[SCRIPT_FILENAME]); -var_dump($_SERVER[REQUEST_URI]); -var_dump($_SERVER[PHAR_PHP_SELF]); -var_dump($_SERVER[PHAR_SCRIPT_NAME]); -var_dump($_SERVER[PHAR_SCRIPT_FILENAME]); -var_dump($_SERVER[PHAR_REQUEST_URI]); +var_dump($_SERVER[bSCRIPT_NAME]); +var_dump($_SERVER[bSCRIPT_FILENAME]); +var_dump($_SERVER[bREQUEST_URI]); +var_dump($_SERVER[bPHAR_PHP_SELF]); +var_dump($_SERVER[bPHAR_SCRIPT_NAME]); +var_dump($_SERVER[bPHAR_SCRIPT_FILENAME]); +var_dump($_SERVER[bPHAR_REQUEST_URI]); '; $a-setStub('?php Phar::mungServer(array(PHP_SELF, SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI)); Modified: pecl/phar/trunk/tests/zip/files/frontcontroller12.phar.zip === (Binary files differ) Modified: pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.inc === --- pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.inc 2009-07-26 00:35:17 UTC (rev 286336) +++ pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.inc 2009-07-26 00:39:40 UTC (rev 286337) @@ -7,7 +7,7 @@ $a-setStub('?php function s($a) { -static $b = array(/hi = a.phps); +static $b = array(b/hi = ba.phps); if (isset($b[$a])) return $b[$a]; return $a; } Modified: pecl/phar/trunk/tests/zip/files/frontcontroller3.phar.zip === (Binary files differ) Modified: pecl/phar/trunk/tests/zip/files/frontcontroller4.phar.inc === --- pecl/phar/trunk/tests/zip/files/frontcontroller4.phar.inc 2009-07-26 00:35:17 UTC (rev 286336) +++ pecl/phar/trunk/tests/zip/files/frontcontroller4.phar.inc 2009-07-26 00:39:40 UTC (rev 286337) @@ -7,7 +7,7 @@ $a-setStub('?php function s($a) { -static $b = array(/hi = false); +static $b = array(b/hi = false); if (isset($b[$a])) return $b[$a]; return $a; } Modified: pecl/phar/trunk/tests/zip/files/frontcontroller4.phar.zip === (Binary files differ) Modified: pecl/phar/trunk/tests/zip/frontcontroller21.phar.phpt === --- pecl/phar/trunk/tests/zip/frontcontroller21.phar.phpt 2009-07-26 00:35:17 UTC (rev 286336) +++ pecl/phar/trunk/tests/zip/frontcontroller21.phar.phpt 2009-07-26 00:39:40 UTC (rev 286337) @@ -15,8 +15,8 @@ --EXPECTHEADERS-- Content-type: text/html; charset=UTF-8 --EXPECTF-- +%unicode|string%(10) /index.php string(10) /index.php -string(10) /index.php string(%d)
[PHP-CVS] svn: / pecl/phar/trunk/phar.c pecl/phar/trunk/phar_internal.h pecl/phar/trunk/phar_object.c pecl/phar/trunk/tar.c pecl/phar/trunk/zip.c php/php-src/branches/PHP_5_3/ext/phar/phar.c php/php-s
cellog Sun, 26 Jul 2009 01:03:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286338 Log: re-organize slightly, fix more php6-only compile warnings in php_stream_copy_to_mem Changed paths: U pecl/phar/trunk/phar.c U pecl/phar/trunk/phar_internal.h U pecl/phar/trunk/phar_object.c U pecl/phar/trunk/tar.c U pecl/phar/trunk/zip.c U php/php-src/branches/PHP_5_3/ext/phar/phar.c U php/php-src/branches/PHP_5_3/ext/phar/phar_internal.h U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/tar.c U php/php-src/branches/PHP_5_3/ext/phar/zip.c U php/php-src/trunk/ext/phar/phar.c U php/php-src/trunk/ext/phar/phar_internal.h U php/php-src/trunk/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/tar.c U php/php-src/trunk/ext/phar/zip.c Modified: pecl/phar/trunk/phar.c === --- pecl/phar/trunk/phar.c 2009-07-26 00:39:40 UTC (rev 286337) +++ pecl/phar/trunk/phar.c 2009-07-26 01:03:47 UTC (rev 286338) @@ -2647,7 +2647,11 @@ len = -len; } user_stub = 0; +#if PHP_MAJOR_VERSION = 6 + if (!(len = php_stream_copy_to_mem(stubfile, (void **) user_stub, len, 0)) || !user_stub) { +#else if (!(len = php_stream_copy_to_mem(stubfile, user_stub, len, 0)) || !user_stub) { +#endif if (closeoldfile) { php_stream_close(oldfile); } Modified: pecl/phar/trunk/phar_internal.h === --- pecl/phar/trunk/phar_internal.h 2009-07-26 00:39:40 UTC (rev 286337) +++ pecl/phar/trunk/phar_internal.h 2009-07-26 01:03:47 UTC (rev 286338) @@ -546,6 +546,38 @@ b = ZSTR(a); #define PHAR_STR_FREE(a) \ efree(a); +static inline int phar_make_unicode(zstr *c_var, char *arKey, uint nKeyLength TSRMLS_DC) +{ + int c_var_len; + UConverter *conv = ZEND_U_CONVERTER(UG(runtime_encoding_conv)); + + c_var-u = NULL; + if (zend_string_to_unicode(conv, c_var-u, c_var_len, arKey, nKeyLength TSRMLS_CC) == FAILURE) { + + if (c_var-u) { + efree(c_var-u); + } + return 0; + + } + return c_var_len; +} +static inline int phar_find_key(HashTable *_SERVER, char *key, int len, void **stuff TSRMLS_DC) +{ + if (SUCCESS == zend_hash_find(_SERVER, key, len, stuff)) { + return 1; + } else { + int s = len; + zstr var; + s = phar_make_unicode(var, key, len TSRMLS_CC); + if (SUCCESS == zend_u_hash_find(_SERVER, IS_UNICODE, var, s, stuff)) { + efree(var.u); + return 1; + } + efree(var.u); + return 0; + } +} #else typedef char *phar_zstr; #define PHAR_STR(a, b) \ Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-26 00:39:40 UTC (rev 286337) +++ pecl/phar/trunk/phar_object.c 2009-07-26 01:03:47 UTC (rev 286338) @@ -56,40 +56,6 @@ } /* }}} */ -#if PHP_MAJOR_VERSION = 6 -static inline int phar_make_unicode(zstr *c_var, char *arKey, uint nKeyLength TSRMLS_DC) -{ - int c_var_len; - UConverter *conv = ZEND_U_CONVERTER(UG(runtime_encoding_conv)); - - c_var-u = NULL; - if (zend_string_to_unicode(conv, c_var-u, c_var_len, arKey, nKeyLength TSRMLS_CC) == FAILURE) { - - if (c_var-u) { - efree(c_var-u); - } - return 0; - - } - return c_var_len; -} -static inline int phar_find_key(HashTable *_SERVER, char *key, int len, void **stuff TSRMLS_DC) -{ - if (SUCCESS == zend_hash_find(_SERVER, key, len, stuff)) { - return 1; - } else { - int s = len; - zstr var; - s = phar_make_unicode(var, key, len TSRMLS_CC); - if (SUCCESS == zend_u_hash_find(_SERVER, IS_UNICODE, var, s, stuff)) { - efree(var.u); - return 1; - } - efree(var.u); - return 0; - } -} -#endif static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int request_uri_len TSRMLS_DC) /* {{{ */ { #if PHP_MAJOR_VERSION = 6 Modified: pecl/phar/trunk/tar.c === --- pecl/phar/trunk/tar.c 2009-07-26 00:39:40 UTC (rev 286337) +++ pecl/phar/trunk/tar.c 2009-07-26 01:03:47 UTC (rev 286338) @@ -928,7 +928,11 @@ len = -len; } user_stub = 0; +#if PHP_MAJOR_VERSION = 6 + if (!(len = php_stream_copy_to_mem(stubfile, (void **) user_stub, len, 0)) || !user_stub) { +#else if (!(len = php_stream_copy_to_mem(stubfile, user_stub, len, 0)) || !user_stub) { +#endif if (error) { spprintf(error, 0, unable to read resource to copy stub to new tar-based phar \%s\, phar-fname); } Modified: pecl/phar/trunk/zip.c === --- pecl/phar/trunk/zip.c 2009-07-26 00:39:40 UTC (rev 286337) +++ pecl/phar/trunk/zip.c 2009-07-26 01:03:47 UTC (rev 286338) @@ -600,7 +600,11 @@ php_stream_filter_append(fp-readfilters, filter); +#if PHP_MAJOR_VERSION = 6 +if (!(entry.uncompressed_filesize =
[PHP-CVS] svn: / pecl/phar/trunk/stream.c pecl/phar/trunk/tests/create_new_and_modify.phpt pecl/phar/trunk/tests/phar_ctx_001.phpt pecl/phar/trunk/tests/readfile_edgecases.phpt pecl/phar/trunk/tests/r
cellog Sun, 26 Jul 2009 01:24:12 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286339 Log: fix basic phar test issues, failing tests phar_oo_009.phpt and phar_buildfromiterator10.phpt are due to bugs in Spl Changed paths: U pecl/phar/trunk/stream.c U pecl/phar/trunk/tests/create_new_and_modify.phpt U pecl/phar/trunk/tests/phar_ctx_001.phpt U pecl/phar/trunk/tests/readfile_edgecases.phpt A pecl/phar/trunk/tests/readfile_edgecasesU.phpt U php/php-src/branches/PHP_5_3/ext/phar/stream.c U php/php-src/branches/PHP_5_3/ext/phar/tests/create_new_and_modify.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/phar_ctx_001.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/readfile_edgecases.phpt A php/php-src/branches/PHP_5_3/ext/phar/tests/readfile_edgecasesU.phpt U php/php-src/trunk/ext/phar/stream.c U php/php-src/trunk/ext/phar/tests/create_new_and_modify.phpt U php/php-src/trunk/ext/phar/tests/phar_ctx_001.phpt U php/php-src/trunk/ext/phar/tests/readfile_edgecases.phpt Modified: pecl/phar/trunk/stream.c === --- pecl/phar/trunk/stream.c 2009-07-26 01:03:47 UTC (rev 286338) +++ pecl/phar/trunk/stream.c 2009-07-26 01:24:12 UTC (rev 286339) @@ -207,18 +207,30 @@ fpf = php_stream_alloc(phar_ops, idata, NULL, mode); php_url_free(resource); efree(internal_file); +#if PHP_MAJOR_VERSION = 6 + if (context context-options phar_find_key(HASH_OF(context-options), phar, sizeof(phar), (void**)pzoption TSRMLS_CC)) { +#else if (context context-options zend_hash_find(HASH_OF(context-options), phar, sizeof(phar), (void**)pzoption) == SUCCESS) { +#endif pharcontext = HASH_OF(*pzoption); if (idata-internal_file-uncompressed_filesize == 0 idata-internal_file-compressed_filesize == 0 +#if PHP_MAJOR_VERSION = 6 + phar_find_key(pharcontext, compress, sizeof(compress), (void**)pzoption TSRMLS_CC) +#else zend_hash_find(pharcontext, compress, sizeof(compress), (void**)pzoption) == SUCCESS +#endif Z_TYPE_PP(pzoption) == IS_LONG (Z_LVAL_PP(pzoption) ~PHAR_ENT_COMPRESSION_MASK) == 0 ) { idata-internal_file-flags = ~PHAR_ENT_COMPRESSION_MASK; idata-internal_file-flags |= Z_LVAL_PP(pzoption); } +#if PHP_MAJOR_VERSION = 6 + if (phar_find_key(pharcontext, metadata, sizeof(metadata), (void**)pzoption TSRMLS_CC)) { +#else if (zend_hash_find(pharcontext, metadata, sizeof(metadata), (void**)pzoption) == SUCCESS) { +#endif if (idata-internal_file-metadata) { zval_ptr_dtor(idata-internal_file-metadata); idata-internal_file-metadata = NULL; Modified: pecl/phar/trunk/tests/create_new_and_modify.phpt === --- pecl/phar/trunk/tests/create_new_and_modify.phpt 2009-07-26 01:03:47 UTC (rev 286338) +++ pecl/phar/trunk/tests/create_new_and_modify.phpt 2009-07-26 01:24:12 UTC (rev 286339) @@ -27,9 +27,9 @@ $phar = new Phar($fname); $sig2 = $phar-getSignature(); -var_dump($sig1['hash']); -var_dump($sig2['hash']); -var_dump($sig1['hash'] != $sig2['hash']); +var_dump($sig1[b'hash']); +var_dump($sig2[b'hash']); +var_dump($sig1[b'hash'] != $sig2[b'hash']); include $pname . '/a.php'; include $pname . '/b.php'; Modified: pecl/phar/trunk/tests/phar_ctx_001.phpt === --- pecl/phar/trunk/tests/phar_ctx_001.phpt 2009-07-26 01:03:47 UTC (rev 286338) +++ pecl/phar/trunk/tests/phar_ctx_001.phpt 2009-07-26 01:24:12 UTC (rev 286339) @@ -28,7 +28,7 @@ var_dump(file_get_contents($pname . '/c')); var_dump($phar['c']-isCompressed()); -$context = stream_context_create(array('phar'= array('compress'=Phar::GZ, 'metadata' = array(2, 'hi' = 3; +$context = stream_context_create(array('phar'= array('compress'=Phar::GZ, 'metadata' = array(2, b'hi' = 3; $context2 = stream_context_create(array('phar' = array('metadata' = array(4; file_put_contents($pname . '/a', b'new a', 0); // no compression Modified: pecl/phar/trunk/tests/readfile_edgecases.phpt === --- pecl/phar/trunk/tests/readfile_edgecases.phpt 2009-07-26 01:03:47 UTC (rev 286338) +++ pecl/phar/trunk/tests/readfile_edgecases.phpt 2009-07-26 01:24:12 UTC (rev 286339) @@ -2,6 +2,7 @@ Phar: test edge cases of readfile() function interception --SKIPIF-- ?php if (!extension_loaded(phar)) die(skip);? +?php if (version_compare(PHP_VERSION, 6.0, =)) die(skip requires php older than 6.0); ? --INI-- phar.readonly=0 --FILE-- Added: pecl/phar/trunk/tests/readfile_edgecasesU.phpt === --- pecl/phar/trunk/tests/readfile_edgecasesU.phpt (rev 0) +++ pecl/phar/trunk/tests/readfile_edgecasesU.phpt 2009-07-26 01:24:12 UTC (rev 286339) @@ -0,0 +1,61 @@
[PHP-CVS] svn: / pecl/phar/trunk/phar_object.c pecl/phar/trunk/tests/tar/phar_convert_phar4.phpt php/php-src/branches/PHP_5_3/ext/phar/phar_object.c php/php-src/branches/PHP_5_3/ext/phar/tests/tar/pha
cellog Sun, 26 Jul 2009 02:18:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286341 Log: fix generation of phar.phar in php 6, fix remaining tests broken by PHP 6 (and not by spl/other stuff in php6) Changed paths: U pecl/phar/trunk/phar_object.c U pecl/phar/trunk/tests/tar/phar_convert_phar4.phpt U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/phar_convert_phar4.phpt U php/php-src/trunk/ext/phar/Makefile.frag U php/php-src/trunk/ext/phar/phar/clicommand.inc U php/php-src/trunk/ext/phar/phar/pharcommand.inc U php/php-src/trunk/ext/phar/phar_object.c A php/php-src/trunk/ext/phar/tests/readfile_edgecasesU.phpt U php/php-src/trunk/ext/phar/tests/tar/phar_convert_phar4.phpt Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-26 02:12:38 UTC (rev 286340) +++ pecl/phar/trunk/phar_object.c 2009-07-26 02:18:50 UTC (rev 286341) @@ -990,7 +990,9 @@ } } +#if PHP_MAJOR_VERSION = 6 notfound: +#endif if (!mime_type) { code = phar_file_type(PHAR_G(mime_types), entry, mime_type TSRMLS_CC); } Modified: pecl/phar/trunk/tests/tar/phar_convert_phar4.phpt === --- pecl/phar/trunk/tests/tar/phar_convert_phar4.phpt 2009-07-26 02:12:38 UTC (rev 286340) +++ pecl/phar/trunk/tests/tar/phar_convert_phar4.phpt 2009-07-26 02:18:50 UTC (rev 286341) @@ -14,7 +14,7 @@ $phar = new Phar($fname); $phar['a.txt'] = 'some text'; -$phar-setMetadata('hi'); +$phar-setMetadata(b'hi'); $phar-stopBuffering(); var_dump($phar-isFileFormat(Phar::TAR)); var_dump(strlen($phar-getStub())); Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c === --- php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2009-07-26 02:12:38 UTC (rev 286340) +++ php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2009-07-26 02:18:50 UTC (rev 286341) @@ -990,7 +990,9 @@ } } +#if PHP_MAJOR_VERSION = 6 notfound: +#endif if (!mime_type) { code = phar_file_type(PHAR_G(mime_types), entry, mime_type TSRMLS_CC); } Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/tar/phar_convert_phar4.phpt === --- php/php-src/branches/PHP_5_3/ext/phar/tests/tar/phar_convert_phar4.phpt 2009-07-26 02:12:38 UTC (rev 286340) +++ php/php-src/branches/PHP_5_3/ext/phar/tests/tar/phar_convert_phar4.phpt 2009-07-26 02:18:50 UTC (rev 286341) @@ -14,7 +14,7 @@ $phar = new Phar($fname); $phar['a.txt'] = 'some text'; -$phar-setMetadata('hi'); +$phar-setMetadata(b'hi'); $phar-stopBuffering(); var_dump($phar-isFileFormat(Phar::TAR)); var_dump(strlen($phar-getStub())); Modified: php/php-src/trunk/ext/phar/Makefile.frag === --- php/php-src/trunk/ext/phar/Makefile.frag 2009-07-26 02:12:38 UTC (rev 286340) +++ php/php-src/trunk/ext/phar/Makefile.frag 2009-07-26 02:18:50 UTC (rev 286341) @@ -37,7 +37,7 @@ -...@echo Generating phar.phar -...@rm -f $(builddir)/phar.phar -...@rm -f $(srcdir)/phar.phar - @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x \\.svn -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ + @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x /\\.svn/ -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ -...@chmod +x $(builddir)/phar.phar install-pharcmd: pharcmd Modified: php/php-src/trunk/ext/phar/phar/clicommand.inc === --- php/php-src/trunk/ext/phar/phar/clicommand.inc 2009-07-26 02:12:38 UTC (rev 286340) +++ php/php-src/trunk/ext/phar/phar/clicommand.inc 2009-07-26 02:18:50 UTC (rev 286341) @@ -58,15 +58,15 @@ } } - if (isset($this-args[''])) { + if (isset($this-args[b''])) { if ($i = $argc) { - if (isset($this-args['']['require']) $this-args['']['require']) { + if (isset($this-args[b'']['require']) $this-args[b'']['require']) { self::error(Missing default trailing arguments to command $command, check ${argv[0]} help\n); } } else { - $this-args['']['val'] = array(); + $this-args[b'']['val'] = array(); while($i $argc) { - $this-args['']['val'][] = $argv[$i++]; + $this-args[b'']['val'][] = $argv[$i++]; } } } else if ($i $argc) { @@ -122,10 +122,10 @@ $func = $prefix . $sub . '_' . $what; $what = str_replace('_', '-', $what); if ($r-hasMethod($func)) { - if (!isset($a[$what])) { - $a[$what] = array(); + if
[PHP-CVS] svn: /php/php-src/trunk/ext/phar/ config.m4 config.w32
cellog Sun, 26 Jul 2009 02:19:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286342 Log: re-enable phar now that compile and building phar.phar works Changed paths: U php/php-src/trunk/ext/phar/config.m4 U php/php-src/trunk/ext/phar/config.w32 Modified: php/php-src/trunk/ext/phar/config.m4 === --- php/php-src/trunk/ext/phar/config.m42009-07-26 02:18:50 UTC (rev 286341) +++ php/php-src/trunk/ext/phar/config.m42009-07-26 02:19:58 UTC (rev 286342) @@ -2,7 +2,7 @@ dnl config.m4 for extension phar PHP_ARG_ENABLE(phar, for phar archive support, -[ --enable-phar Enable phar support]) +[ --disable-phar Disable phar support], yes) if test $PHP_PHAR != no; then PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared) Modified: php/php-src/trunk/ext/phar/config.w32 === --- php/php-src/trunk/ext/phar/config.w32 2009-07-26 02:18:50 UTC (rev 286341) +++ php/php-src/trunk/ext/phar/config.w32 2009-07-26 02:19:58 UTC (rev 286342) @@ -1,7 +1,7 @@ // $Id$ // vim:ft=javascript -ARG_ENABLE(phar, enable phar support, no); +ARG_ENABLE(phar, disable phar support, yes); ARG_ENABLE(phar-native-ssl, enable phar with native OpenSSL support, no); if (PHP_PHAR_NATIVE_SSL != no) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: / pecl/phar/trunk/phar_object.c pecl/phar/trunk/tests/phar_buildfromiterator10.phpt php/php-src/branches/PHP_5_3/ext/phar/phar_object.c php/php-src/branches/PHP_5_3/ext/phar/tests/phar_
cellog Sun, 26 Jul 2009 02:43:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286344 Log: fix buildFromIterator with filesystem iterator in php 6 Changed paths: U pecl/phar/trunk/phar_object.c U pecl/phar/trunk/tests/phar_buildfromiterator10.phpt U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/tests/phar_buildfromiterator10.phpt U php/php-src/trunk/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/tests/phar_buildfromiterator10.phpt Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-26 02:25:17 UTC (rev 286343) +++ pecl/phar/trunk/phar_object.c 2009-07-26 02:43:14 UTC (rev 286344) @@ -1669,7 +1669,21 @@ case SPL_FS_INFO: case SPL_FS_FILE: #if PHP_VERSION_ID = 6 - fname = expand_filepath(intern-file_name.s, NULL TSRMLS_CC); + if (intern-file_name_type == IS_UNICODE) { + zval zv; + + INIT_ZVAL(zv); + Z_UNIVAL(zv) = intern-file_name; + Z_UNILEN(zv) = intern-file_name_len; + Z_TYPE(zv) = IS_UNICODE; + + zval_copy_ctor(zv); + zval_unicode_to_string(zv TSRMLS_CC); + fname = expand_filepath(Z_STRVAL(zv), NULL TSRMLS_CC); + ezfree(Z_UNIVAL(zv)); + } else { + fname = expand_filepath(intern-file_name.s, NULL TSRMLS_CC); + } #else fname = expand_filepath(intern-file_name, NULL TSRMLS_CC); #endif Modified: pecl/phar/trunk/tests/phar_buildfromiterator10.phpt === --- pecl/phar/trunk/tests/phar_buildfromiterator10.phpt 2009-07-26 02:25:17 UTC (rev 286343) +++ pecl/phar/trunk/tests/phar_buildfromiterator10.phpt 2009-07-26 02:43:14 UTC (rev 286344) @@ -31,74 +31,74 @@ --EXPECTF-- array(35) { [phar_ctx_001.phpt]= - %unicode|string%(%d) %sphar_ctx_001.phpt + string(%d) %sphar_ctx_001.phpt [phar_get_supported_signatures_001.phpt]= - %unicode|string%(%d) %sphar_get_supported_signatures_001.phpt + string(%d) %sphar_get_supported_signatures_001.phpt [phar_get_supported_signatures_002.phpt]= - %unicode|string%(%d) %sphar_get_supported_signatures_002.phpt + string(%d) %sphar_get_supported_signatures_002.phpt [phar_oo_001.phpt]= - %unicode|string%(%d) %sphar_oo_001.phpt + string(%d) %sphar_oo_001.phpt [phar_oo_002.phpt]= - %unicode|string%(%d) %sphar_oo_002.phpt + string(%d) %sphar_oo_002.phpt [phar_oo_003.phpt]= - %unicode|string%(%d) %sphar_oo_003.phpt + string(%d) %sphar_oo_003.phpt [phar_oo_004.phpt]= - %unicode|string%(%d) %sphar_oo_004.phpt + string(%d) %sphar_oo_004.phpt [phar_oo_005.phpt]= - %unicode|string%(%d) %sphar_oo_005.phpt + string(%d) %sphar_oo_005.phpt [phar_oo_006.phpt]= - %unicode|string%(%d) %sphar_oo_006.phpt + string(%d) %sphar_oo_006.phpt [phar_oo_007.phpt]= - %unicode|string%(%d) %sphar_oo_007.phpt + string(%d) %sphar_oo_007.phpt [phar_oo_008.phpt]= - %unicode|string%(%d) %sphar_oo_008.phpt + string(%d) %sphar_oo_008.phpt [phar_oo_009.phpt]= - %unicode|string%(%d) %sphar_oo_009.phpt + string(%d) %sphar_oo_009.phpt [phar_oo_010.phpt]= - %unicode|string%(%d) %sphar_oo_010.phpt + string(%d) %sphar_oo_010.phpt [phar_oo_011.phpt]= - %unicode|string%(%d) %sphar_oo_011.phpt + string(%d) %sphar_oo_011.phpt [phar_oo_012.phpt]= - %unicode|string%(%d) %sphar_oo_012.phpt + string(%d) %sphar_oo_012.phpt [phar_oo_compressed_001.phpt]= - %unicode|string%(%d) %sphar_oo_compressed_001.phpt + string(%d) %sphar_oo_compressed_001.phpt [phar_oo_compressed_002.phpt]= - %unicode|string%(%d) %sphar_oo_compressed_002.phpt + string(%d) %sphar_oo_compressed_002.phpt [phpinfo_001.phpt]= - %unicode|string%(%d) %sphpinfo_001.phpt + string(%d) %sphpinfo_001.phpt [phpinfo_002.phpt]= - %unicode|string%(%d) %sphpinfo_002.phpt + string(%d) %sphpinfo_002.phpt [phpinfo_003.phpt]= - %unicode|string%(%d) %sphpinfo_003.phpt + string(%d) %sphpinfo_003.phpt [phpinfo_004.phpt]= - %unicode|string%(%d) %sphpinfo_004.phpt + string(%d) %sphpinfo_004.phpt [tar/tar_001.phpt]= - %unicode|string%(%d) %star%ctar_001.phpt + string(%d) %star%ctar_001.phpt [tar/tar_002.phpt]= - %unicode|string%(%d) %star%ctar_002.phpt + string(%d) %star%ctar_002.phpt [tar/tar_003.phpt]= - %unicode|string%(%d) %star%ctar_003.phpt + string(%d) %star%ctar_003.phpt [tar/tar_004.phpt]= - %unicode|string%(%d) %star%ctar_004.phpt + string(%d) %star%ctar_004.phpt [zip/corrupt_001.phpt]= - %unicode|string%(%d) %szip%ccorrupt_001.phpt + string(%d) %szip%ccorrupt_001.phpt [zip/corrupt_002.phpt]= - %unicode|string%(%d) %szip%ccorrupt_002.phpt + string(%d) %szip%ccorrupt_002.phpt [zip/corrupt_003.phpt]= - %unicode|string%(%d) %szip%ccorrupt_003.phpt + string(%d) %szip%ccorrupt_003.phpt [zip/corrupt_004.phpt]= - %unicode|string%(%d)
[PHP-CVS] svn: / pecl/phar/trunk/phar_object.c pecl/phar/trunk/tests/cache_list/copyonwrite17.phar.phpt pecl/phar/trunk/tests/cache_list/copyonwrite19.phar.phpt pecl/phar/trunk/tests/cache_list/files/
cellog Sun, 26 Jul 2009 03:07:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286345 Log: make cache_list tests pass in php 6 Changed paths: U pecl/phar/trunk/phar_object.c U pecl/phar/trunk/tests/cache_list/copyonwrite17.phar.phpt U pecl/phar/trunk/tests/cache_list/copyonwrite19.phar.phpt U pecl/phar/trunk/tests/cache_list/files/frontcontroller12.phar U pecl/phar/trunk/tests/cache_list/files/frontcontroller12.phar.inc U pecl/phar/trunk/tests/cache_list/files/frontcontroller14.phar U pecl/phar/trunk/tests/cache_list/files/frontcontroller14.phar.inc U pecl/phar/trunk/tests/cache_list/files/frontcontroller3.phar U pecl/phar/trunk/tests/cache_list/files/frontcontroller3.phar.inc U pecl/phar/trunk/tests/cache_list/files/frontcontroller4.phar U pecl/phar/trunk/tests/cache_list/files/frontcontroller4.phar.inc U pecl/phar/trunk/tests/cache_list/files/frontcontroller8.phar U pecl/phar/trunk/tests/cache_list/files/frontcontroller8.phar.inc U pecl/phar/trunk/tests/cache_list/files/write24.phar U pecl/phar/trunk/tests/cache_list/files/write24.phar.inc U pecl/phar/trunk/tests/cache_list/frontcontroller21.phpt U pecl/phar/trunk/tests/cache_list/frontcontroller22.phpt U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/copyonwrite17.phar.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/copyonwrite19.phar.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller12.phar U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller14.phar U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller3.phar U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller4.phar U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller8.phar U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/write24.phar U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/files/write24.phar.inc U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/frontcontroller21.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/cache_list/frontcontroller22.phpt U php/php-src/trunk/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/tests/cache_list/copyonwrite17.phar.phpt U php/php-src/trunk/ext/phar/tests/cache_list/copyonwrite19.phar.phpt U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller12.phar U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller12.phar.inc U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller14.phar U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller14.phar.inc U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller3.phar U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller3.phar.inc U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller4.phar U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller4.phar.inc U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller8.phar U php/php-src/trunk/ext/phar/tests/cache_list/files/frontcontroller8.phar.inc U php/php-src/trunk/ext/phar/tests/cache_list/files/write24.phar U php/php-src/trunk/ext/phar/tests/cache_list/files/write24.phar.inc U php/php-src/trunk/ext/phar/tests/cache_list/frontcontroller21.phpt U php/php-src/trunk/ext/phar/tests/cache_list/frontcontroller22.phpt Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-26 02:43:14 UTC (rev 286344) +++ pecl/phar/trunk/phar_object.c 2009-07-26 03:07:23 UTC (rev 286345) @@ -941,19 +941,7 @@ ++ext; #if PHP_MAJOR_VERSION = 6 - if (FAILURE == zend_hash_find(Z_ARRVAL_P(mimeoverride), ext, strlen(ext)+1, (void **) val)) { -/* try unicode extension */ -zstr zext; -zspprintf(IS_UNICODE, zext, 0, %s, ext); -if (SUCCESS == zend_u_hash_find(Z_ARRVAL_P(mimeoverride), IS_UNICODE, zext, strlen(ext)+1, (void **) val)) { - ezfree(zext); - goto unicode_found; -} -ezfree(zext); -goto notfound; - } -unicode_found: - { /* this prevents parse error */ + if (phar_find_key(Z_ARRVAL_P(mimeoverride),
[PHP-CVS] svn: / pecl/phar/trunk/zip.c php/php-src/branches/PHP_5_3/ext/phar/zip.c php/php-src/trunk/ext/phar/zip.c
cellog Fri, 24 Jul 2009 16:21:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284708 Log: fix minor memory leak Changed paths: U pecl/phar/trunk/zip.c U php/php-src/branches/PHP_5_3/ext/phar/zip.c U php/php-src/trunk/ext/phar/zip.c Modified: pecl/phar/trunk/zip.c === --- pecl/phar/trunk/zip.c 2009-07-24 15:42:17 UTC (rev 284707) +++ pecl/phar/trunk/zip.c 2009-07-24 16:21:40 UTC (rev 284708) @@ -2,7 +2,7 @@ +--+ | ZIP archive support for Phar | +--+ - | Copyright (c) 2007-2008 The PHP Group| + | Copyright (c) 2007-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -310,6 +310,9 @@ if (mydata-metadata) { \ zval_dtor(mydata-metadata); \ } \ + if (mydata-signature) { \ + efree(mydata-signature); \ + } \ if (error) { \ spprintf(error, 4096, phar error: %s in zip-based phar \%s\, errmsg, mydata-fname); \ } \ @@ -331,6 +334,9 @@ if (mydata-metadata) { \ zval_dtor(mydata-metadata); \ } \ + if (mydata-signature) { \ + efree(mydata-signature); \ + } \ if (error) { \ spprintf(error, 4096, phar error: %s in zip-based phar \%s\, errmsg, mydata-fname); \ } \ @@ -766,7 +772,6 @@ php_uint32 newcrc32; off_t offset; int not_really_modified = 0; - entry = (phar_entry_info *)data; p = (struct _phar_zip_pass*) arg; Modified: php/php-src/branches/PHP_5_3/ext/phar/zip.c === --- php/php-src/branches/PHP_5_3/ext/phar/zip.c 2009-07-24 15:42:17 UTC (rev 284707) +++ php/php-src/branches/PHP_5_3/ext/phar/zip.c 2009-07-24 16:21:40 UTC (rev 284708) @@ -310,6 +310,9 @@ if (mydata-metadata) { \ zval_dtor(mydata-metadata); \ } \ + if (mydata-signature) { \ + efree(mydata-signature); \ + } \ if (error) { \ spprintf(error, 4096, phar error: %s in zip-based phar \%s\, errmsg, mydata-fname); \ } \ @@ -331,6 +334,9 @@ if (mydata-metadata) { \ zval_dtor(mydata-metadata); \ } \ + if (mydata-signature) { \ + efree(mydata-signature); \ + } \ if (error) { \ spprintf(error, 4096, phar error: %s in zip-based phar \%s\, errmsg, mydata-fname); \ } \ Modified: php/php-src/trunk/ext/phar/zip.c === --- php/php-src/trunk/ext/phar/zip.c2009-07-24 15:42:17 UTC (rev 284707) +++ php/php-src/trunk/ext/phar/zip.c2009-07-24 16:21:40 UTC (rev 284708) @@ -310,6 +310,9 @@ if (mydata-metadata) { \ zval_dtor(mydata-metadata); \ } \ + if (mydata-signature) { \ + efree(mydata-signature); \ + } \ if (error) { \ spprintf(error, 4096, phar error: %s in zip-based phar \%s\, errmsg, mydata-fname); \ } \ @@ -331,6 +334,9 @@ if (mydata-metadata) { \ zval_dtor(mydata-metadata); \ } \ + if (mydata-signature) { \ + efree(mydata-signature); \ + } \ if (error) { \ spprintf(error, 4096, phar error: %s in zip-based phar \%s\, errmsg, mydata-fname); \ } \ @@ -766,7 +772,6 @@ php_uint32 newcrc32; off_t offset; int not_really_modified = 0; - entry = (phar_entry_info *)data; p = (struct
[PHP-CVS] svn: / pecl/phar/trunk/Makefile.frag pecl/phar/trunk/dirstream.c pecl/phar/trunk/dirstream.h pecl/phar/trunk/func_interceptors.c pecl/phar/trunk/func_interceptors.h pecl/phar/trunk/phar.c pe
cellog Fri, 24 Jul 2009 17:07:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284712 Log: merge unmerged changes between branches, remove unnecessary test for zip signature failure in badparameters.phpt Changed paths: U pecl/phar/trunk/Makefile.frag U pecl/phar/trunk/dirstream.c U pecl/phar/trunk/dirstream.h U pecl/phar/trunk/func_interceptors.c U pecl/phar/trunk/func_interceptors.h U pecl/phar/trunk/phar.c U pecl/phar/trunk/phar_internal.h U pecl/phar/trunk/phar_object.c U pecl/phar/trunk/phar_path_check.c U pecl/phar/trunk/phar_path_check.re U pecl/phar/trunk/pharzip.h U pecl/phar/trunk/php_phar.h U pecl/phar/trunk/stream.c U pecl/phar/trunk/stream.h U pecl/phar/trunk/stub.h U pecl/phar/trunk/tar.c U pecl/phar/trunk/tar.h U pecl/phar/trunk/tests/badparameters.phpt U pecl/phar/trunk/util.c U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/tests/badparameters.phpt U php/php-src/trunk/ext/phar/func_interceptors.c U php/php-src/trunk/ext/phar/phar.c U php/php-src/trunk/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/tar.c U php/php-src/trunk/ext/phar/tests/badparameters.phpt U php/php-src/trunk/ext/phar/util.c Modified: pecl/phar/trunk/Makefile.frag === --- pecl/phar/trunk/Makefile.frag 2009-07-24 16:50:06 UTC (rev 284711) +++ pecl/phar/trunk/Makefile.frag 2009-07-24 17:07:05 UTC (rev 284712) @@ -4,7 +4,7 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar -PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 +PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' PHP_PHARCMD_EXECUTABLE = ` \ if test -x $(top_builddir)/$(SAPI_CLI_PATH); then \ $(top_srcdir)/build/shtool echo -n -- $(top_builddir)/$(SAPI_CLI_PATH) -n; \ Modified: pecl/phar/trunk/dirstream.c === --- pecl/phar/trunk/dirstream.c 2009-07-24 16:50:06 UTC (rev 284711) +++ pecl/phar/trunk/dirstream.c 2009-07-24 17:07:05 UTC (rev 284712) @@ -2,7 +2,7 @@ +--+ | phar:// stream wrapper support | +--+ - | Copyright (c) 2005-2008 The PHP Group| + | Copyright (c) 2005-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| Modified: pecl/phar/trunk/dirstream.h === --- pecl/phar/trunk/dirstream.h 2009-07-24 16:50:06 UTC (rev 284711) +++ pecl/phar/trunk/dirstream.h 2009-07-24 17:07:05 UTC (rev 284712) @@ -2,7 +2,7 @@ +--+ | phar php single-file executable PHP extension| +--+ - | Copyright (c) 2006-2008 The PHP Group| + | Copyright (c) 2006-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| Modified: pecl/phar/trunk/func_interceptors.c === --- pecl/phar/trunk/func_interceptors.c 2009-07-24 16:50:06 UTC (rev 284711) +++ pecl/phar/trunk/func_interceptors.c 2009-07-24 17:07:05 UTC (rev 284712) @@ -2,7 +2,7 @@ +--+ | phar php single-file executable PHP extension| +--+ - | Copyright (c) 2005-2008 The PHP Group| + | Copyright (c) 2005-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -646,8 +646,8 @@ /* fopen within phar, if :// is not in the url, then prepend phar://archive/ */ entry_len = (int) filename_length; if (FAILURE == phar_get_archive(phar, arch, arch_len, NULL, 0, NULL TSRMLS_CC)) { +efree(arch);
[PHP-CVS] svn: / pecl/phar/trunk/tests/phar_convert_again.phpt pecl/phar/trunk/tests/zip/all.phpt pecl/phar/trunk/zip.c php/php-src/branches/PHP_5_3/ext/phar/tests/phar_convert_again.phpt php/php-src/
cellog Fri, 24 Jul 2009 19:40:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284716 Log: fix --CLEAN-- of all.phpt, remove unnecessary check in phar_convert_again.phpt, and fix signature generation and checking for zip to also include central directory up to the signature, implement better check for end-of-zip at signature verification Changed paths: U pecl/phar/trunk/tests/phar_convert_again.phpt U pecl/phar/trunk/tests/zip/all.phpt U pecl/phar/trunk/zip.c U php/php-src/branches/PHP_5_3/ext/phar/tests/phar_convert_again.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/zip/all.phpt U php/php-src/branches/PHP_5_3/ext/phar/zip.c U php/php-src/trunk/ext/phar/tests/phar_convert_again.phpt U php/php-src/trunk/ext/phar/tests/zip/all.phpt U php/php-src/trunk/ext/phar/zip.c Modified: pecl/phar/trunk/tests/phar_convert_again.phpt === --- pecl/phar/trunk/tests/phar_convert_again.phpt 2009-07-24 19:21:10 UTC (rev 284715) +++ pecl/phar/trunk/tests/phar_convert_again.phpt 2009-07-24 19:40:41 UTC (rev 284716) @@ -62,11 +62,6 @@ } catch (Exception $e) { echo $e-getMessage() . \n; } -try { -$data-setSignatureAlgorithm(Phar::MD5); -} catch (Exception $e) { -echo $e-getMessage() . \n; -} $tar = $phar-convertToExecutable(Phar::TAR); echo $tar-getPath() . \n; $data = $tar-convertToData(); @@ -188,7 +183,6 @@ A Phar stub cannot be set in a plain zip archive A Phar stub cannot be set in a plain zip archive A Phar alias cannot be set in a plain zip archive -Cannot set signature algorithm, not possible with zip-based phar archives %sphar_convert_again2.phar.tar %sphar_convert_again2.tar %sphar_convert_again2.phar.tar.gz Modified: pecl/phar/trunk/tests/zip/all.phpt === --- pecl/phar/trunk/tests/zip/all.phpt 2009-07-24 19:21:10 UTC (rev 284715) +++ pecl/phar/trunk/tests/zip/all.phpt 2009-07-24 19:40:41 UTC (rev 284716) @@ -46,6 +46,7 @@ ? ===DONE=== --CLEAN-- +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ? ?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ? --EXPECT-- bool(false) Modified: pecl/phar/trunk/zip.c === --- pecl/phar/trunk/zip.c 2009-07-24 19:21:10 UTC (rev 284715) +++ pecl/phar/trunk/zip.c 2009-07-24 19:40:41 UTC (rev 284716) @@ -350,6 +350,7 @@ /* add each central directory item to the manifest */ for (i = 0; i PHAR_GET_16(locator.count); ++i) { phar_zip_central_dir_file zipentry; + off_t beforeus = php_stream_tell(fp); if (sizeof(zipentry) != php_stream_read(fp, (char *) zipentry, sizeof(zipentry))) { PHAR_ZIP_FAIL(unable to read central directory entry, truncated); @@ -404,24 +405,34 @@ if (entry.filename_len == sizeof(.phar/signature.bin)-1 !strncmp(entry.filename, .phar/signature.bin, sizeof(.phar/signature.bin)-1)) { size_t read; php_stream *sigfile; + off_t now; + char *sig; + now = php_stream_tell(fp); pefree(entry.filename, entry.is_persistent); sigfile = php_stream_fopen_tmpfile(); php_stream_seek(fp, 0, SEEK_SET); /* copy file contents + local headers and zip comment, if any, to be hashed for signature */ phar_stream_copy_to_stream(fp, sigfile, entry.header_offset, NULL); + /* seek to central directory */ + php_stream_seek(fp, PHAR_GET_32(locator.cdir_offset), SEEK_SET); + /* copy central directory header */ + phar_stream_copy_to_stream(fp, sigfile, beforeus - PHAR_GET_32(locator.cdir_offset), NULL); if (metadata) { php_stream_write(sigfile, metadata, PHAR_GET_16(locator.comment_len)); } php_stream_seek(fp, sizeof(phar_zip_file_header) + entry.header_offset + entry.filename_len + PHAR_GET_16(zipentry.extra_len), SEEK_SET); - read = php_stream_read(fp, buf, entry.uncompressed_filesize); + sig = (char *) emalloc(entry.uncompressed_filesize); + read = php_stream_read(fp, sig, entry.uncompressed_filesize); if (read != entry.uncompressed_filesize) { php_stream_close(sigfile); +efree(sig); PHAR_ZIP_FAIL(signature cannot be read); } - mydata-sig_flags = PHAR_GET_32(buf); - if (FAILURE == phar_verify_signature(sigfile, php_stream_tell(sigfile), mydata-sig_flags, buf + 8, entry.uncompressed_filesize - 8, fname, mydata-signature, mydata-sig_len, error TSRMLS_CC)) { + mydata-sig_flags = PHAR_GET_32(sig); + if (FAILURE == phar_verify_signature(sigfile, php_stream_tell(sigfile), mydata-sig_flags, sig + 8, entry.uncompressed_filesize - 8, fname, mydata-signature, mydata-sig_len, error TSRMLS_CC)) { +efree(sig); if (error) { char *save; php_stream_close(sigfile); @@ -434,14 +445,9 @@ } } php_stream_close(sigfile); + efree(sig); /* signature checked out,
[PHP-CVS] svn: / pecl/phar/trunk/phar_object.c php/php-src/branches/PHP_5_3/ext/phar/phar_object.c php/php-src/trunk/ext/phar/phar_object.c
cellog Fri, 24 Jul 2009 21:27:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284722 Log: fix PHAR_ARG_INFO #define to work with PHP major versions 5 Changed paths: U pecl/phar/trunk/phar_object.c U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c U php/php-src/trunk/ext/phar/phar_object.c Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-24 21:10:51 UTC (rev 284721) +++ pecl/phar/trunk/phar_object.c 2009-07-24 21:27:51 UTC (rev 284722) @@ -30,7 +30,7 @@ static zend_class_entry *phar_ce_entry; #endif -#if (PHP_MAJOR_VERSION == 5) (PHP_MINOR_VERSION = 3) +#if PHP_MAJOR_VERSION 5 || ((PHP_MAJOR_VERSION == 5) (PHP_MINOR_VERSION = 3)) # define PHAR_ARG_INFO #else # define PHAR_ARG_INFO static Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c === --- php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2009-07-24 21:10:51 UTC (rev 284721) +++ php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2009-07-24 21:27:51 UTC (rev 284722) @@ -30,7 +30,7 @@ static zend_class_entry *phar_ce_entry; #endif -#if (PHP_MAJOR_VERSION == 5) (PHP_MINOR_VERSION = 3) +#if PHP_MAJOR_VERSION 5 || ((PHP_MAJOR_VERSION == 5) (PHP_MINOR_VERSION = 3)) # define PHAR_ARG_INFO #else # define PHAR_ARG_INFO static Modified: php/php-src/trunk/ext/phar/phar_object.c === --- php/php-src/trunk/ext/phar/phar_object.c2009-07-24 21:10:51 UTC (rev 284721) +++ php/php-src/trunk/ext/phar/phar_object.c2009-07-24 21:27:51 UTC (rev 284722) @@ -30,7 +30,7 @@ static zend_class_entry *phar_ce_entry; #endif -#if (PHP_MAJOR_VERSION == 5) (PHP_MINOR_VERSION = 3) +#if PHP_MAJOR_VERSION 5 || ((PHP_MAJOR_VERSION == 5) (PHP_MINOR_VERSION = 3)) # define PHAR_ARG_INFO #else # define PHAR_ARG_INFO static -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/phar/ config.m4
cellog Fri, 24 Jul 2009 21:32:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284723 Log: merge unmerged changes from php 5.3 Changed paths: U php/php-src/trunk/ext/phar/config.m4 Modified: php/php-src/trunk/ext/phar/config.m4 === --- php/php-src/trunk/ext/phar/config.m42009-07-24 21:27:51 UTC (rev 284722) +++ php/php-src/trunk/ext/phar/config.m42009-07-24 21:32:22 UTC (rev 284723) @@ -8,7 +8,9 @@ PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared) AC_MSG_CHECKING([for phar openssl support]) if test $PHP_HASH_SHARED != yes; then -AC_DEFINE(PHAR_HASH_OK,1,[ ]) +if test $PHP_HASH != no; then + AC_DEFINE(PHAR_HASH_OK,1,[ ]) +fi else AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash is built shared]) fi @@ -22,6 +24,7 @@ AC_MSG_RESULT([no]) fi fi + PHP_ADD_EXTENSION_DEP(phar, hash, true) PHP_ADD_EXTENSION_DEP(phar, spl, true) PHP_ADD_MAKEFILE_FRAGMENT fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: / pecl/phar/trunk/tests/009.phpt php/php-src/branches/PHP_5_3/ext/phar/tests/009.phpt php/php-src/trunk/ext/phar/tests/009.phpt php/php-src/trunk/ext/phar/tests/016.phpt
cellog Fri, 24 Jul 2009 22:09:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284724 Log: update test to work in php 6 Changed paths: U pecl/phar/trunk/tests/009.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/009.phpt U php/php-src/trunk/ext/phar/tests/009.phpt U php/php-src/trunk/ext/phar/tests/016.phpt Modified: pecl/phar/trunk/tests/009.phpt === --- pecl/phar/trunk/tests/009.phpt 2009-07-24 21:32:22 UTC (rev 284723) +++ pecl/phar/trunk/tests/009.phpt 2009-07-24 22:09:36 UTC (rev 284724) @@ -9,7 +9,7 @@ $file = b?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?; -$file .= pack('VVnVVV', 500, 500, 0x1000, 0x, 0, 0) . str_repeat('A', 500); +$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x, 0, 0) . (binary) str_repeat((binary)'A', 500); file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/009.phpt === --- php/php-src/branches/PHP_5_3/ext/phar/tests/009.phpt2009-07-24 21:32:22 UTC (rev 284723) +++ php/php-src/branches/PHP_5_3/ext/phar/tests/009.phpt2009-07-24 22:09:36 UTC (rev 284724) @@ -9,7 +9,7 @@ $file = b?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?; -$file .= pack('VVnVVV', 500, 500, 0x1000, 0x, 0, 0) . str_repeat('A', 500); +$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x, 0, 0) . (binary) str_repeat((binary)'A', 500); file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; Modified: php/php-src/trunk/ext/phar/tests/009.phpt === --- php/php-src/trunk/ext/phar/tests/009.phpt 2009-07-24 21:32:22 UTC (rev 284723) +++ php/php-src/trunk/ext/phar/tests/009.phpt 2009-07-24 22:09:36 UTC (rev 284724) @@ -9,7 +9,7 @@ $file = b?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?; -$file .= pack('VVnVVV', 500, 500, 0x1000, 0x, 0, 0) . str_repeat('A', 500); +$file .= (binary) pack(b'VVnVVV', 500, 500, 0x1000, 0x, 0, 0) . (binary) str_repeat((binary)'A', 500); file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; Modified: php/php-src/trunk/ext/phar/tests/016.phpt === --- php/php-src/trunk/ext/phar/tests/016.phpt 2009-07-24 21:32:22 UTC (rev 284723) +++ php/php-src/trunk/ext/phar/tests/016.phpt 2009-07-24 22:09:36 UTC (rev 284724) @@ -9,14 +9,14 @@ ?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = ?php __HALT_COMPILER(); ?; +$file = b?php __HALT_COMPILER(); ?; // file length is too short $files = array(); // hi gzdeflated -$files['a'] = array('cont'='a','comp'= pack('H*', 'cbc80400'),'flags'=0x1000, 'ulen' = 1, 'clen' = 4); +$files['a'] = array('cont'=b'a','comp'= (binary)pack('H*', 'cbc80400'),'flags'=0x1000, 'ulen' = 1, 'clen' = 4); $files['b'] = $files['a']; -$files['c'] = array('cont'='*'); +$files['c'] = array('cont'=b'*'); $files['d'] = $files['a']; include 'files/phar_test.inc'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: / pecl/phar/trunk/tests/016.phpt php/php-src/branches/PHP_5_3/ext/phar/tests/016.phpt
cellog Fri, 24 Jul 2009 23:55:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284730 Log: merge from HEAD changes to test Changed paths: U pecl/phar/trunk/tests/016.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/016.phpt Modified: pecl/phar/trunk/tests/016.phpt === --- pecl/phar/trunk/tests/016.phpt 2009-07-24 23:53:24 UTC (rev 284729) +++ pecl/phar/trunk/tests/016.phpt 2009-07-24 23:55:49 UTC (rev 284730) @@ -9,14 +9,14 @@ ?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = ?php __HALT_COMPILER(); ?; +$file = b?php __HALT_COMPILER(); ?; // file length is too short $files = array(); // hi gzdeflated -$files['a'] = array('cont'='a','comp'= pack('H*', 'cbc80400'),'flags'=0x1000, 'ulen' = 1, 'clen' = 4); +$files['a'] = array('cont'=b'a','comp'= (binary)pack('H*', 'cbc80400'),'flags'=0x1000, 'ulen' = 1, 'clen' = 4); $files['b'] = $files['a']; -$files['c'] = array('cont'='*'); +$files['c'] = array('cont'=b'*'); $files['d'] = $files['a']; include 'files/phar_test.inc'; Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/016.phpt === --- php/php-src/branches/PHP_5_3/ext/phar/tests/016.phpt2009-07-24 23:53:24 UTC (rev 284729) +++ php/php-src/branches/PHP_5_3/ext/phar/tests/016.phpt2009-07-24 23:55:49 UTC (rev 284730) @@ -9,14 +9,14 @@ ?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$file = ?php __HALT_COMPILER(); ?; +$file = b?php __HALT_COMPILER(); ?; // file length is too short $files = array(); // hi gzdeflated -$files['a'] = array('cont'='a','comp'= pack('H*', 'cbc80400'),'flags'=0x1000, 'ulen' = 1, 'clen' = 4); +$files['a'] = array('cont'=b'a','comp'= (binary)pack('H*', 'cbc80400'),'flags'=0x1000, 'ulen' = 1, 'clen' = 4); $files['b'] = $files['a']; -$files['c'] = array('cont'='*'); +$files['c'] = array('cont'=b'*'); $files['d'] = $files['a']; include 'files/phar_test.inc'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: p ecl/phar/trunk/Makefile.frag ecl/phar/trunk/package.php hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/Makefile.frag hp/php-src/trunk/ext/phar/Makefile.frag
cellog Thu, 23 Jul 2009 15:40:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284651 Log: fix PHP bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location Bug: http://bugs.php.net/48740 (unknown) Changed paths: U pecl/phar/trunk/Makefile.frag U pecl/phar/trunk/package.php U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag U php/php-src/trunk/ext/phar/Makefile.frag Modified: pecl/phar/trunk/Makefile.frag === --- pecl/phar/trunk/Makefile.frag 2009-07-23 15:16:08 UTC (rev 284650) +++ pecl/phar/trunk/Makefile.frag 2009-07-23 15:40:10 UTC (rev 284651) @@ -43,4 +43,4 @@ install-pharcmd: pharcmd -...@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) - $(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar + $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-23 15:16:08 UTC (rev 284650) +++ pecl/phar/trunk/package.php 2009-07-23 15:40:10 UTC (rev 284651) @@ -48,6 +48,7 @@ getSignature() call fixed PHP Bug #49020: phar misinterprets ustar long filename standard fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed + fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location fixed PHP Bug #48681: openssl signature verification for tar archives broken fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) Changes since 2.0.0RC1: Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-23 15:16:08 UTC (rev 284650) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-23 15:40:10 UTC (rev 284651) @@ -33,6 +33,8 @@ - Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at gmail dot com, Pierre) - Fixed bug #48757 (ReflectionFunction::invoke() parameter issues). (Kalle) +- Fixed bug #48740 (PHAR install fails when INSTALL_ROOT is not the final install + location). (james dot cohen at digitalwindow dot com, Greg) - Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on files that have been opened with r+). (Ilia) - Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain Modified: php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag === --- php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2009-07-23 15:16:08 UTC (rev 284650) +++ php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2009-07-23 15:40:10 UTC (rev 284651) @@ -43,4 +43,4 @@ install-pharcmd: pharcmd -...@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) - $(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar + $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar Modified: php/php-src/trunk/ext/phar/Makefile.frag === --- php/php-src/trunk/ext/phar/Makefile.frag2009-07-23 15:16:08 UTC (rev 284650) +++ php/php-src/trunk/ext/phar/Makefile.frag2009-07-23 15:40:10 UTC (rev 284651) @@ -43,4 +43,4 @@ install-pharcmd: pharcmd -...@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) - $(LN_S) -f $(INSTALL_ROOT)$(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar + $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: p ecl/phar/trunk/Makefile.frag ecl/phar/trunk/package.php hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/Makefile.frag hp/php-src/trunk/ext/phar/Makefile.frag
cellog Thu, 23 Jul 2009 15:48:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284652 Log: fix php bug #48783: make install will fail saying phar file exists Bug: http://bugs.php.net/48783 (Open) make install will fail saying phar file exists Changed paths: U pecl/phar/trunk/Makefile.frag U pecl/phar/trunk/package.php U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag U php/php-src/trunk/ext/phar/Makefile.frag Modified: pecl/phar/trunk/Makefile.frag === --- pecl/phar/trunk/Makefile.frag 2009-07-23 15:40:10 UTC (rev 284651) +++ pecl/phar/trunk/Makefile.frag 2009-07-23 15:48:04 UTC (rev 284652) @@ -43,4 +43,5 @@ install-pharcmd: pharcmd -...@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) + -...@rm -f $(INSTALL_ROOT)$(bindir)/phar $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-23 15:40:10 UTC (rev 284651) +++ pecl/phar/trunk/package.php 2009-07-23 15:48:04 UTC (rev 284652) @@ -48,6 +48,7 @@ getSignature() call fixed PHP Bug #49020: phar misinterprets ustar long filename standard fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed + fixed PHP Bug #48783: make install will fail saying phar file exists fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location fixed PHP Bug #48681: openssl signature verification for tar archives broken fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-23 15:40:10 UTC (rev 284651) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-23 15:48:04 UTC (rev 284652) @@ -28,6 +28,7 @@ - Fixed bug #48802 (printf() returns incorrect outputted length). (Jani) - Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked directories). (Ilia) +- Fixed bug #48783 (make install will fail saying phar file exists). (Greg) - Fixed bug #48771 (rename() between volumes fails and reports no error on Windows). (Pierre) - Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at Modified: php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag === --- php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2009-07-23 15:40:10 UTC (rev 284651) +++ php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2009-07-23 15:48:04 UTC (rev 284652) @@ -43,4 +43,5 @@ install-pharcmd: pharcmd -...@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) + -...@rm -f $(INSTALL_ROOT)$(bindir)/phar $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar Modified: php/php-src/trunk/ext/phar/Makefile.frag === --- php/php-src/trunk/ext/phar/Makefile.frag2009-07-23 15:40:10 UTC (rev 284651) +++ php/php-src/trunk/ext/phar/Makefile.frag2009-07-23 15:48:04 UTC (rev 284652) @@ -43,4 +43,5 @@ install-pharcmd: pharcmd -...@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL) $(builddir)/phar.phar $(INSTALL_ROOT)$(bindir) + -...@rm -f $(INSTALL_ROOT)$(bindir)/phar $(LN_S) -f $(bindir)/phar.phar $(INSTALL_ROOT)$(bindir)/phar -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: p ecl/phar/trunk/package.php ecl/phar/trunk/phar.c ecl/phar/trunk/pharzip.h hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/phar.c hp/php-src/branches/PHP_5_3/ext/
cellog Thu, 23 Jul 2009 16:30:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284658 Log: fix PHP bug #48791: open office files always reported as corrupted Bug: http://bugs.php.net/48791 (Open) open office files always reported as corrupted Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/phar.c U pecl/phar/trunk/pharzip.h U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/phar.c U php/php-src/branches/PHP_5_3/ext/phar/pharzip.h U php/php-src/trunk/ext/phar/phar.c U php/php-src/trunk/ext/phar/pharzip.h Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-23 16:28:17 UTC (rev 284657) +++ pecl/phar/trunk/package.php 2009-07-23 16:30:27 UTC (rev 284658) @@ -48,6 +48,7 @@ getSignature() call fixed PHP Bug #49020: phar misinterprets ustar long filename standard fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed + fixed PHP Bug #48791: open office files always reported as corrupted fixed PHP Bug #48783: make install will fail saying phar file exists fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location fixed PHP Bug #48681: openssl signature verification for tar archives broken Modified: pecl/phar/trunk/phar.c === --- pecl/phar/trunk/phar.c 2009-07-23 16:28:17 UTC (rev 284657) +++ pecl/phar/trunk/phar.c 2009-07-23 16:30:27 UTC (rev 284658) @@ -2407,6 +2407,7 @@ if (entry-is_zip process_zip 0) { /* verify local file header */ phar_zip_file_header local; + phar_zip_data_desc desc; if (SUCCESS != phar_open_archive_fp(idata-phar TSRMLS_CC)) { spprintf(error, 0, phar error: unable to open zip-based phar archive \%s\ to verify local file header for file \%s\, idata-phar-fname, entry-filename); @@ -2420,6 +2421,25 @@ return FAILURE; } + /* check for data descriptor */ + if (((PHAR_ZIP_16(local.flags)) 0x8) == 0x8) { + php_stream_seek(phar_get_entrypfp(idata-internal_file TSRMLS_CC), + entry-header_offset + sizeof(local) + + PHAR_ZIP_16(local.filename_len) + + PHAR_ZIP_16(local.extra_len) + + entry-compressed_filesize, SEEK_SET); + if (sizeof(desc) != php_stream_read(phar_get_entrypfp(idata-internal_file TSRMLS_CC), + (char *) desc, sizeof(desc))) { +spprintf(error, 0, phar error: internal corruption of zip-based phar \%s\ (cannot read local data descriptor for file \%s\), idata-phar-fname, entry-filename); +return FAILURE; + } + if (desc.signature[0] == 'P' desc.signature[1] == 'K') { +memcpy((local.crc32), (desc.crc32), 12); + } else { +/* old data descriptors have no signature */ +memcpy((local.crc32), desc, 12); + } + } /* verify local header */ if (entry-filename_len != PHAR_ZIP_16(local.filename_len) || entry-crc32 != PHAR_ZIP_32(local.crc32) || entry-uncompressed_filesize != PHAR_ZIP_32(local.uncompsize) || entry-compressed_filesize != PHAR_ZIP_32(local.compsize)) { spprintf(error, 0, phar error: internal corruption of zip-based phar \%s\ (local header of file \%s\ does not match central directory), idata-phar-fname, entry-filename); Modified: pecl/phar/trunk/pharzip.h === --- pecl/phar/trunk/pharzip.h 2009-07-23 16:28:17 UTC (rev 284657) +++ pecl/phar/trunk/pharzip.h 2009-07-23 16:30:27 UTC (rev 284658) @@ -37,6 +37,7 @@ /* unused in this release */ typedef struct _phar_zip_file_datadesc { + char signature[4]; /* signature (optional)4 bytes */ char crc32[4]; /* crc-32 4 bytes */ char compsize[4]; /* compressed size 4 bytes */ char uncompsize[4]; /* uncompressed size 4 bytes */ Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-23 16:28:17 UTC (rev 284657) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-23 16:30:27 UTC (rev 284658) @@ -26,6 +26,7 @@ - Fixed bug #48854 (array_merge_recursive modifies arrays after first one). (Felipe) - Fixed bug #48802 (printf() returns incorrect outputted length). (Jani) +- Fixed bug #48791 (open office files always reported as corrupted). (Greg) - Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked directories). (Ilia) - Fixed bug #48783 (make install will fail saying phar file exists). (Greg) Modified: php/php-src/branches/PHP_5_3/ext/phar/phar.c === --- php/php-src/branches/PHP_5_3/ext/phar/phar.c 2009-07-23 16:28:17 UTC (rev 284657) +++ php/php-src/branches/PHP_5_3/ext/phar/phar.c 2009-07-23 16:30:27 UTC (rev 284658) @@ -2407,6 +2407,7 @@ if
[PHP-CVS] svn: p ecl/phar/trunk/tests/zip/bug48791.phpt ecl/phar/trunk/tests/zip/files/test.odt hp/php-src/branches/PHP_5_3/ext/phar/tests/zip/bug48791.phpt hp/php-src/branches/PHP_5_3/ext/phar/tests/
cellog Thu, 23 Jul 2009 16:40:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284659 Log: new phar test for zip with data descriptor in local file header Changed paths: A pecl/phar/trunk/tests/zip/bug48791.phpt A pecl/phar/trunk/tests/zip/files/test.odt A php/php-src/branches/PHP_5_3/ext/phar/tests/zip/bug48791.phpt A php/php-src/branches/PHP_5_3/ext/phar/tests/zip/files/test.odt A php/php-src/trunk/ext/phar/tests/zip/bug48791.phpt A php/php-src/trunk/ext/phar/tests/zip/files/test.odt Added: pecl/phar/trunk/tests/zip/bug48791.phpt === --- pecl/phar/trunk/tests/zip/bug48791.phpt (rev 0) +++ pecl/phar/trunk/tests/zip/bug48791.phpt 2009-07-23 16:40:47 UTC (rev 284659) @@ -0,0 +1,15 @@ +--TEST-- +Phar: Bug #48791: open office documents always reported as corrupted by phar extension +--SKIPIF-- +?php if (!extension_loaded(phar)) die(skip); ? +?php if (!extension_loaded(spl)) die(skip SPL not available); ? +?php if (!extension_loaded(zlib)) die(skip zlib not available); ? +--FILE-- +?php +echo file_get_contents('phar://' . dirname(__FILE__) . '/files/test.odt/content.xml'), \n; +? +===DONE=== +--EXPECT-- +?xml version=1.0 encoding=UTF-8? +office:document-content xmlns:office=urn:oasis:names:tc:opendocument:xmlns:office:1.0 xmlns:style=urn:oasis:names:tc:opendocument:xmlns:style:1.0 xmlns:text=urn:oasis:names:tc:opendocument:xmlns:text:1.0 xmlns:table=urn:oasis:names:tc:opendocument:xmlns:table:1.0 xmlns:draw=urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 xmlns:fo=urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0 xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:meta=urn:oasis:names:tc:opendocument:xmlns:meta:1.0 xmlns:number=urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0 xmlns:svg=urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0 xmlns:chart=urn:oasis:names:tc:opendocument:xmlns:chart:1.0 xmlns:dr3d=urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0 xmlns:math=http://www.w3.org/1998/Math/MathML; xmlns:form=urn:oasis:names:tc:opendocument:xmlns:form:1.0 xmlns:script=urn:oasis:names:tc:opendocument:xmlns:script:1.0 xmlns:ooo=http://openoffice.org/2004/office; xmlns:ooow=http://openoffice.org/2004/writer; xmlns:oooc=http://openoffice.org/2004/calc; xmlns:dom=http://www.w3.org/2001/xml-events; xmlns:xforms=http://www.w3.org/2002/xforms; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:rpt=http://openoffice.org/2005/report; xmlns:of=urn:oasis:names:tc:opendocument:xmlns:of:1.2 xmlns:rdfa=http://docs.oasis-open.org/opendocument/meta/rdfa#; office:version=1.2office:scripts/office:font-face-declsstyle:font-face style:name=OpenSymbol svg:font-family=OpenSymbol/style:font-face style:name=Tahoma1 svg:font-family=Tahoma/style:font-face style:name=Times New Roman svg:font-family=apos;Times New Romanapos; style:font-family-generic=roman style:font-pitch=variable/style:font-face style:name=Arial svg:font-family=Arial style:font-family-generic=swiss style:font-pitch=variable/style:font-face style:name=Arial Unicode MS svg:font-family=apos;Arial Unicode MSapos; style:font-family-generic=system style:font-pitch=variable/style:font-face style:name=MS Mincho svg:font-family=apos;MS Minchoapos; style:font-family-generic=system style:font-pitch=variable/style:font-face style:name=Tahoma svg:font-family=Tahoma style:font-family-generic=system style:font-pitch=variable//office:font-face-declsoffice:automatic-stylesstyle:style style:name=P1 style:family=paragraph style:parent-style-name=Standard style:list-style-name=L1/style:style style:name=T1 style:family=textstyle:text-properties style:font-name=Arial//style:styletext:list-style style:name=L1text:list-level-style-bullet text:level=1 text:style-name=Bullet_20_Symbols style:num-suffix=. text:bullet-char=â¢style:list-level-properties text:list-level-position-and-space-mode=label-alignmentstyle:list-level-label-alignment text:label-followed-by=listtab text:list-tab-stop-position=1.27cm fo:text-indent=-0.635cm fo:margin-left=1.27cm//style:list-level-properties/text:list-level-style-bullettext:list-level-style-bullet text:level=2 text:style-name=Bullet_20_Symbols style:num-suffix=. text:bullet-char=â¦style:list-level-properties text:list-level-position-and-space-mode=label-alignmentstyle:list-level-label-alignment text:label-followed-by=listtab text:list-tab-stop-position=1.905cm fo:text-indent=-0.635cm fo:margin-left=1.905cm//style:list-level-properties/text:list-level-style-bullettext:list-level-style-bullet text:level=3 text:style-name=Bullet_20_Symbols style:num-suffix=. text:bullet-char=âªstyle:list-level-properties text:list-level-position-and-space-mode=label-alignmentstyle:list-level-label-alignment text:label-followed-by=listtab text:list-tab-stop-position=2.54cm
[PHP-CVS] svn: p ecl/phar/trunk/package.php ecl/phar/trunk/phar_object.c ecl/phar/trunk/tests/bug48377.2.phpt ecl/phar/trunk/tests/bug48377.phpt hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PH
cellog Thu, 23 Jul 2009 17:04:24 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284660 Log: fix PHP Bug #48377: error message unclear on converting phar with existing file Bug: http://bugs.php.net/48377 (Open) error message unclear on converting phar with existing file Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/phar_object.c A pecl/phar/trunk/tests/bug48377.2.phpt A pecl/phar/trunk/tests/bug48377.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c A php/php-src/branches/PHP_5_3/ext/phar/tests/bug48377.2.phpt A php/php-src/branches/PHP_5_3/ext/phar/tests/bug48377.phpt U php/php-src/trunk/ext/phar/phar_object.c A php/php-src/trunk/ext/phar/tests/bug48377.2.phpt A php/php-src/trunk/ext/phar/tests/bug48377.phpt Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-23 16:40:47 UTC (rev 284659) +++ pecl/phar/trunk/package.php 2009-07-23 17:04:24 UTC (rev 284660) @@ -52,6 +52,7 @@ fixed PHP Bug #48783: make install will fail saying phar file exists fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location fixed PHP Bug #48681: openssl signature verification for tar archives broken + fixed PHP Bug #48377: error message unclear on converting phar with existing file fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) Changes since 2.0.0RC1: security vulnerability in handling of long tar filenames fixed Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-23 16:40:47 UTC (rev 284659) +++ pecl/phar/trunk/phar_object.c 2009-07-23 17:04:24 UTC (rev 284660) @@ -2043,6 +2043,7 @@ int ext_len = ext ? strlen(ext) : 0; int oldname_len; phar_archive_data **pphar = NULL; + php_stream_statbuf ssb; if (!ext) { if (phar-is_zip) { @@ -2113,6 +2114,8 @@ spprintf(newname, 0, %s.%s, strtok(basename, .), ext); efree(basename); + + basepath = estrndup(oldpath, (strlen(oldpath) - oldname_len)); phar-fname_len = spprintf(newpath, 0, %s%s, basepath, newname); phar-fname = newpath; @@ -2148,6 +2151,11 @@ return NULL; } its_ok: + if (SUCCESS == php_stream_stat_path(newpath, ssb)) { + efree(oldpath); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, phar \%s\ exists and must be unlinked prior to conversion, newpath); + return NULL; + } if (!phar-is_data) { if (SUCCESS != phar_detect_phar_fname_ext(newpath, phar-fname_len, (const char **) (phar-ext), (phar-ext_len), 1, 1, 1 TSRMLS_CC)) { efree(oldpath); Added: pecl/phar/trunk/tests/bug48377.2.phpt === --- pecl/phar/trunk/tests/bug48377.2.phpt (rev 0) +++ pecl/phar/trunk/tests/bug48377.2.phpt 2009-07-23 17:04:24 UTC (rev 284660) @@ -0,0 +1,25 @@ +--TEST-- +Phar: PHP bug #48377 error message unclear on converting phar with existing file test #2 +--SKIPIF-- +?php if (!extension_loaded(phar)) die(skip); ? +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; + +$phar = new PharData($fname); +$phar['x'] = 'hi'; +try { + $phar-convertToData(Phar::ZIP, Phar::NONE, '.2.phar.zip'); +} catch (BadMethodCallException $e) { + echo $e-getMessage(),\n; +} +? +===DONE=== +--CLEAN-- +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');? +--EXPECTF-- +data phar %sbug48377.2.phar.zip has invalid extension 2.phar.zip +===DONE=== \ No newline at end of file Added: pecl/phar/trunk/tests/bug48377.phpt === --- pecl/phar/trunk/tests/bug48377.phpt (rev 0) +++ pecl/phar/trunk/tests/bug48377.phpt 2009-07-23 17:04:24 UTC (rev 284660) @@ -0,0 +1,29 @@ +--TEST-- +Phar: PHP bug #48377 error message unclear on converting phar with existing file +--SKIPIF-- +?php if (!extension_loaded(phar)) die(skip); ? +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; + +touch($fname2); + +$phar = new Phar($fname, 0, 'a.phar'); +$phar['x'] = 'hi'; +try { + $phar-convertToData(Phar::ZIP, Phar::NONE, 'zip'); +} catch (BadMethodCallException $e) { + echo $e-getMessage(),\n; +} +? +===DONE=== +--CLEAN-- +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');? +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');? +--EXPECTF-- +phar %sbug48377.zip exists and must be unlinked prior to conversion +===DONE=== \ No newline at end of file Modified:
[PHP-CVS] svn: / pecl/phar/trunk/package.php pecl/phar/trunk/phar_object.c pecl/phar/trunk/tests/bug48377.2.phpt pecl/phar/trunk/tests/bug48377.phpt php/php-src/branches/PHP_5_3/NEWS php/php-src/branc
cellog Thu, 23 Jul 2009 17:04:24 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284660 Log: fix PHP Bug #48377: error message unclear on converting phar with existing file Bug: http://bugs.php.net/48377 (Closed) error message unclear on converting phar with existing file Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/phar_object.c A pecl/phar/trunk/tests/bug48377.2.phpt A pecl/phar/trunk/tests/bug48377.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/phar_object.c A php/php-src/branches/PHP_5_3/ext/phar/tests/bug48377.2.phpt A php/php-src/branches/PHP_5_3/ext/phar/tests/bug48377.phpt U php/php-src/trunk/ext/phar/phar_object.c A php/php-src/trunk/ext/phar/tests/bug48377.2.phpt A php/php-src/trunk/ext/phar/tests/bug48377.phpt Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-23 16:40:47 UTC (rev 284659) +++ pecl/phar/trunk/package.php 2009-07-23 17:04:24 UTC (rev 284660) @@ -52,6 +52,7 @@ fixed PHP Bug #48783: make install will fail saying phar file exists fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location fixed PHP Bug #48681: openssl signature verification for tar archives broken + fixed PHP Bug #48377: error message unclear on converting phar with existing file fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) Changes since 2.0.0RC1: security vulnerability in handling of long tar filenames fixed Modified: pecl/phar/trunk/phar_object.c === --- pecl/phar/trunk/phar_object.c 2009-07-23 16:40:47 UTC (rev 284659) +++ pecl/phar/trunk/phar_object.c 2009-07-23 17:04:24 UTC (rev 284660) @@ -2043,6 +2043,7 @@ int ext_len = ext ? strlen(ext) : 0; int oldname_len; phar_archive_data **pphar = NULL; + php_stream_statbuf ssb; if (!ext) { if (phar-is_zip) { @@ -2113,6 +2114,8 @@ spprintf(newname, 0, %s.%s, strtok(basename, .), ext); efree(basename); + + basepath = estrndup(oldpath, (strlen(oldpath) - oldname_len)); phar-fname_len = spprintf(newpath, 0, %s%s, basepath, newname); phar-fname = newpath; @@ -2148,6 +2151,11 @@ return NULL; } its_ok: + if (SUCCESS == php_stream_stat_path(newpath, ssb)) { + efree(oldpath); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, phar \%s\ exists and must be unlinked prior to conversion, newpath); + return NULL; + } if (!phar-is_data) { if (SUCCESS != phar_detect_phar_fname_ext(newpath, phar-fname_len, (const char **) (phar-ext), (phar-ext_len), 1, 1, 1 TSRMLS_CC)) { efree(oldpath); Added: pecl/phar/trunk/tests/bug48377.2.phpt === --- pecl/phar/trunk/tests/bug48377.2.phpt (rev 0) +++ pecl/phar/trunk/tests/bug48377.2.phpt 2009-07-23 17:04:24 UTC (rev 284660) @@ -0,0 +1,25 @@ +--TEST-- +Phar: PHP bug #48377 error message unclear on converting phar with existing file test #2 +--SKIPIF-- +?php if (!extension_loaded(phar)) die(skip); ? +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; + +$phar = new PharData($fname); +$phar['x'] = 'hi'; +try { + $phar-convertToData(Phar::ZIP, Phar::NONE, '.2.phar.zip'); +} catch (BadMethodCallException $e) { + echo $e-getMessage(),\n; +} +? +===DONE=== +--CLEAN-- +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');? +--EXPECTF-- +data phar %sbug48377.2.phar.zip has invalid extension 2.phar.zip +===DONE=== \ No newline at end of file Added: pecl/phar/trunk/tests/bug48377.phpt === --- pecl/phar/trunk/tests/bug48377.phpt (rev 0) +++ pecl/phar/trunk/tests/bug48377.phpt 2009-07-23 17:04:24 UTC (rev 284660) @@ -0,0 +1,29 @@ +--TEST-- +Phar: PHP bug #48377 error message unclear on converting phar with existing file +--SKIPIF-- +?php if (!extension_loaded(phar)) die(skip); ? +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; + +touch($fname2); + +$phar = new Phar($fname, 0, 'a.phar'); +$phar['x'] = 'hi'; +try { + $phar-convertToData(Phar::ZIP, Phar::NONE, 'zip'); +} catch (BadMethodCallException $e) { + echo $e-getMessage(),\n; +} +? +===DONE=== +--CLEAN-- +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');? +?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');? +--EXPECTF-- +phar %sbug48377.zip exists and must be unlinked prior to conversion +===DONE=== \ No newline at end of file
[PHP-CVS] svn: /php/php-src/trunk/ext/phar/phar/ pharcommand.inc
cellog Fri, 24 Jul 2009 02:04:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284677 Log: fix unmerged syntax fix Changed paths: U php/php-src/trunk/ext/phar/phar/pharcommand.inc Modified: php/php-src/trunk/ext/phar/phar/pharcommand.inc === --- php/php-src/trunk/ext/phar/phar/pharcommand.inc 2009-07-24 02:03:24 UTC (rev 284676) +++ php/php-src/trunk/ext/phar/phar/pharcommand.inc 2009-07-24 02:04:52 UTC (rev 284677) @@ -217,7 +217,7 @@ $pear = false; foreach ($path as $component) { if (file_exists($component . DIRECTORY_SEPARATOR . 'pear') -is_executable($component . DIRECTORY_SEPARATOR . 'pear'))) { +is_executable($component . DIRECTORY_SEPARATOR . 'pear')) { $pear = true; break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: p ecl/phar/trunk/tar.c ecl/phar/trunk/tests/tar/bignames.phpt hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/tar.c hp/php-src/branches/PHP_5_3/ext/phar/tests/tar/
cellog Wed, 22 Jul 2009 18:13:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284618 Log: fix php bug #49018 (phar tar stores long filenames with prefix/name reversed) Bug: http://pecl.php.net/bugs/49018 (unknown) Changed paths: U pecl/phar/trunk/tar.c U pecl/phar/trunk/tests/tar/bignames.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/tar.c U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/bignames.phpt U php/php-src/trunk/ext/phar/tar.c U php/php-src/trunk/ext/phar/tests/tar/bignames.phpt Modified: pecl/phar/trunk/tar.c === --- pecl/phar/trunk/tar.c 2009-07-22 16:10:00 UTC (rev 284617) +++ pecl/phar/trunk/tar.c 2009-07-22 18:13:38 UTC (rev 284618) @@ -2,7 +2,7 @@ +--+ | TAR archive support for Phar | +--+ - | Copyright (c) 2005-2008 The PHP Group| + | Copyright (c) 2005-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -39,7 +39,7 @@ /* adapted from format_octal() in libarchive * - * Copyright (c) 2003-2008 Tim Kientzle + * Copyright (c) 2003-2009 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -343,6 +343,9 @@ } for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; + if (name[i+j] == '\0') { + break; + } } entry.filename_len = i+j; @@ -644,8 +647,8 @@ } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename+100, entry-filename_len - 100); - memcpy(header.name, entry-filename, 100); + memcpy(header.prefix, entry-filename, entry-filename_len - 100); + memcpy(header.name, entry-filename + (entry-filename_len - 100), 100); } else { memcpy(header.name, entry-filename, entry-filename_len); } Modified: pecl/phar/trunk/tests/tar/bignames.phpt === --- pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 16:10:00 UTC (rev 284617) +++ pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 18:13:38 UTC (rev 284618) @@ -11,11 +11,11 @@ $pname = 'phar://' . $fname; $p1 = new PharData($fname); -$p1[str_repeat('a', 101)] = 'hi'; +$p1[str_repeat('a', 100) . 'b'] = 'hi'; $p1[str_repeat('a', 255)] = 'hi2'; copy($fname, $fname2); $p2 = new PharData($fname2); -echo $p2[str_repeat('a', 101)]-getContent() . \n; +echo $p2[str_repeat('a', 100) . 'b']-getContent() . \n; echo $p2[str_repeat('a', 255)]-getContent() . \n; try { Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-22 16:10:00 UTC (rev 284617) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-22 18:13:38 UTC (rev 284618) @@ -6,6 +6,8 @@ - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz, Stas) +- Fixed bug #49018 (phar tar stores long filenames wit prefix/name reversed). + (Greg) - Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia) - Fixed bug #48929 (Double \r\n after HTTP headers when header context Modified: php/php-src/branches/PHP_5_3/ext/phar/tar.c === --- php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 16:10:00 UTC (rev 284617) +++ php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 18:13:38 UTC (rev 284618) @@ -343,6 +343,9 @@ } for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; + if (name[i+j] == '\0') { + break; + } } entry.filename_len = i+j; @@ -644,8 +647,8 @@ } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename+100, entry-filename_len - 100); - memcpy(header.name, entry-filename, 100); + memcpy(header.prefix, entry-filename, entry-filename_len - 100); +
[PHP-CVS] svn: p ecl/phar/trunk/tar.c ecl/phar/trunk/tests/tar/bignames.phpt hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/tar.c hp/php-src/branches/PHP_5_3/ext/phar/tests/tar/
cellog Wed, 22 Jul 2009 18:13:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284618 Log: fix php bug #49018 (phar tar stores long filenames with prefix/name reversed) Bug: http://bugs.php.net/49018 (unknown) Changed paths: U pecl/phar/trunk/tar.c U pecl/phar/trunk/tests/tar/bignames.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/tar.c U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/bignames.phpt U php/php-src/trunk/ext/phar/tar.c U php/php-src/trunk/ext/phar/tests/tar/bignames.phpt Modified: pecl/phar/trunk/tar.c === --- pecl/phar/trunk/tar.c 2009-07-22 16:10:00 UTC (rev 284617) +++ pecl/phar/trunk/tar.c 2009-07-22 18:13:38 UTC (rev 284618) @@ -2,7 +2,7 @@ +--+ | TAR archive support for Phar | +--+ - | Copyright (c) 2005-2008 The PHP Group| + | Copyright (c) 2005-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -39,7 +39,7 @@ /* adapted from format_octal() in libarchive * - * Copyright (c) 2003-2008 Tim Kientzle + * Copyright (c) 2003-2009 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -343,6 +343,9 @@ } for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; + if (name[i+j] == '\0') { + break; + } } entry.filename_len = i+j; @@ -644,8 +647,8 @@ } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename+100, entry-filename_len - 100); - memcpy(header.name, entry-filename, 100); + memcpy(header.prefix, entry-filename, entry-filename_len - 100); + memcpy(header.name, entry-filename + (entry-filename_len - 100), 100); } else { memcpy(header.name, entry-filename, entry-filename_len); } Modified: pecl/phar/trunk/tests/tar/bignames.phpt === --- pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 16:10:00 UTC (rev 284617) +++ pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 18:13:38 UTC (rev 284618) @@ -11,11 +11,11 @@ $pname = 'phar://' . $fname; $p1 = new PharData($fname); -$p1[str_repeat('a', 101)] = 'hi'; +$p1[str_repeat('a', 100) . 'b'] = 'hi'; $p1[str_repeat('a', 255)] = 'hi2'; copy($fname, $fname2); $p2 = new PharData($fname2); -echo $p2[str_repeat('a', 101)]-getContent() . \n; +echo $p2[str_repeat('a', 100) . 'b']-getContent() . \n; echo $p2[str_repeat('a', 255)]-getContent() . \n; try { Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-22 16:10:00 UTC (rev 284617) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-22 18:13:38 UTC (rev 284618) @@ -6,6 +6,8 @@ - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz, Stas) +- Fixed bug #49018 (phar tar stores long filenames wit prefix/name reversed). + (Greg) - Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia) - Fixed bug #48929 (Double \r\n after HTTP headers when header context Modified: php/php-src/branches/PHP_5_3/ext/phar/tar.c === --- php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 16:10:00 UTC (rev 284617) +++ php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 18:13:38 UTC (rev 284618) @@ -343,6 +343,9 @@ } for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; + if (name[i+j] == '\0') { + break; + } } entry.filename_len = i+j; @@ -644,8 +647,8 @@ } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename+100, entry-filename_len - 100); - memcpy(header.name, entry-filename, 100); + memcpy(header.prefix, entry-filename, entry-filename_len - 100); +
[PHP-CVS] svn: p ecl/phar/trunk/tar.c ecl/phar/trunk/tests/tar/bignames.phpt hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/tar.c hp/php-src/branches/PHP_5_3/ext/phar/tests/tar/
cellog Wed, 22 Jul 2009 18:13:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284618 Log: fix php bug #49018 (phar tar stores long filenames with prefix/name reversed) Bug: http://bugs.php.net/49018 (Closed) phar tar stores long filenames with prefix/name reversed Changed paths: U pecl/phar/trunk/tar.c U pecl/phar/trunk/tests/tar/bignames.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/tar.c U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/bignames.phpt U php/php-src/trunk/ext/phar/tar.c U php/php-src/trunk/ext/phar/tests/tar/bignames.phpt Modified: pecl/phar/trunk/tar.c === --- pecl/phar/trunk/tar.c 2009-07-22 16:10:00 UTC (rev 284617) +++ pecl/phar/trunk/tar.c 2009-07-22 18:13:38 UTC (rev 284618) @@ -2,7 +2,7 @@ +--+ | TAR archive support for Phar | +--+ - | Copyright (c) 2005-2008 The PHP Group| + | Copyright (c) 2005-2009 The PHP Group| +--+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -39,7 +39,7 @@ /* adapted from format_octal() in libarchive * - * Copyright (c) 2003-2008 Tim Kientzle + * Copyright (c) 2003-2009 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -343,6 +343,9 @@ } for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; + if (name[i+j] == '\0') { + break; + } } entry.filename_len = i+j; @@ -644,8 +647,8 @@ } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename+100, entry-filename_len - 100); - memcpy(header.name, entry-filename, 100); + memcpy(header.prefix, entry-filename, entry-filename_len - 100); + memcpy(header.name, entry-filename + (entry-filename_len - 100), 100); } else { memcpy(header.name, entry-filename, entry-filename_len); } Modified: pecl/phar/trunk/tests/tar/bignames.phpt === --- pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 16:10:00 UTC (rev 284617) +++ pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 18:13:38 UTC (rev 284618) @@ -11,11 +11,11 @@ $pname = 'phar://' . $fname; $p1 = new PharData($fname); -$p1[str_repeat('a', 101)] = 'hi'; +$p1[str_repeat('a', 100) . 'b'] = 'hi'; $p1[str_repeat('a', 255)] = 'hi2'; copy($fname, $fname2); $p2 = new PharData($fname2); -echo $p2[str_repeat('a', 101)]-getContent() . \n; +echo $p2[str_repeat('a', 100) . 'b']-getContent() . \n; echo $p2[str_repeat('a', 255)]-getContent() . \n; try { Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-22 16:10:00 UTC (rev 284617) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-22 18:13:38 UTC (rev 284618) @@ -6,6 +6,8 @@ - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz, Stas) +- Fixed bug #49018 (phar tar stores long filenames wit prefix/name reversed). + (Greg) - Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia) - Fixed bug #48929 (Double \r\n after HTTP headers when header context Modified: php/php-src/branches/PHP_5_3/ext/phar/tar.c === --- php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 16:10:00 UTC (rev 284617) +++ php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 18:13:38 UTC (rev 284618) @@ -343,6 +343,9 @@ } for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; + if (name[i+j] == '\0') { + break; + } } entry.filename_len = i+j; @@ -644,8 +647,8 @@ } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename+100, entry-filename_len - 100); - memcpy(header.name, entry-filename, 100); + memcpy(header.prefix, entry-filename,
[PHP-CVS] svn: p ecl/phar/trunk/Makefile.frag hp/php-src/branches/PHP_5_3/ext/phar/Makefile.frag hp/php-src/trunk/ext/phar/Makefile.frag
cellog Wed, 22 Jul 2009 18:37:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284621 Log: don't package up subversion directory in phar.phar Changed paths: U pecl/phar/trunk/Makefile.frag U php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag U php/php-src/trunk/ext/phar/Makefile.frag Modified: pecl/phar/trunk/Makefile.frag === --- pecl/phar/trunk/Makefile.frag 2009-07-22 18:29:28 UTC (rev 284620) +++ pecl/phar/trunk/Makefile.frag 2009-07-22 18:37:32 UTC (rev 284621) @@ -37,7 +37,7 @@ -...@echo Generating phar.phar -...@rm -f $(builddir)/phar.phar -...@rm -f $(srcdir)/phar.phar - @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x CVS -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ + @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x \\.svn -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ -...@chmod +x $(builddir)/phar.phar install-pharcmd: pharcmd Modified: php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag === --- php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2009-07-22 18:29:28 UTC (rev 284620) +++ php/php-src/branches/PHP_5_3/ext/phar/Makefile.frag 2009-07-22 18:37:32 UTC (rev 284621) @@ -37,7 +37,7 @@ -...@echo Generating phar.phar -...@rm -f $(builddir)/phar.phar -...@rm -f $(srcdir)/phar.phar - @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x CVS -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ + @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x \\.svn -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ -...@chmod +x $(builddir)/phar.phar install-pharcmd: pharcmd Modified: php/php-src/trunk/ext/phar/Makefile.frag === --- php/php-src/trunk/ext/phar/Makefile.frag2009-07-22 18:29:28 UTC (rev 284620) +++ php/php-src/trunk/ext/phar/Makefile.frag2009-07-22 18:37:32 UTC (rev 284621) @@ -37,7 +37,7 @@ -...@echo Generating phar.phar -...@rm -f $(builddir)/phar.phar -...@rm -f $(srcdir)/phar.phar - @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x CVS -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ + @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x \\.svn -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b $(PHP_PHARCMD_BANG) $(srcdir)/phar/ -...@chmod +x $(builddir)/phar.phar install-pharcmd: pharcmd -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: p ecl/phar/trunk/package.php ecl/phar/trunk/tar.c ecl/phar/trunk/tests/tar/bignames.phpt ecl/phar/trunk/tests/tar/bignames_overflow.phpt hp/php-src/branches/PHP_5_3/NEWS hp/php-src/bran
cellog Wed, 22 Jul 2009 19:51:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284622 Log: Fix Bug #49020: phar misinterprets ustar long filename standard Bug: http://pecl.php.net/bugs/49020 (unknown) Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/tar.c U pecl/phar/trunk/tests/tar/bignames.phpt U pecl/phar/trunk/tests/tar/bignames_overflow.phpt U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/tar.c U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/bignames.phpt U php/php-src/branches/PHP_5_3/ext/phar/tests/tar/bignames_overflow.phpt U php/php-src/trunk/ext/phar/tar.c U php/php-src/trunk/ext/phar/tests/tar/bignames.phpt U php/php-src/trunk/ext/phar/tests/tar/bignames_overflow.phpt Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-22 18:37:32 UTC (rev 284621) +++ pecl/phar/trunk/package.php 2009-07-22 19:51:37 UTC (rev 284622) @@ -44,6 +44,8 @@ * on conversion to other formats, user-supplied aliases are validated Changes since 2.0.0RC2: + fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed + fixed PHP Bug #49020: phar misinterprets ustar long filename standard fixed PHP Bug #48681: openssl signature verification for tar archives broken fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) Changes since 2.0.0RC1: Modified: pecl/phar/trunk/tar.c === --- pecl/phar/trunk/tar.c 2009-07-22 18:37:32 UTC (rev 284621) +++ pecl/phar/trunk/tar.c 2009-07-22 19:51:37 UTC (rev 284622) @@ -341,6 +341,7 @@ break; } } + name[i++] = '/'; for (j = 0; j 100; j++) { name[i+j] = hdr-name[j]; if (name[i+j] == '\0') { @@ -641,14 +642,25 @@ memset((char *) header, 0, sizeof(header)); if (entry-filename_len 100) { - if (entry-filename_len 255) { + char *boundary; + if (entry-filename_len 256) { if (fp-error) { spprintf(fp-error, 4096, tar-based phar \%s\ cannot be created, filename \%s\ is too long for tar file format, entry-phar-fname, entry-filename); } return ZEND_HASH_APPLY_STOP; } - memcpy(header.prefix, entry-filename, entry-filename_len - 100); - memcpy(header.name, entry-filename + (entry-filename_len - 100), 100); + boundary = entry-filename + entry-filename_len - 101; + while (*boundary *boundary != '/') { + ++boundary; + } + if (!*boundary || ((boundary - entry-filename) 155)) { + if (fp-error) { +spprintf(fp-error, 4096, tar-based phar \%s\ cannot be created, filename \%s\ is too long for tar file format, entry-phar-fname, entry-filename); + } + return ZEND_HASH_APPLY_STOP; + } + memcpy(header.prefix, entry-filename, boundary - entry-filename); + memcpy(header.name, boundary + 1, entry-filename_len - (boundary + 1 - entry-filename)); } else { memcpy(header.name, entry-filename, entry-filename_len); } Modified: pecl/phar/trunk/tests/tar/bignames.phpt === --- pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 18:37:32 UTC (rev 284621) +++ pecl/phar/trunk/tests/tar/bignames.phpt 2009-07-22 19:51:37 UTC (rev 284622) @@ -8,30 +8,50 @@ ?php $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; $fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar'; +$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.tar'; +$fname4 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.4.tar'; $pname = 'phar://' . $fname; $p1 = new PharData($fname); -$p1[str_repeat('a', 100) . 'b'] = 'hi'; -$p1[str_repeat('a', 255)] = 'hi2'; +$p1[str_repeat('a', 100) . '/b'] = 'hi'; +$p1[str_repeat('a', 155) . '/' . str_repeat('b', 100)] = 'hi2'; copy($fname, $fname2); $p2 = new PharData($fname2); -echo $p2[str_repeat('a', 100) . 'b']-getContent() . \n; -echo $p2[str_repeat('a', 255)]-getContent() . \n; +echo $p2[str_repeat('a', 100) . '/b']-getContent() . \n; +echo $p2[str_repeat('a', 155) . '/' . str_repeat('b', 100)]-getContent() . \n; try { $p2[str_repeat('a', 400)] = 'yuck'; } catch (Exception $e) { echo $e-getMessage() . \n; } + +try { + $p2 = new PharData($fname3); + $p2[str_repeat('a', 101)] = 'yuck'; +} catch (Exception $e) { + echo $e-getMessage() . \n; +} + +try { + $p2 = new PharData($fname4); + $p2[str_repeat('b', 160) . '/' . str_repeat('a', 90)] = 'yuck'; +} catch (Exception $e) { + echo $e-getMessage() . \n; +} ? ===DONE=== --CLEAN-- ?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); +...@unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.tar'); +...@unlink(dirname(__FILE__) . '/' .
[PHP-CVS] svn: p ecl/phar/trunk/package.php ecl/phar/trunk/tar.c hp/php-src/branches/PHP_5_3/NEWS hp/php-src/branches/PHP_5_3/ext/phar/tar.c hp/php-src/trunk/ext/phar/tar.c
cellog Wed, 22 Jul 2009 20:21:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284624 Log: fix Bug #49021: phar tar signature algorithm reports as Unknown (0) in getSignature() call Bug: http://pecl.php.net/bugs/49021 (unknown) Changed paths: U pecl/phar/trunk/package.php U pecl/phar/trunk/tar.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/phar/tar.c U php/php-src/trunk/ext/phar/tar.c Modified: pecl/phar/trunk/package.php === --- pecl/phar/trunk/package.php 2009-07-22 20:08:50 UTC (rev 284623) +++ pecl/phar/trunk/package.php 2009-07-22 20:21:39 UTC (rev 284624) @@ -44,8 +44,10 @@ * on conversion to other formats, user-supplied aliases are validated Changes since 2.0.0RC2: + fixed PHP Bug #49021: phar tar signature algorithm reports as Unknown (0) in + getSignature() call + fixed PHP Bug #49020: phar misinterprets ustar long filename standard fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed - fixed PHP Bug #49020: phar misinterprets ustar long filename standard fixed PHP Bug #48681: openssl signature verification for tar archives broken fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) Changes since 2.0.0RC1: Modified: pecl/phar/trunk/tar.c === --- pecl/phar/trunk/tar.c 2009-07-22 20:08:50 UTC (rev 284623) +++ pecl/phar/trunk/tar.c 2009-07-22 20:21:39 UTC (rev 284624) @@ -283,7 +283,8 @@ #else # define PHAR_GET_32(buffer) (php_uint32) *(buffer) #endif - if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { + myphar-sig_flags = PHAR_GET_32(buf); + if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, myphar-sig_flags, buf 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { if (error) { char *save = *error; spprintf(error, 4096, phar error: tar-based phar \%s\ signature cannot be verified: %s, fname, save); Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-22 20:08:50 UTC (rev 284623) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-22 20:21:39 UTC (rev 284624) @@ -6,6 +6,8 @@ - Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz, Stas) +- Fixed bug #49012 (phar tar signature algorithm reports as Unknown (0) in + getSignature() call). (Greg) - Fixed bug #49020 (phar misinterprets ustar long filename standard). (Greg) - Fixed bug #49018 (phar tar stores long filenames wit prefix/name reversed). Modified: php/php-src/branches/PHP_5_3/ext/phar/tar.c === --- php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 20:08:50 UTC (rev 284623) +++ php/php-src/branches/PHP_5_3/ext/phar/tar.c 2009-07-22 20:21:39 UTC (rev 284624) @@ -283,7 +283,8 @@ #else # define PHAR_GET_32(buffer) (php_uint32) *(buffer) #endif - if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { + myphar-sig_flags = PHAR_GET_32(buf); + if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, myphar-sig_flags, buf + 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { if (error) { char *save = *error; spprintf(error, 4096, phar error: tar-based phar \%s\ signature cannot be verified: %s, fname, save); Modified: php/php-src/trunk/ext/phar/tar.c === --- php/php-src/trunk/ext/phar/tar.c2009-07-22 20:08:50 UTC (rev 284623) +++ php/php-src/trunk/ext/phar/tar.c2009-07-22 20:21:39 UTC (rev 284624) @@ -283,7 +283,8 @@ #else # define PHAR_GET_32(buffer) (php_uint32) *(buffer) #endif - if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { + myphar-sig_flags = PHAR_GET_32(buf); + if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, myphar-sig_flags, buf 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { if (error) {
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar tar.c /ext/phar/tests/tar tar_openssl_hash.phpt /ext/phar/tests/tar/files P1-1.0.0.tgz P1-1.0.0.tgz.pubkey
cellog Tue Jun 30 14:49:12 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/phar/tests/tar tar_openssl_hash.phpt /php-src/ext/phar/tests/tar/files P1-1.0.0.tgz P1-1.0.0.tgz.pubkey Modified files: /php-srcNEWS /php-src/ext/phar tar.c Log: fixed bug #48681 (openssl signature verification for tar archives broken) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.657r2=1.2027.2.547.2.965.2.658diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.657 php-src/NEWS:1.2027.2.547.2.965.2.658 --- php-src/NEWS:1.2027.2.547.2.965.2.657 Tue Jun 30 11:39:15 2009 +++ php-src/NEWSTue Jun 30 14:49:11 2009 @@ -2,6 +2,8 @@ ||| ?? ??? 2009, PHP 5.3.1 +- Fixed bug #48681 (openssl signature verification for tar archives broken). + (Greg) - Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo). (Kalle, Rick Yorgason) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.55.2.29r2=1.55.2.30diff_format=u Index: php-src/ext/phar/tar.c diff -u php-src/ext/phar/tar.c:1.55.2.29 php-src/ext/phar/tar.c:1.55.2.30 --- php-src/ext/phar/tar.c:1.55.2.29Thu Jun 4 19:59:09 2009 +++ php-src/ext/phar/tar.c Tue Jun 30 14:49:12 2009 @@ -255,6 +255,8 @@ phar_tar_number(hdr-size, sizeof(hdr-size)); if (((!old hdr-prefix[0] == 0) || old) strlen(hdr-name) == sizeof(.phar/signature.bin)-1 !strncmp(hdr-name, .phar/signature.bin, sizeof(.phar/signature.bin)-1)) { + off_t curloc; + if (size 511) { if (error) { spprintf(error, 4096, phar error: tar-based phar \%s\ has signature that is larger than 511 bytes, cannot process, fname); @@ -264,6 +266,7 @@ phar_destroy_phar_data(myphar TSRMLS_CC); return FAILURE; } + curloc = php_stream_tell(fp); read = php_stream_read(fp, buf, size); if (read != size) { if (error) { @@ -280,7 +283,7 @@ #else # define PHAR_GET_32(buffer) (php_uint32) *(buffer) #endif - if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, PHAR_GET_32(buf + 4), fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { + if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { if (error) { char *save = *error; spprintf(error, 4096, phar error: tar-based phar \%s\ signature cannot be verified: %s, fname, save); @@ -288,11 +291,11 @@ } goto bail; } + php_stream_seek(fp, curloc + 512, SEEK_SET); /* signature checked out, let's ensure this is the last file in the phar */ - size = ((size+511)~511) + 512; if (((hdr-typeflag == '\0') || (hdr-typeflag == TAR_FILE)) size 0) { /* this is not good enough - seek succeeds even on truncated tars */ - php_stream_seek(fp, size, SEEK_CUR); + php_stream_seek(fp, 512, SEEK_CUR); if ((uint)php_stream_tell(fp) totalsize) { if (error) { spprintf(error, 4096, phar error: \%s\ is a corrupted tar file (truncated), fname); http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/tar_openssl_hash.phpt?view=markuprev=1.1 Index: php-src/ext/phar/tests/tar/tar_openssl_hash.phpt +++ php-src/ext/phar/tests/tar/tar_openssl_hash.phpt --TEST-- Phar: tar archive, require_hash=1, OpenSSL hash --SKIPIF-- ?php if (!extension_loaded('phar')) die('skip'); ? ?php if (!extension_loaded(spl)) die(skip SPL not available); ? ?php if (!extension_loaded(zlib)) die(skip zlib not available); ? ?php if (!extension_loaded(openssl)) die(skip openssl not available); ? --INI-- phar.readonly=1 phar.require_hash=1 --FILE-- ?php try { $phar = new PharData(dirname(__FILE__) . '/files/P1-1.0.0.tgz'); } catch (Exception $e) { echo $e-getMessage().\n; } ? ===DONE=== --EXPECT-- ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey?view=markuprev=1.1 Index: php-src/ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey +++ php-src/ext/phar/tests/tar/files/P1-1.0.0.tgz.pubkey -BEGIN PUBLIC
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar/phar pharcommand.inc
Lukas Kahwe Smith wrote: On 25.06.2009, at 00:12, Greg Beaver wrote: cellogWed Jun 24 22:12:47 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/phar/pharpharcommand.inc Log: fix slightly unclear error message in generation of phar.phar This doesnt need to be merged to HEAD? Hi, It was merged to HEAD here http://news.php.net/php.cvs/58971 Thanks, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar/phar pharcommand.inc
cellog Wed Jun 24 22:12:47 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/phar/phar pharcommand.inc Log: fix slightly unclear error message in generation of phar.phar http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.647r2=1.2027.2.547.2.965.2.648diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.647 php-src/NEWS:1.2027.2.547.2.965.2.648 --- php-src/NEWS:1.2027.2.547.2.965.2.647 Wed Jun 24 17:43:09 2009 +++ php-src/NEWSWed Jun 24 22:12:47 2009 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 2009, PHP 5.3.0 RC 5 +- Fixed slightly unclear message in generation of phar.phar. (Greg+others) - Fixed memory leak in json_decode() when depth is less than 0. (Felipe) - Fixed bug #48643 (String functions memory issue). (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar/pharcommand.inc?r1=1.49.2.15r2=1.49.2.16diff_format=u Index: php-src/ext/phar/phar/pharcommand.inc diff -u php-src/ext/phar/phar/pharcommand.inc:1.49.2.15 php-src/ext/phar/phar/pharcommand.inc:1.49.2.16 --- php-src/ext/phar/phar/pharcommand.inc:1.49.2.15 Thu Jun 4 12:22:32 2009 +++ php-src/ext/phar/phar/pharcommand.inc Wed Jun 24 22:12:47 2009 @@ -210,16 +210,28 @@ */ static function cli_arg_typ_loader($arg, $cfg, $key) { - if (($arg == '0' || $arg == '1') !file_exists($arg)) { + if (($arg == '0' || $arg == '1') !file_exists($arg) substr(PHP_OS, 0, 3) != 'WIN') { $found = NULL; - $apiver = `pear -q info PHP_Archive 2/dev/null|grep 'API Version'`; - $apiver = trim(substr($apiver, strlen('API Version'))); + $apiver = false; + $path = explode(PATH_SEPARATOR, $_ENV['PATH']); + $pear = false; + foreach ($path as $component) { + if (file_exists($component . DIRECTORY_SEPARATOR . 'pear') +is_executable($component . DIRECTORY_SEPARATOR . 'pear')) { + $pear = true; + break; + } + } + if ($pear) { + $apiver = `pear -q info PHP_Archive 2/dev/null|grep 'API Version'`; + $apiver = trim(substr($apiver, strlen('API Version'))); + } if ($apiver) { - self::notice(Pear package PHP_Archive: API Version: $apiver.\n); + self::notice(PEAR package PHP_Archive: API Version: $apiver.\n); $files = explode(\n, `pear list-files PHP_Archive`); $phpdir = `pear config-get php_dir 2/dev/null`; $phpdir = trim($phpdir); - self::notice(Pear package PHP_Archive: $phpdir.\n); + self::notice(PEAR package PHP_Archive: $phpdir.\n); if (is_dir($phpdir)) { foreach($files as $ent) { $matches = NULL; @@ -234,13 +246,13 @@ } } } else { - self::notice(Pear package PHP_Archive: corrupt or inaccessible base dir: $php_dir.\n); + self::notice(PEAR package PHP_Archive: corrupt or inaccessible base dir: $php_dir.\n); } } if (isset($found)) { - self::notice(Pear package PHP_Archive: $found.\n); + self::notice(PEAR package PHP_Archive: $found.\n); } else { - $msg = Pear package PHP_Archive or Archive.php class file not found.\n; + $msg = PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.\n; if ($arg == '0') { self::notice($msg); } else { @@ -1554,7 +1566,7 @@ $use_ext = extension_loaded('phar'); $version = array( 'PHP Version' = phpversion(), - 'phar.phar version' = '$Revision: 1.49.2.15 $', + 'phar.phar version' = '$Revision: 1.49.2.16 $', 'Phar EXT
[PHP-CVS] cvs: php-src /ext/phar tar.c /ext/phar/phar pharcommand.inc /ext/phar/tests/tar tar_openssl_hash.phpt /ext/phar/tests/tar/files P1-1.0.0.tgz P1-1.0.0.tgz.pubkey
cellog Wed Jun 24 22:19:47 2009 UTC Added files: /php-src/ext/phar/tests/tar tar_openssl_hash.phpt /php-src/ext/phar/tests/tar/files P1-1.0.0.tgz P1-1.0.0.tgz.pubkey Modified files: /php-src/ext/phar tar.c /php-src/ext/phar/phar pharcommand.inc Log: fix Bug #48681: openssl signature verification for tar archives broken in ext/phar, merge small fixes to phar.phar generation from PHP_5_3 http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.69r2=1.70diff_format=u Index: php-src/ext/phar/tar.c diff -u php-src/ext/phar/tar.c:1.69 php-src/ext/phar/tar.c:1.70 --- php-src/ext/phar/tar.c:1.69 Thu Jun 4 20:00:01 2009 +++ php-src/ext/phar/tar.c Wed Jun 24 22:19:46 2009 @@ -255,6 +255,8 @@ phar_tar_number(hdr-size, sizeof(hdr-size)); if (((!old hdr-prefix[0] == 0) || old) strlen(hdr-name) == sizeof(.phar/signature.bin)-1 !strncmp(hdr-name, .phar/signature.bin, sizeof(.phar/signature.bin)-1)) { + off_t curloc; + if (size 511) { if (error) { spprintf(error, 4096, phar error: tar-based phar \%s\ has signature that is larger than 511 bytes, cannot process, fname); @@ -264,6 +266,7 @@ phar_destroy_phar_data(myphar TSRMLS_CC); return FAILURE; } + curloc = php_stream_tell(fp); read = php_stream_read(fp, buf, size); if (read != size) { if (error) { @@ -280,7 +283,7 @@ #else # define PHAR_GET_32(buffer) (php_uint32) *(buffer) #endif - if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, PHAR_GET_32(buf + 4), fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { + if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, PHAR_GET_32(buf), buf + 8, size - 8, fname, myphar-signature, myphar-sig_len, error TSRMLS_CC)) { if (error) { char *save = *error; spprintf(error, 4096, phar error: tar-based phar \%s\ signature cannot be verified: %s, fname, save); @@ -288,11 +291,11 @@ } goto bail; } + php_stream_seek(fp, curloc + 512, SEEK_SET); /* signature checked out, let's ensure this is the last file in the phar */ - size = ((size+511)~511) + 512; if (((hdr-typeflag == '\0') || (hdr-typeflag == TAR_FILE)) size 0) { /* this is not good enough - seek succeeds even on truncated tars */ - php_stream_seek(fp, size, SEEK_CUR); + php_stream_seek(fp, 512, SEEK_CUR); if ((uint)php_stream_tell(fp) totalsize) { if (error) { spprintf(error, 4096, phar error: \%s\ is a corrupted tar file (truncated), fname); http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar/pharcommand.inc?r1=1.54r2=1.55diff_format=u Index: php-src/ext/phar/phar/pharcommand.inc diff -u php-src/ext/phar/phar/pharcommand.inc:1.54 php-src/ext/phar/phar/pharcommand.inc:1.55 --- php-src/ext/phar/phar/pharcommand.inc:1.54 Thu Jun 4 12:21:59 2009 +++ php-src/ext/phar/phar/pharcommand.inc Wed Jun 24 22:19:47 2009 @@ -210,16 +210,28 @@ */ static function cli_arg_typ_loader($arg, $cfg, $key) { - if (($arg == '0' || $arg == '1') !file_exists($arg)) { + if (($arg == '0' || $arg == '1') !file_exists($arg) substr(PHP_OS, 0, 3) != 'WIN') { $found = NULL; - $apiver = `pear -q info PHP_Archive 2/dev/null|grep 'API Version'`; - $apiver = trim(substr($apiver, strlen('API Version'))); + $apiver = false; + $path = explode(PATH_SEPARATOR, $_ENV['PATH']); + $pear = false; + foreach ($path as $component) { + if (file_exists($component . DIRECTORY_SEPARATOR . 'pear') +is_executable($component . DIRECTORY_SEPARATOR . 'pear'))) { + $pear = true; + break; + } + } + if ($pear) { + $apiver = `pear -q info PHP_Archive 2/dev/null|grep 'API Version'`; +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests phar_oo_010.phpt
cellog Thu Jun 18 18:12:04 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests phar_oo_010.phpt Log: fix EXPECT section of test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_010.phpt?r1=1.7r2=1.7.2.1diff_format=u Index: php-src/ext/phar/tests/phar_oo_010.phpt diff -u php-src/ext/phar/tests/phar_oo_010.phpt:1.7 php-src/ext/phar/tests/phar_oo_010.phpt:1.7.2.1 --- php-src/ext/phar/tests/phar_oo_010.phpt:1.7 Wed Feb 20 13:32:59 2008 +++ php-src/ext/phar/tests/phar_oo_010.phpt Thu Jun 18 18:12:04 2009 @@ -46,10 +46,10 @@ bool(true) bool(true) ===DIR=== -bool(false) +bool(true) ===NA=== bool(false) bool(false) bool(false) -bool(false) +bool(true) ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests phar_oo_010.phpt
cellog Thu Jun 18 18:12:11 2009 UTC Modified files: /php-src/ext/phar/tests phar_oo_010.phpt Log: fix EXPECT section of test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_010.phpt?r1=1.7r2=1.8diff_format=u Index: php-src/ext/phar/tests/phar_oo_010.phpt diff -u php-src/ext/phar/tests/phar_oo_010.phpt:1.7 php-src/ext/phar/tests/phar_oo_010.phpt:1.8 --- php-src/ext/phar/tests/phar_oo_010.phpt:1.7 Wed Feb 20 13:32:59 2008 +++ php-src/ext/phar/tests/phar_oo_010.phpt Thu Jun 18 18:12:10 2009 @@ -46,10 +46,10 @@ bool(true) bool(true) ===DIR=== -bool(false) +bool(true) ===NA=== bool(false) bool(false) bool(false) -bool(false) +bool(true) ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl php_spl.c /ext/spl/tests spl_autoload_bug48541.phpt
cellog Sat Jun 13 17:28:35 2009 UTC Added files: /php-src/ext/spl/tests spl_autoload_bug48541.phpt Modified files: /php-src/ext/splphp_spl.c Log: fix Bug #48541: spl_autoload_register only registers first closure, then leaks the others http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.158r2=1.159diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.158 php-src/ext/spl/php_spl.c:1.159 --- php-src/ext/spl/php_spl.c:1.158 Tue Jun 9 01:57:57 2009 +++ php-src/ext/spl/php_spl.c Sat Jun 13 17:28:35 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.158 2009/06/09 01:57:57 scottmac Exp $ */ +/* $Id: php_spl.c,v 1.159 2009/06/13 17:28:35 cellog Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -503,8 +503,24 @@ alfi.func_ptr = fcc.function_handler; obj_ptr = fcc.object_ptr; if (Z_TYPE_P(zcallable) == IS_OBJECT) { + zstr lc_name; + + size_t func_name_len = Z_UNISIZE(zfunc_name); + alfi.closure = zcallable; Z_ADDREF_P(zcallable); + + lc_name.v = Z_UNIVAL(zfunc_name).v = erealloc(Z_UNIVAL(zfunc_name).v, func_name_len + 2 + sizeof(zcallable-value.obj.handle)); + memcpy(lc_name.s + func_name_len, (zcallable-value.obj.handle), sizeof(zcallable-value.obj.handle)); + func_name_len += sizeof(zcallable-value.obj.handle); + if (Z_TYPE(zfunc_name) == IS_UNICODE) { + func_name_len /= sizeof(UChar); + Z_STRLEN(zfunc_name) = func_name_len; + lc_name.u[func_name_len] = 0; + } else { + Z_STRLEN(zfunc_name) = func_name_len; + lc_name.s[func_name_len] = '\0'; + } } if (error) { efree(error); @@ -512,6 +528,9 @@ zend_u_str_tolower(Z_TYPE(zfunc_name), Z_UNIVAL(zfunc_name), Z_UNILEN(zfunc_name)); if (SPL_G(autoload_functions) zend_u_hash_exists(SPL_G(autoload_functions), Z_TYPE(zfunc_name), Z_UNIVAL(zfunc_name), Z_UNILEN(zfunc_name)+1)) { + if (alfi.closure) { + Z_DELREF_P(zcallable); + } goto skip; } http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_bug48541.phpt?view=markuprev=1.1 Index: php-src/ext/spl/tests/spl_autoload_bug48541.phpt +++ php-src/ext/spl/tests/spl_autoload_bug48541.phpt --TEST-- SPL: spl_autoload_register() Bug #48541: registering multiple closures fails with memleaks --FILE-- ?php $a = function ($class) { echo a called\n; }; $b = function ($class) { eval('class ' . $class . '{function __construct(){echo foo\n;}}'); echo b called\n; }; spl_autoload_register($a); spl_autoload_register($b); $c = $a; spl_autoload_register($c); $c = new foo; ? ===DONE=== --EXPECT-- a called b called foo ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/spl php_spl.c /ext/spl/tests spl_autoload_bug48541.phpt
cellog Sat Jun 13 17:30:50 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/spl/tests spl_autoload_bug48541.phpt Modified files: /php-srcNEWS /php-src/ext/splphp_spl.c Log: fix Bug #48541: spl_autoload_register only registers first closure, then leaks the others. Fix missing erealloc in fix for bug #40091 (PHP_5_3 only) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.625r2=1.2027.2.547.2.965.2.626diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.625 php-src/NEWS:1.2027.2.547.2.965.2.626 --- php-src/NEWS:1.2027.2.547.2.965.2.625 Sat Jun 13 16:43:04 2009 +++ php-src/NEWSSat Jun 13 17:30:49 2009 @@ -3,8 +3,12 @@ ?? ??? 2009, PHP 5.3.0 RC 4 - Added phar.phar generation for Windows. (Greg) +- Fixed bug #48541 (spl_autoload_register only registers first closure, then + leaks the others). (Greg) - Fixed bug #48533 (__callStatic is not invoked for private/protected methods). (Felipe) +- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. + (Greg) 11 Jun 2009, PHP 5.3.0 RC 3 - Upgraded bundled sqlite to version 3.6.14.2. (Scott, Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.17.2.37r2=1.52.2.28.2.17.2.38diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.37 php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.38 --- php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.37 Tue Jun 9 01:58:07 2009 +++ php-src/ext/spl/php_spl.c Sat Jun 13 17:30:50 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.28.2.17.2.37 2009/06/09 01:58:07 scottmac Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28.2.17.2.38 2009/06/13 17:30:50 cellog Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -497,10 +497,6 @@ alfi.ce = fcc.calling_scope; alfi.func_ptr = fcc.function_handler; obj_ptr = fcc.object_ptr; - if (Z_TYPE_P(zcallable) == IS_OBJECT) { - alfi.closure = zcallable; - Z_ADDREF_P(zcallable); - } if (error) { efree(error); } @@ -509,12 +505,27 @@ zend_str_tolower_copy(lc_name, func_name, func_name_len); efree(func_name); + if (Z_TYPE_P(zcallable) == IS_OBJECT) { + alfi.closure = zcallable; + Z_ADDREF_P(zcallable); + + lc_name = erealloc(lc_name, func_name_len + 2 + sizeof(zcallable-value.obj.handle)); + memcpy(lc_name + func_name_len, (zcallable-value.obj.handle), + sizeof(zcallable-value.obj.handle)); + func_name_len += sizeof(zcallable-value.obj.handle); + lc_name[func_name_len] = '\0'; + } + if (SPL_G(autoload_functions) zend_hash_exists(SPL_G(autoload_functions), (char*)lc_name, func_name_len+1)) { + if (alfi.closure) { + Z_DELREF_P(zcallable); + } goto skip; } if (obj_ptr !(alfi.func_ptr-common.fn_flags ZEND_ACC_STATIC)) { /* add object id to the hash to ensure uniqueness, for more reference look at bug #40091 */ + lc_name = erealloc(lc_name, func_name_len + 2 + sizeof(zend_object_handle)); memcpy(lc_name + func_name_len, Z_OBJ_HANDLE_P(obj_ptr), sizeof(zend_object_handle)); func_name_len += sizeof(zend_object_handle); lc_name[func_name_len] = '\0'; http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_bug48541.phpt?view=markuprev=1.1 Index: php-src/ext/spl/tests/spl_autoload_bug48541.phpt +++ php-src/ext/spl/tests/spl_autoload_bug48541.phpt --TEST-- SPL: spl_autoload_register() Bug #48541: registering multiple closures fails with memleaks --FILE-- ?php $a = function ($class) { echo a called\n; }; $b = function ($class) { eval('class ' . $class . '{function __construct(){echo foo\n;}}'); echo b called\n; }; spl_autoload_register($a); spl_autoload_register($b); $c = $a; spl_autoload_register($c); $c = new foo; ? ===DONE=== --EXPECT-- a called b called foo ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
cellog Sat Jun 13 17:34:22 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: remove missing erealloc entry that will go in php 5.2 NEWS http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.626r2=1.2027.2.547.2.965.2.627diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.626 php-src/NEWS:1.2027.2.547.2.965.2.627 --- php-src/NEWS:1.2027.2.547.2.965.2.626 Sat Jun 13 17:30:49 2009 +++ php-src/NEWSSat Jun 13 17:34:21 2009 @@ -7,8 +7,6 @@ leaks the others). (Greg) - Fixed bug #48533 (__callStatic is not invoked for private/protected methods). (Felipe) -- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. - (Greg) 11 Jun 2009, PHP 5.3.0 RC 3 - Upgraded bundled sqlite to version 3.6.14.2. (Scott, Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/spl php_spl.c
cellog Sat Jun 13 17:35:38 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/splphp_spl.c Log: fix missing erealloc in fix for bug #40091, spl_autoload_register of more than 1 copy of the same method in different objects http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1555r2=1.2027.2.547.2.1556diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1555 php-src/NEWS:1.2027.2.547.2.1556 --- php-src/NEWS:1.2027.2.547.2.1555Fri Jun 12 20:50:58 2009 +++ php-src/NEWSSat Jun 13 17:35:37 2009 @@ -3,6 +3,8 @@ ?? Jun 2009, PHP 5.2.10 - Fixed bug #48514 (cURL extension uses same resource name for simple and multi APIs). (Felipe) +- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. + (Greg) 11 Jun 2009, PHP 5.2.10RC2 - Updated timezone database to version 2009.9 (2009i) (Derick) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.20r2=1.52.2.28.2.21diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.20 php-src/ext/spl/php_spl.c:1.52.2.28.2.21 --- php-src/ext/spl/php_spl.c:1.52.2.28.2.20Wed Dec 31 11:17:43 2008 +++ php-src/ext/spl/php_spl.c Sat Jun 13 17:35:37 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.28.2.20 2008/12/31 11:17:43 sebastian Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28.2.21 2009/06/13 17:35:37 cellog Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -464,6 +464,7 @@ if (obj_ptr !(alfi.func_ptr-common.fn_flags ZEND_ACC_STATIC)) { /* add object id to the hash to ensure uniqueness, for more reference look at bug #40091 */ + lc_name = erealloc(lc_name, func_name_len + 2 + sizeof(zend_object_handle)); memcpy(lc_name + func_name_len, Z_OBJ_HANDLE_PP(obj_ptr), sizeof(zend_object_handle)); func_name_len += sizeof(zend_object_handle); lc_name[func_name_len] = '\0'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
cellog Thu Jun 11 14:40:43 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: update NEWS about phar.phar on windows http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.622r2=1.2027.2.547.2.965.2.623diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.622 php-src/NEWS:1.2027.2.547.2.965.2.623 --- php-src/NEWS:1.2027.2.547.2.965.2.622 Wed Jun 10 18:39:15 2009 +++ php-src/NEWSThu Jun 11 14:40:43 2009 @@ -1,7 +1,7 @@ PHPNEWS ||| ?? ??? 2009, PHP 5.3.0 RC 4 - +- Added phar.phar generation for Windows. (Greg) 11 Jun 2009, PHP 5.3.0 RC 3 - Upgraded bundled sqlite to version 3.6.14.2. (Scott, Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /win32/build Makefile mkdist.php
cellog Thu Jun 11 14:43:03 2009 UTC Modified files: /php-src/win32/buildMakefile mkdist.php Log: MFB: add phar.phar generation to windows http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.54r2=1.55diff_format=u Index: php-src/win32/build/Makefile diff -u php-src/win32/build/Makefile:1.54 php-src/win32/build/Makefile:1.55 --- php-src/win32/build/Makefile:1.54 Wed May 27 01:46:27 2009 +++ php-src/win32/build/MakefileThu Jun 11 14:43:03 2009 @@ -14,7 +14,7 @@ # | Author: Wez Furlong w...@thebrainroom.com | # +--+ # -# $Id: Makefile,v 1.54 2009/05/27 01:46:27 kalle Exp $ +# $Id: Makefile,v 1.55 2009/06/11 14:43:03 cellog Exp $ # This is the makefile template for the win32 build CC=$(CL) @@ -128,7 +128,7 @@ -del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip -del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip -del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip - $(BUILD_DIR)\php.exe -d date.timezone=UTC -n win32/build/mkdist.php $(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES) $(SNAPSHOT_TEMPLATE) + $(BUILD_DIR)\php.exe -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php $(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES) $(SNAPSHOT_TEMPLATE) cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING) -$(ZIP) -9 -q -r ..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip . cd ..\.. http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.24r2=1.25diff_format=u Index: php-src/win32/build/mkdist.php diff -u php-src/win32/build/mkdist.php:1.24 php-src/win32/build/mkdist.php:1.25 --- php-src/win32/build/mkdist.php:1.24 Wed Jun 3 01:13:37 2009 +++ php-src/win32/build/mkdist.php Thu Jun 11 14:43:03 2009 @@ -1,4 +1,4 @@ -?php # $Id: mkdist.php,v 1.24 2009/06/03 01:13:37 kalle Exp $ +?php # $Id: mkdist.php,v 1.25 2009/06/11 14:43:03 cellog Exp $ /* piece together a windows binary distro */ $build_dir = $argv[1]; @@ -394,6 +394,27 @@ closedir($directory_list); } +function make_phar_dot_phar($dist_dir) +{ + if (!extension_loaded('phar')) return; + $path_to_php = $dist_dir; + $path_to_phar = realpath(__DIR__ . '/../../ext/phar'); + echo Generating pharcommand.phar\n; + $phar = new Phar($path_to_php . '/pharcommand.phar', 0, 'pharcommand'); + foreach (new DirectoryIterator($path_to_phar . '/phar') as $file) { +if ($file-isDir() || $file == 'phar.php') continue; +echo 'adding ', $file, \n; +$phar[(string) $file] = file_get_contents($path_to_phar. '/phar/' . $file); + } + $phar-setSignatureAlgorithm(Phar::SHA1); + $stub = file($path_to_phar . '/phar/phar.php'); + unset($stub[0]); // remove hashbang + $phar-setStub(implode('', $stub)); + + echo Creating phar.phar.bat\n; + file_put_contents($path_to_php . '/phar.phar.bat', %~dp0php.exe %~dp0pharcommand.phar %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n); +} + if (!is_dir($test_dir)) { mkdir($test_dir); } @@ -491,4 +512,5 @@ echo WARNING: you don't have a snapshot template, your dist will not be complete\n; } +make_phar_dot_phar($dist_dir); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /win32/build Makefile mkdist.php
cellog Thu Jun 11 14:39:37 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/win32/buildMakefile mkdist.php Log: add phar.phar creation on windows http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.35.2.1.2.6.2.12r2=1.35.2.1.2.6.2.13diff_format=u Index: php-src/win32/build/Makefile diff -u php-src/win32/build/Makefile:1.35.2.1.2.6.2.12 php-src/win32/build/Makefile:1.35.2.1.2.6.2.13 --- php-src/win32/build/Makefile:1.35.2.1.2.6.2.12 Wed May 27 01:46:48 2009 +++ php-src/win32/build/MakefileThu Jun 11 14:39:37 2009 @@ -14,7 +14,7 @@ # | Author: Wez Furlong w...@thebrainroom.com | # +--+ # -# $Id: Makefile,v 1.35.2.1.2.6.2.12 2009/05/27 01:46:48 kalle Exp $ +# $Id: Makefile,v 1.35.2.1.2.6.2.13 2009/06/11 14:39:37 cellog Exp $ # This is the makefile template for the win32 build CC=$(CL) @@ -128,7 +128,7 @@ -del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip -del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip -del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip - $(BUILD_DIR)\php.exe -d date.timezone=UTC -n win32/build/mkdist.php $(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES) $(SNAPSHOT_TEMPLATE) + $(BUILD_DIR)\php.exe -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php $(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES) $(SNAPSHOT_TEMPLATE) cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING) -$(ZIP) -9 -q -r ..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip . cd ..\.. http://cvs.php.net/viewvc.cgi/php-src/win32/build/mkdist.php?r1=1.13.4.1.2.11r2=1.13.4.1.2.12diff_format=u Index: php-src/win32/build/mkdist.php diff -u php-src/win32/build/mkdist.php:1.13.4.1.2.11 php-src/win32/build/mkdist.php:1.13.4.1.2.12 --- php-src/win32/build/mkdist.php:1.13.4.1.2.11Wed Jun 3 01:14:58 2009 +++ php-src/win32/build/mkdist.php Thu Jun 11 14:39:37 2009 @@ -1,4 +1,4 @@ -?php # $Id: mkdist.php,v 1.13.4.1.2.11 2009/06/03 01:14:58 kalle Exp $ +?php # $Id: mkdist.php,v 1.13.4.1.2.12 2009/06/11 14:39:37 cellog Exp $ /* piece together a windows binary distro */ $build_dir = $argv[1]; @@ -393,6 +393,27 @@ closedir($directory_list); } +function make_phar_dot_phar($dist_dir) +{ + if (!extension_loaded('phar')) return; + $path_to_php = $dist_dir; + $path_to_phar = realpath(__DIR__ . '/../../ext/phar'); + echo Generating pharcommand.phar\n; + $phar = new Phar($path_to_php . '/pharcommand.phar', 0, 'pharcommand'); + foreach (new DirectoryIterator($path_to_phar . '/phar') as $file) { +if ($file-isDir() || $file == 'phar.php') continue; +echo 'adding ', $file, \n; +$phar[(string) $file] = file_get_contents($path_to_phar. '/phar/' . $file); + } + $phar-setSignatureAlgorithm(Phar::SHA1); + $stub = file($path_to_phar . '/phar/phar.php'); + unset($stub[0]); // remove hashbang + $phar-setStub(implode('', $stub)); + + echo Creating phar.phar.bat\n; + file_put_contents($path_to_php . '/phar.phar.bat', %~dp0php.exe %~dp0pharcommand.phar %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n); +} + if (!is_dir($test_dir)) { mkdir($test_dir); } @@ -489,4 +510,5 @@ echo WARNING: you don't have a snapshot template, your dist will not be complete\n; } +make_phar_dot_phar($dist_dir); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar tar.c /ext/phar/tests/tar bignames_overflow.phpt /ext/phar/tests/tar/files make.dangerous.tar.php.inc
cellog Thu Jun 4 19:59:09 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/phar/tests/tar bignames_overflow.phpt /php-src/ext/phar/tests/tar/files make.dangerous.tar.php.inc Modified files: /php-srcNEWS /php-src/ext/phar tar.c Log: MFPECL: fix security vulnerability in phar's handling of long tar filenames http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.614r2=1.2027.2.547.2.965.2.615diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.614 php-src/NEWS:1.2027.2.547.2.965.2.615 --- php-src/NEWS:1.2027.2.547.2.965.2.614 Thu Jun 4 07:01:47 2009 +++ php-src/NEWSThu Jun 4 19:59:09 2009 @@ -23,8 +23,9 @@ PDO_PGSQL). (Matteo) - Fixed bug #38802 (max_redirects and ignore_errors). (patch by datib...@php.net) +- Fixed security vulnerability in phar's handling of long tar filenames. (Greg) - Fixed potential segfault with converting phars containing metadata to other - formats (Greg). + formats. (Greg) 07 May 2009, PHP 5.3.0 RC 2 http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.55.2.28r2=1.55.2.29diff_format=u Index: php-src/ext/phar/tar.c diff -u php-src/ext/phar/tar.c:1.55.2.28 php-src/ext/phar/tar.c:1.55.2.29 --- php-src/ext/phar/tar.c:1.55.2.28Wed May 13 20:25:43 2009 +++ php-src/ext/phar/tar.c Thu Jun 4 19:59:09 2009 @@ -330,16 +330,19 @@ if (!old hdr-prefix[0] != 0) { char name[256]; + int i, j; - strcpy(name, hdr-prefix); - /* remove potential buffer overflow */ - if (hdr-name[99]) { - strncat(name, hdr-name, 100); - } else { - strcat(name, hdr-name); + for (i = 0; i 155; i++) { + name[i] = hdr-prefix[i]; + if (name[i] == '\0') { + break; + } + } + for (j = 0; j 100; j++) { + name[i+j] = hdr-name[j]; } - entry.filename_len = strlen(hdr-prefix) + 100; + entry.filename_len = i+j; if (name[entry.filename_len - 1] == '/') { /* some tar programs store directories with trailing slash */ @@ -347,8 +350,16 @@ } entry.filename = pestrndup(name, entry.filename_len, myphar-is_persistent); } else { - entry.filename = pestrdup(hdr-name, myphar-is_persistent); - entry.filename_len = strlen(entry.filename); + int i; + + /* calculate strlen, which can be no longer than 100 */ + for (i = 0; i 100; i++) { + if (hdr-name[i] == '\0') { + break; + } + } + entry.filename_len = i; + entry.filename = pestrndup(hdr-name, i, myphar-is_persistent); if (entry.filename[entry.filename_len - 1] == '/') { /* some tar programs store directories with trailing slash */ http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/bignames_overflow.phpt?view=markuprev=1.1 Index: php-src/ext/phar/tests/tar/bignames_overflow.phpt +++ php-src/ext/phar/tests/tar/bignames_overflow.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc?view=markuprev=1.1 Index: php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc +++ php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar tar.c /ext/phar/tests/tar bignames_overflow.phpt /ext/phar/tests/tar/files make.dangerous.tar.php.inc
cellog Thu Jun 4 20:00:01 2009 UTC Modified files: /php-src/ext/phar tar.c /php-src/ext/phar/tests/tar bignames_overflow.phpt /php-src/ext/phar/tests/tar/files make.dangerous.tar.php.inc Log: MFPECL: fix security vulnerability in phar's handling of long tar filenames http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.68r2=1.69diff_format=u Index: php-src/ext/phar/tar.c diff -u php-src/ext/phar/tar.c:1.68 php-src/ext/phar/tar.c:1.69 --- php-src/ext/phar/tar.c:1.68 Wed May 13 20:26:18 2009 +++ php-src/ext/phar/tar.c Thu Jun 4 20:00:01 2009 @@ -330,16 +330,19 @@ if (!old hdr-prefix[0] != 0) { char name[256]; + int i, j; - strcpy(name, hdr-prefix); - /* remove potential buffer overflow */ - if (hdr-name[99]) { - strncat(name, hdr-name, 100); - } else { - strcat(name, hdr-name); + for (i = 0; i 155; i++) { + name[i] = hdr-prefix[i]; + if (name[i] == '\0') { + break; + } + } + for (j = 0; j 100; j++) { + name[i+j] = hdr-name[j]; } - entry.filename_len = strlen(hdr-prefix) + 100; + entry.filename_len = i+j; if (name[entry.filename_len - 1] == '/') { /* some tar programs store directories with trailing slash */ @@ -347,8 +350,16 @@ } entry.filename = pestrndup(name, entry.filename_len, myphar-is_persistent); } else { - entry.filename = pestrdup(hdr-name, myphar-is_persistent); - entry.filename_len = strlen(entry.filename); + int i; + + /* calculate strlen, which can be no longer than 100 */ + for (i = 0; i 100; i++) { + if (hdr-name[i] == '\0') { + break; + } + } + entry.filename_len = i; + entry.filename = pestrndup(hdr-name, i, myphar-is_persistent); if (entry.filename[entry.filename_len - 1] == '/') { /* some tar programs store directories with trailing slash */ http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/bignames_overflow.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/phar/tests/tar/bignames_overflow.phpt diff -u /dev/null php-src/ext/phar/tests/tar/bignames_overflow.phpt:1.2 --- /dev/null Thu Jun 4 20:00:01 2009 +++ php-src/ext/phar/tests/tar/bignames_overflow.phpt Thu Jun 4 20:00:01 2009 @@ -0,0 +1,40 @@ +--TEST-- +Phar: tar with huge filenames, buffer overflow +--SKIPIF-- +?php if (!extension_loaded(phar)) die(skip); ? +--INI-- +phar.require_hash=0 +--FILE-- +?php +$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; +$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar'; +$pname = 'phar://' . $fname; + +include dirname(__FILE__) . '/files/make.dangerous.tar.php.inc'; + +$tar = new danger_tarmaker($fname, 'none'); +$tar-init(); +$tar-addFile(str_repeat('a', 101), 'hi'); +$tar-addFile(str_repeat('a', 255), 'hi2'); +$tar-close(); + +$p1 = new PharData($fname); +foreach ($p1 as $file) { + echo $file-getFileName(), \n; +} +echo $p1[str_repeat('a', 101)]-getContent() . \n; +echo $p1[str_repeat('a', 255)]-getContent() . \n; + +? +===DONE=== +--CLEAN-- +?php +unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); +? +--EXPECT-- +a +aaa +hi +hi2 +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc?r1=1.1r2=1.2diff_format=u Index: php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc diff -u /dev/null php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc:1.2 --- /dev/null Thu Jun 4 20:00:01 2009 +++ php-src/ext/phar/tests/tar/files/make.dangerous.tar.php.inc Thu Jun 4 20:00:01 2009 @@ -0,0 +1,170 @@ +?php +// stolen from PEAR2_Pyrus_Developer_Creator_Tar by Greg Beaver, the original author, for use in unit tests
[PHP-CVS] cvs: php-src /ext/phar phar_object.c /ext/phar/tests phar_oo_011.phpt
cellog Fri Jun 5 04:44:55 2009 UTC Modified files: /php-src/ext/phar phar_object.c /php-src/ext/phar/tests phar_oo_011.phpt Log: fixed isset() on sub-directories (isset('blah') if file 'blah/foo.php' exists) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.298r2=1.299diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.298 php-src/ext/phar/phar_object.c:1.299 --- php-src/ext/phar/phar_object.c:1.298Sun May 24 18:50:37 2009 +++ php-src/ext/phar/phar_object.c Fri Jun 5 04:44:55 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.298 2009/05/24 18:50:37 cellog Exp $ */ +/* $Id: phar_object.c,v 1.299 2009/06/05 04:44:55 cellog Exp $ */ #include phar_internal.h #include func_interceptors.h @@ -3526,6 +3526,9 @@ } RETURN_TRUE; } else { + if (zend_hash_exists(phar_obj-arc.archive-virtual_dirs, fname, (uint) fname_len)) { + RETURN_TRUE; + } RETURN_FALSE; } } http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_011.phpt?r1=1.8r2=1.9diff_format=u Index: php-src/ext/phar/tests/phar_oo_011.phpt diff -u php-src/ext/phar/tests/phar_oo_011.phpt:1.8 php-src/ext/phar/tests/phar_oo_011.phpt:1.9 --- php-src/ext/phar/tests/phar_oo_011.phpt:1.8 Wed Feb 20 13:32:59 2008 +++ php-src/ext/phar/tests/phar_oo_011.phpt Fri Jun 5 04:44:55 2009 @@ -16,9 +16,10 @@ $phar = new Phar($fname); $phar-setInfoClass('SplFileObject'); -$phar['f.php'] = 'hi'; -var_dump(isset($phar['f.php'])); -echo $phar['f.php']; +$phar['hi/f.php'] = 'hi'; +var_dump(isset($phar['hi'])); +var_dump(isset($phar['hi/f.php'])); +echo $phar['hi/f.php']; echo \n; ? @@ -30,5 +31,6 @@ ? --EXPECT-- bool(true) +bool(true) hi ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar phar_object.c /ext/phar/tests phar_oo_011.phpt
cellog Fri Jun 5 04:46:49 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/phar phar_object.c /php-src/ext/phar/tests phar_oo_011.phpt Log: MFH: fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.615r2=1.2027.2.547.2.965.2.616diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.615 php-src/NEWS:1.2027.2.547.2.965.2.616 --- php-src/NEWS:1.2027.2.547.2.965.2.615 Thu Jun 4 19:59:09 2009 +++ php-src/NEWSFri Jun 5 04:46:49 2009 @@ -23,6 +23,8 @@ PDO_PGSQL). (Matteo) - Fixed bug #38802 (max_redirects and ignore_errors). (patch by datib...@php.net) +- Fixed isset() on sub-directories (isset(blah) if file blah/foo.php exists). + (Greg) - Fixed security vulnerability in phar's handling of long tar filenames. (Greg) - Fixed potential segfault with converting phars containing metadata to other formats. (Greg) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.62r2=1.266.2.63diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.266.2.62 php-src/ext/phar/phar_object.c:1.266.2.63 --- php-src/ext/phar/phar_object.c:1.266.2.62 Sun May 24 18:50:58 2009 +++ php-src/ext/phar/phar_object.c Fri Jun 5 04:46:49 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.266.2.62 2009/05/24 18:50:58 cellog Exp $ */ +/* $Id: phar_object.c,v 1.266.2.63 2009/06/05 04:46:49 cellog Exp $ */ #include phar_internal.h #include func_interceptors.h @@ -3526,6 +3526,9 @@ } RETURN_TRUE; } else { + if (zend_hash_exists(phar_obj-arc.archive-virtual_dirs, fname, (uint) fname_len)) { + RETURN_TRUE; + } RETURN_FALSE; } } http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_011.phpt?r1=1.8r2=1.8.2.1diff_format=u Index: php-src/ext/phar/tests/phar_oo_011.phpt diff -u php-src/ext/phar/tests/phar_oo_011.phpt:1.8 php-src/ext/phar/tests/phar_oo_011.phpt:1.8.2.1 --- php-src/ext/phar/tests/phar_oo_011.phpt:1.8 Wed Feb 20 13:32:59 2008 +++ php-src/ext/phar/tests/phar_oo_011.phpt Fri Jun 5 04:46:49 2009 @@ -16,9 +16,10 @@ $phar = new Phar($fname); $phar-setInfoClass('SplFileObject'); -$phar['f.php'] = 'hi'; -var_dump(isset($phar['f.php'])); -echo $phar['f.php']; +$phar['hi/f.php'] = 'hi'; +var_dump(isset($phar['hi'])); +var_dump(isset($phar['hi/f.php'])); +echo $phar['hi/f.php']; echo \n; ? @@ -30,5 +31,6 @@ ? --EXPECT-- bool(true) +bool(true) hi ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c
cellog Thu May 14 13:36:56 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard http_fopen_wrapper.c Log: MFH: fix potential free of NULL http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.9.2.15r2=1.99.2.12.2.9.2.16diff_format=u Index: php-src/ext/standard/http_fopen_wrapper.c diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.15 php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.16 --- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.15Tue May 5 00:31:56 2009 +++ php-src/ext/standard/http_fopen_wrapper.c Thu May 14 13:36:56 2009 @@ -19,7 +19,7 @@ | Sara Golemon poll...@php.net | +--+ */ -/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.9.2.15 2009/05/05 00:31:56 jani Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.9.2.16 2009/05/14 13:36:56 cellog Exp $ */ #include php.h #include php_globals.h @@ -407,7 +407,9 @@ have_header |= HTTP_HEADER_TYPE; } } - efree(tmp); + if (tmp) { + efree(tmp); + } } /* auth header if it was specified */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c
Jani Taskinen wrote: In the future, please MFH to PHP_5_2 such fixes. --Jani Hi Jani, 5_2 doesn't have this problem, otherwise I would have :) Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c
Jani Taskinen wrote: Greg Beaver kirjoitti: Jani Taskinen wrote: In the future, please MFH to PHP_5_2 such fixes. --Jani Hi Jani, 5_2 doesn't have this problem, otherwise I would have :) Considering the fact that the code in this file does not differ at all between branches (for that part), of course it does have the problem. I already merged it. Hi, Sorry, the problem was that my 5.2 had not been cvs up-ed and so I thought it was different. Apologies. Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar phar.c phar_internal.h tar.c /ext/phar/tests/tar require_hash.phpt tar_nohash.phpt /ext/phar/tests/tar/files Net_URL-1.0.15.tgz
cellog Wed May 13 20:25:44 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/phar/tests/tar tar_nohash.phpt /php-src/ext/phar/tests/tar/files Net_URL-1.0.15.tgz Modified files: /php-srcNEWS /php-src/ext/phar phar.c phar_internal.h tar.c /php-src/ext/phar/tests/tar require_hash.phpt Log: fix Bug #48257: PharData throws exception with non-phar tar http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.599r2=1.2027.2.547.2.965.2.600diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.599 php-src/NEWS:1.2027.2.547.2.965.2.600 --- php-src/NEWS:1.2027.2.547.2.965.2.599 Tue May 12 22:18:14 2009 +++ php-src/NEWSWed May 13 20:25:43 2009 @@ -6,6 +6,7 @@ - Disabled SQLite3::loadExtension for threaded SAPIs. (Scott) +- Fixed bug #48257 (PharData throws exception with non-phar tar). (Greg) - Fixed bug #48227 (NumberFormatter::format leaks memory). (Felipe) - Fixed bug #48200 (compile failure with mbstring.c when --enable-zend-multibyte is used). (Jani) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.61r2=1.370.2.62diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.370.2.61 php-src/ext/phar/phar.c:1.370.2.62 --- php-src/ext/phar/phar.c:1.370.2.61 Fri May 1 09:22:16 2009 +++ php-src/ext/phar/phar.c Wed May 13 20:25:43 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.370.2.61 2009/05/01 09:22:16 tony2001 Exp $ */ +/* $Id: phar.c,v 1.370.2.62 2009/05/13 20:25:43 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -1345,7 +1345,7 @@ } if (fp) { - if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, error TSRMLS_CC) == SUCCESS) { + if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, is_data, error TSRMLS_CC) == SUCCESS) { if ((*pphar)-is_data || !PHAR_G(readonly)) { (*pphar)-is_writeable = 1; } @@ -1519,7 +1519,7 @@ fname_len = strlen(actual); } - ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, error TSRMLS_CC); + ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, is_data, error TSRMLS_CC); if (actual) { efree(actual); @@ -1563,7 +1563,7 @@ * that the manifest is proper, then pass it to phar_parse_pharfile(). SUCCESS * or FAILURE is returned and pphar is set to a pointer to the phar's manifest */ -static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ +static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, int is_data, char **error TSRMLS_DC) /* {{{ */ { const char token[] = __HALT_COMPILER();; const char zip_magic[] = PK\x03\x04; @@ -1706,7 +1706,7 @@ if (got 512) { if (phar_is_tar(pos, fname)) { php_stream_rewind(fp); - return phar_parse_tarfile(fp, fname, fname_len, alias, alias_len, pphar, compression, error TSRMLS_CC); + return phar_parse_tarfile(fp, fname, fname_len, alias, alias_len, pphar, is_data, compression, error TSRMLS_CC); } } } @@ -2380,7 +2380,7 @@ fname_len = strlen(actual); } - ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, error TSRMLS_CC); + ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, 0, error TSRMLS_CC); if (actual) { efree(actual); @@ -3635,7 +3635,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.61 $); + php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.62 $); 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_internal.h?r1=1.109.2.30r2=1.109.2.31diff_format=u Index: php-src/ext/phar/phar_internal.h diff -u php-src/ext/phar/phar_internal.h:1.109.2.30 php-src/ext/phar/phar_internal.h:1.109.2.31 ---
[PHP-CVS] cvs: php-src /ext/phar phar.c phar_internal.h tar.c /ext/phar/tests/tar require_hash.phpt /ext/phar/tests/tar/files Net_URL-1.0.15.tgz
cellog Wed May 13 20:26:18 2009 UTC Modified files: /php-src/ext/phar phar.c phar_internal.h tar.c /php-src/ext/phar/tests/tar require_hash.phpt /php-src/ext/phar/tests/tar/files Net_URL-1.0.15.tgz Log: MFB: fix Bug #48257: PharData throws exception with non-phar tar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.399r2=1.400diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.399 php-src/ext/phar/phar.c:1.400 --- php-src/ext/phar/phar.c:1.399 Fri May 1 09:22:02 2009 +++ php-src/ext/phar/phar.c Wed May 13 20:26:18 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.399 2009/05/01 09:22:02 tony2001 Exp $ */ +/* $Id: phar.c,v 1.400 2009/05/13 20:26:18 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -1345,7 +1345,7 @@ } if (fp) { - if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, error TSRMLS_CC) == SUCCESS) { + if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, is_data, error TSRMLS_CC) == SUCCESS) { if ((*pphar)-is_data || !PHAR_G(readonly)) { (*pphar)-is_writeable = 1; } @@ -1519,7 +1519,7 @@ fname_len = strlen(actual); } - ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, error TSRMLS_CC); + ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, options, pphar, is_data, error TSRMLS_CC); if (actual) { efree(actual); @@ -1563,7 +1563,7 @@ * that the manifest is proper, then pass it to phar_parse_pharfile(). SUCCESS * or FAILURE is returned and pphar is set to a pointer to the phar's manifest */ -static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */ +static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, int is_data, char **error TSRMLS_DC) /* {{{ */ { const char token[] = __HALT_COMPILER();; const char zip_magic[] = PK\x03\x04; @@ -1706,7 +1706,7 @@ if (got 512) { if (phar_is_tar(pos, fname)) { php_stream_rewind(fp); - return phar_parse_tarfile(fp, fname, fname_len, alias, alias_len, pphar, compression, error TSRMLS_CC); + return phar_parse_tarfile(fp, fname, fname_len, alias, alias_len, pphar, is_data, compression, error TSRMLS_CC); } } } @@ -2380,7 +2380,7 @@ fname_len = strlen(actual); } - ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, error TSRMLS_CC); + ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, 0, error TSRMLS_CC); if (actual) { efree(actual); @@ -3635,7 +3635,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.399 $); + php_info_print_table_row(2, CVS revision, $Revision: 1.400 $); 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_internal.h?r1=1.122r2=1.123diff_format=u Index: php-src/ext/phar/phar_internal.h diff -u php-src/ext/phar/phar_internal.h:1.122 php-src/ext/phar/phar_internal.h:1.123 --- php-src/ext/phar/phar_internal.h:1.122 Wed Apr 29 03:24:08 2009 +++ php-src/ext/phar/phar_internal.hWed May 13 20:26:18 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_internal.h,v 1.122 2009/04/29 03:24:08 cellog Exp $ */ +/* $Id: phar_internal.h,v 1.123 2009/05/13 20:26:18 cellog Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -633,7 +633,7 @@ /* tar functions in tar.c */ int phar_is_tar(char *buf, char *fname); -int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, php_uint32 compression, char **error TSRMLS_DC); +int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 compression, char **error TSRMLS_DC);
[PHP-CVS] Re: cvs: php-src(PHP_5_3) / UPGRADING
Kalle Sommer Nielsen wrote: kalle Thu May 7 03:14:07 2009 UTC Modified files: (Branch: PHP_5_3) /php-src UPGRADING Log: * use is a reserved keyword Hi, FYI, use has been a reserved keyword since the initial commit of zend_language_parser.y in October of 2000 :) (see http://cvs.php.net/viewvc.cgi/Zend/zend_language_parser.y?revision=1.1view=markup) Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar_object.c
cellog Tue May 5 01:41:52 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar phar_object.c Log: remove precautionary #ifdef - the problem was fixed by moving the efree inside the zend_try block http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.60r2=1.266.2.61diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.266.2.60 php-src/ext/phar/phar_object.c:1.266.2.61 --- php-src/ext/phar/phar_object.c:1.266.2.60 Mon May 4 04:29:25 2009 +++ php-src/ext/phar/phar_object.c Tue May 5 01:41:51 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.266.2.60 2009/05/04 04:29:25 cellog Exp $ */ +/* $Id: phar_object.c,v 1.266.2.61 2009/05/05 01:41:51 cellog Exp $ */ #include phar_internal.h #include func_interceptors.h @@ -310,11 +310,9 @@ efree(new_op_array); -#if PHP_VERSION_ID 50300 if (EG(return_value_ptr_ptr) *EG(return_value_ptr_ptr)) { zval_ptr_dtor(EG(return_value_ptr_ptr)); } -#endif } zend_catch { if (PHAR_G(cwd)) { efree(PHAR_G(cwd)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar_object.c
cellog Mon May 4 04:29:26 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar phar_object.c Log: disable cause of mysterious segfault in PHP 5.3 only (5.2 is fine) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.59r2=1.266.2.60diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.266.2.59 php-src/ext/phar/phar_object.c:1.266.2.60 --- php-src/ext/phar/phar_object.c:1.266.2.59 Wed Apr 29 03:24:26 2009 +++ php-src/ext/phar/phar_object.c Mon May 4 04:29:25 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.266.2.59 2009/04/29 03:24:26 cellog Exp $ */ +/* $Id: phar_object.c,v 1.266.2.60 2009/05/04 04:29:25 cellog Exp $ */ #include phar_internal.h #include func_interceptors.h @@ -310,9 +310,11 @@ efree(new_op_array); +#if PHP_VERSION_ID 50300 if (EG(return_value_ptr_ptr) *EG(return_value_ptr_ptr)) { zval_ptr_dtor(EG(return_value_ptr_ptr)); } +#endif } zend_catch { if (PHAR_G(cwd)) { efree(PHAR_G(cwd)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar phar_object.c
cellog Mon May 4 04:30:50 2009 UTC Modified files: /php-src/ext/phar phar_object.c Log: MFB: disable mysterious segfault on PHP 5.3 (5.2 not affected) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.295r2=1.296diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.295 php-src/ext/phar/phar_object.c:1.296 --- php-src/ext/phar/phar_object.c:1.295Wed Apr 29 03:24:09 2009 +++ php-src/ext/phar/phar_object.c Mon May 4 04:30:50 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.295 2009/04/29 03:24:09 cellog Exp $ */ +/* $Id: phar_object.c,v 1.296 2009/05/04 04:30:50 cellog Exp $ */ #include phar_internal.h #include func_interceptors.h @@ -310,9 +310,11 @@ efree(new_op_array); +#if PHP_VERSION_ID 50300 if (EG(return_value_ptr_ptr) *EG(return_value_ptr_ptr)) { zval_ptr_dtor(EG(return_value_ptr_ptr)); } +#endif } zend_catch { if (PHAR_G(cwd)) { efree(PHAR_G(cwd)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c
Antony Dovgal wrote: On 29.04.2009 07:24, Greg Beaver wrote: cellog Wed Apr 29 03:24:27 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pharphar.c phar_internal.h phar_object.c tar.c util.c zip.c Log: MFPECL: fix PECL bug #16338, php_stream_copy_to_stream{,_ex}() ext/phar/tests/fatal_error_webphar.mem ==29591== Invalid read of size 8 ==29591==at 0x693B8A: phar_file_action (phar_object.c:315) ==29591==by 0x6956D1: zim_Phar_webPhar (phar_object.c:878) ==29591==by 0x9203BE: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:313) ==29591==by 0x921103: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:422) ==29591==by 0x91F64E: execute (zend_vm_execute.h:104) ==29591==by 0x8F08C2: zend_execute_scripts (zend.c:1188) ==29591==by 0x87BD7B: php_execute_script (main.c:2166) ==29591==by 0x9D691F: main (cgi_main.c:2015) Oh good - you can reproduce it! The segfault is not related to the commit, as you can see from the line in question (line 315 of phar_file_action is a zval_ptr_dtor of EG(return_value_ptr_ptr), which has nothing to do with streams). I found this segfault on my system using apache 2.2 with the test script and added the fatal_error_webphar test to attempt to reproduce it, but the test in question passes using cgi on my system. Would you be able to forward bt + valgrind errors to Dmitry? This is a ZE2 problem that phar's cleanup triggers, and so I need to know how to rewrite the cleanup so it doesn't trigger the segfault (or ZE2 needs to be fixed, whichever is the real problem). Thanks Tony, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c
Antony Dovgal wrote: On 29.04.2009 17:50, Greg Beaver wrote: Oh good - you can reproduce it! The segfault is not related to the commit, as you can see from the line in question (line 315 of phar_file_action is a zval_ptr_dtor of EG(return_value_ptr_ptr), which has nothing to do with streams). Well, I don't remember seeing it before. Hi, This could be because the fatal_error_webphar.phpt test was committed only 1 day before the commit you did see? I found this segfault on my system using apache 2.2 with the test script and added the fatal_error_webphar test to attempt to reproduce it, but the test in question passes using cgi on my system. It segfaults with CGI here (but no with CLI?). It is a web-based test, which means it only runs with the CGI sapi. Would you be able to forward bt + valgrind errors to Dmitry? This is a ZE2 problem that phar's cleanup triggers, and so I need to know how to rewrite the cleanup so it doesn't trigger the segfault (or ZE2 needs to be fixed, whichever is the real problem). Ok, I'll ping him. thanks very much. I can get a backtrace using gdb, but no valgrind for the apache crash, although I haven't tried running the server via valgrind. Does anyone know if this is even possible to do with a forking server? Thanks, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar phar.c /ext/phar/tests phar_construct_invalidurl.phpt
cellog Thu Apr 30 04:40:31 2009 UTC Added files: /php-src/ext/phar/tests phar_construct_invalidurl.phpt Modified files: /php-src/ext/phar phar.c Log: MFPECL: fixed PECL Bug #14646: phar error message unclear with php stream wrappers http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.397r2=1.398diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.397 php-src/ext/phar/phar.c:1.398 --- php-src/ext/phar/phar.c:1.397 Wed Apr 29 03:24:08 2009 +++ php-src/ext/phar/phar.c Thu Apr 30 04:40:31 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.397 2009/04/29 03:24:08 cellog Exp $ */ +/* $Id: phar.c,v 1.398 2009/04/30 04:40:31 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -1262,7 +1262,11 @@ /* next try to create a new file */ if (FAILURE == phar_detect_phar_fname_ext(fname, fname_len, ext_str, ext_len, !is_data, 1, 1 TSRMLS_CC)) { if (error) { - spprintf(error, 0, Cannot create phar '%s', file extension (or combination) not recognised, fname); + if (ext_len == -2) { + spprintf(error, 0, Cannot create a phar archive from a URL like \%s\. Phar objects can only be created from local files, fname); + } else { + spprintf(error, 0, Cannot create phar '%s', file extension (or combination) not recognised, fname); + } } return FAILURE; } @@ -1903,6 +1907,12 @@ pos = memchr(filename, '/', filename_len); if (pos pos != filename) { + /* check for url like http:// or phar:// */ + if (*(pos - 1) == ':' (pos - filename) filename_len - 1 *(pos + 1) == '/') { + *ext_len = -2; + *ext_str = NULL; + return FAILURE; + } if (zend_hash_exists((PHAR_GLOBALS-phar_alias_map), (char *) filename, pos - filename)) { *ext_str = pos; *ext_len = -1; @@ -3624,7 +3634,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.397 $); + php_info_print_table_row(2, CVS revision, $Revision: 1.398 $); 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/tests/phar_construct_invalidurl.phpt?view=markuprev=1.1 Index: php-src/ext/phar/tests/phar_construct_invalidurl.phpt +++ php-src/ext/phar/tests/phar_construct_invalidurl.phpt --TEST-- Phar object passed URL --INI-- default_charset=UTF-8 --SKIPIF-- ?php if (!extension_loaded(phar)) die(skip); ? --FILE-- ?php try { $a = new Phar('http://should.fail.com'); } catch (UnexpectedValueException $e) { echo $e-getMessage(),\n; } try { $a = new Phar('http://'); } catch (UnexpectedValueException $e) { echo $e-getMessage(),\n; } try { $a = new Phar('http:/'); } catch (UnexpectedValueException $e) { echo $e-getMessage(),\n; } ? ===DONE=== --EXPECT-- Cannot create a phar archive from a URL like http://should.fail.com;. Phar objects can only be created from local files Cannot create a phar archive from a URL like http://;. Phar objects can only be created from local files Cannot create phar 'http:/', file extension (or combination) not recognised ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar phar.c /ext/phar/tests phar_construct_invalidurl.phpt
cellog Thu Apr 30 04:43:10 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/phar/tests phar_construct_invalidurl.phpt Modified files: /php-srcNEWS /php-src/ext/phar phar.c Log: MFPECL fix PECL Bug #14646: phar error message unclear with php stream wrappers (note: is there a standard way to list PECL bugs in NEWS?) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.571r2=1.2027.2.547.2.965.2.572diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.571 php-src/NEWS:1.2027.2.547.2.965.2.572 --- php-src/NEWS:1.2027.2.547.2.965.2.571 Tue Apr 28 07:13:30 2009 +++ php-src/NEWSThu Apr 30 04:43:09 2009 @@ -53,6 +53,8 @@ update). (Matteo) - Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped). (Scott, Edward Z. Yang) +- Fixed PECL bug #16338 (phar extension uses php_stream_copy_to_stream). (Greg) +- Fixed PECL bug #14646 (phar error message unclear with php stream wrappers). (Greg) - Fixed an issue with ReflectionProperty::setAccessible(). (Sebastian, Roman Borschel) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.59r2=1.370.2.60diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.370.2.59 php-src/ext/phar/phar.c:1.370.2.60 --- php-src/ext/phar/phar.c:1.370.2.59 Wed Apr 29 03:24:26 2009 +++ php-src/ext/phar/phar.c Thu Apr 30 04:43:10 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.370.2.59 2009/04/29 03:24:26 cellog Exp $ */ +/* $Id: phar.c,v 1.370.2.60 2009/04/30 04:43:10 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -1262,7 +1262,11 @@ /* next try to create a new file */ if (FAILURE == phar_detect_phar_fname_ext(fname, fname_len, ext_str, ext_len, !is_data, 1, 1 TSRMLS_CC)) { if (error) { - spprintf(error, 0, Cannot create phar '%s', file extension (or combination) not recognised, fname); + if (ext_len == -2) { + spprintf(error, 0, Cannot create a phar archive from a URL like \%s\. Phar objects can only be created from local files, fname); + } else { + spprintf(error, 0, Cannot create phar '%s', file extension (or combination) not recognised, fname); + } } return FAILURE; } @@ -1903,6 +1907,12 @@ pos = memchr(filename, '/', filename_len); if (pos pos != filename) { + /* check for url like http:// or phar:// */ + if (*(pos - 1) == ':' (pos - filename) filename_len - 1 *(pos + 1) == '/') { + *ext_len = -2; + *ext_str = NULL; + return FAILURE; + } if (zend_hash_exists((PHAR_GLOBALS-phar_alias_map), (char *) filename, pos - filename)) { *ext_str = pos; *ext_len = -1; @@ -3624,7 +3634,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.59 $); + php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.60 $); 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/tests/phar_construct_invalidurl.phpt?view=markuprev=1.1 Index: php-src/ext/phar/tests/phar_construct_invalidurl.phpt +++ php-src/ext/phar/tests/phar_construct_invalidurl.phpt --TEST-- Phar object passed URL --INI-- default_charset=UTF-8 --SKIPIF-- ?php if (!extension_loaded(phar)) die(skip); ? --FILE-- ?php try { $a = new Phar('http://should.fail.com'); } catch (UnexpectedValueException $e) { echo $e-getMessage(),\n; } try { $a = new Phar('http://'); } catch (UnexpectedValueException $e) { echo $e-getMessage(),\n; } try { $a = new Phar('http:/'); } catch (UnexpectedValueException $e) { echo $e-getMessage(),\n; } ? ===DONE=== --EXPECT-- Cannot create a phar archive from a URL like http://should.fail.com;. Phar objects can only be created from local files Cannot create a phar archive from a URL like http://;. Phar objects can only be created from local files Cannot create phar 'http:/', file extension (or combination) not recognised ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests fatal_error_webphar.phpt /ext/phar/tests/files pear2coverage.phar.php
cellog Tue Apr 28 19:28:52 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/phar/tests fatal_error_webphar.phpt /php-src/ext/phar/tests/files pear2coverage.phar.php Log: new test - test passes here, but the pear2coverage.phar.php segfaults in apache 2.2 sapi http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/fatal_error_webphar.phpt?view=markuprev=1.1 Index: php-src/ext/phar/tests/fatal_error_webphar.phpt +++ php-src/ext/phar/tests/fatal_error_webphar.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/files/pear2coverage.phar.php?view=markuprev=1.1 Index: php-src/ext/phar/tests/files/pear2coverage.phar.php +++ php-src/ext/phar/tests/files/pear2coverage.phar.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c
cellog Wed Apr 29 03:24:09 2009 UTC Modified files: /php-src/ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c Log: MFPECL: fix PECL bug #16338, php_stream_copy_to_stream{,_ex}() http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.396r2=1.397diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.396 php-src/ext/phar/phar.c:1.397 --- php-src/ext/phar/phar.c:1.396 Fri Feb 20 05:06:52 2009 +++ php-src/ext/phar/phar.c Wed Apr 29 03:24:08 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.396 2009/02/20 05:06:52 cellog Exp $ */ +/* $Id: phar.c,v 1.397 2009/04/29 03:24:08 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -1635,7 +1635,7 @@ php_stream_filter_append(temp-writefilters, filter); - if (0 == php_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL)) { + if (SUCCESS != phar_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL, NULL)) { if (err) { php_stream_close(temp); MAPPHAR_ALLOC_FAIL(unable to decompress gzipped phar archive \%s\, ext/zlib is buggy in PHP versions older than 5.2.6) @@ -1677,7 +1677,7 @@ php_stream_filter_append(temp-writefilters, filter); - if (0 == php_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL)) { + if (SUCCESS != phar_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL, NULL)) { php_stream_close(temp); MAPPHAR_ALLOC_FAIL(unable to decompress bzipped phar archive \%s\ to temporary file) } @@ -2661,7 +2661,7 @@ size_t written; if (!user_stub phar-halt_offset oldfile !phar-is_brandnew) { - written = php_stream_copy_to_stream(oldfile, newfile, phar-halt_offset); + phar_stream_copy_to_stream(oldfile, newfile, phar-halt_offset, written); newstub = NULL; } else { /* this is either a brand new phar or a default stub overwrite */ @@ -2849,7 +2849,7 @@ return EOF; } php_stream_filter_append((entry-cfp-writefilters), filter); - if (entry-uncompressed_filesize != php_stream_copy_to_stream(file, entry-cfp, entry-uncompressed_filesize)) { + if (SUCCESS != phar_stream_copy_to_stream(file, entry-cfp, entry-uncompressed_filesize, NULL)) { if (closeoldfile) { php_stream_close(oldfile); } @@ -3059,7 +3059,7 @@ /* this will have changed for all files that have either changed compression or been modified */ entry-offset = entry-offset_abs = offset; offset += entry-compressed_filesize; - wrote = php_stream_copy_to_stream(file, newfile, entry-compressed_filesize); + phar_stream_copy_to_stream(file, newfile, entry-compressed_filesize, wrote); if (entry-compressed_filesize != wrote) { if (closeoldfile) { @@ -3207,7 +3207,7 @@ } php_stream_filter_append(phar-fp-writefilters, filter); - php_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL); + phar_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL, NULL); php_stream_filter_flush(filter, 1); php_stream_filter_remove(filter, 1 TSRMLS_CC); php_stream_close(phar-fp); @@ -3216,14 +3216,14 @@ } else if (phar-flags PHAR_FILE_COMPRESSED_BZ2) { filter = php_stream_filter_create(bzip2.compress, NULL, php_stream_is_persistent(phar-fp) TSRMLS_CC); php_stream_filter_append(phar-fp-writefilters, filter); - php_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL); + phar_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL, NULL); php_stream_filter_flush(filter, 1); php_stream_filter_remove(filter, 1 TSRMLS_CC); php_stream_close(phar-fp); /* use the temp stream as our base */ phar-fp = newfile; } else { - php_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL); +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c
cellog Wed Apr 29 03:24:27 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c Log: MFPECL: fix PECL bug #16338, php_stream_copy_to_stream{,_ex}() http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.58r2=1.370.2.59diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.370.2.58 php-src/ext/phar/phar.c:1.370.2.59 --- php-src/ext/phar/phar.c:1.370.2.58 Fri Feb 20 05:06:37 2009 +++ php-src/ext/phar/phar.c Wed Apr 29 03:24:26 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.370.2.58 2009/02/20 05:06:37 cellog Exp $ */ +/* $Id: phar.c,v 1.370.2.59 2009/04/29 03:24:26 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -1635,7 +1635,7 @@ php_stream_filter_append(temp-writefilters, filter); - if (0 == php_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL)) { + if (SUCCESS != phar_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL, NULL)) { if (err) { php_stream_close(temp); MAPPHAR_ALLOC_FAIL(unable to decompress gzipped phar archive \%s\, ext/zlib is buggy in PHP versions older than 5.2.6) @@ -1677,7 +1677,7 @@ php_stream_filter_append(temp-writefilters, filter); - if (0 == php_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL)) { + if (SUCCESS != phar_stream_copy_to_stream(fp, temp, PHP_STREAM_COPY_ALL, NULL)) { php_stream_close(temp); MAPPHAR_ALLOC_FAIL(unable to decompress bzipped phar archive \%s\ to temporary file) } @@ -2661,7 +2661,7 @@ size_t written; if (!user_stub phar-halt_offset oldfile !phar-is_brandnew) { - written = php_stream_copy_to_stream(oldfile, newfile, phar-halt_offset); + phar_stream_copy_to_stream(oldfile, newfile, phar-halt_offset, written); newstub = NULL; } else { /* this is either a brand new phar or a default stub overwrite */ @@ -2849,7 +2849,7 @@ return EOF; } php_stream_filter_append((entry-cfp-writefilters), filter); - if (entry-uncompressed_filesize != php_stream_copy_to_stream(file, entry-cfp, entry-uncompressed_filesize)) { + if (SUCCESS != phar_stream_copy_to_stream(file, entry-cfp, entry-uncompressed_filesize, NULL)) { if (closeoldfile) { php_stream_close(oldfile); } @@ -3059,7 +3059,7 @@ /* this will have changed for all files that have either changed compression or been modified */ entry-offset = entry-offset_abs = offset; offset += entry-compressed_filesize; - wrote = php_stream_copy_to_stream(file, newfile, entry-compressed_filesize); + phar_stream_copy_to_stream(file, newfile, entry-compressed_filesize, wrote); if (entry-compressed_filesize != wrote) { if (closeoldfile) { @@ -3207,7 +3207,7 @@ } php_stream_filter_append(phar-fp-writefilters, filter); - php_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL); + phar_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL, NULL); php_stream_filter_flush(filter, 1); php_stream_filter_remove(filter, 1 TSRMLS_CC); php_stream_close(phar-fp); @@ -3216,14 +3216,14 @@ } else if (phar-flags PHAR_FILE_COMPRESSED_BZ2) { filter = php_stream_filter_create(bzip2.compress, NULL, php_stream_is_persistent(phar-fp) TSRMLS_CC); php_stream_filter_append(phar-fp-writefilters, filter); - php_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL); + phar_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL, NULL); php_stream_filter_flush(filter, 1); php_stream_filter_remove(filter, 1 TSRMLS_CC); php_stream_close(phar-fp); /* use the temp stream as our base */ phar-fp = newfile; } else { - php_stream_copy_to_stream(newfile, phar-fp, PHP_STREAM_COPY_ALL); +
[PHP-CVS] Re: cvs: php-src(PHP_5_3) /ext/sqlite3 php_sqlite3_structs.h sqlite3.c
Scott MacVicar wrote: scottmac Mon Apr 27 18:16:46 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sqlite3 php_sqlite3_structs.h sqlite3.c Log: MFH Add the ability to enable exceptions rather than warnings for sqlite3, needed for pyrus. Muchas Gracias :) Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: phpruntests /phpt-tests hw.phpsample_expectheaders.phpt sample_fileexternal.phpt
Johannes Schlüter wrote: Hi, On Wed, 2009-04-22 at 16:14 +, Zoe Slattery wrote: --EXPECTHEADERS-- Status: 404 Not Found X-Powered-By: PHP/5.3.0RC2-dev Content-type: text/html --EXPECT-- shouldn't that support %s modifiers? I'm quite sure the X-Powered-By header will change quite often and it will be painful to change them all the time :-) Probably better is to remove the X-Powered-By in this test, since its point is only to verify that EXPECTHEADERS is working? Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: phpruntests /phpt-tests hw.phpsample_expectheaders.phpt sample_fileexternal.phpt
Johannes Schlüter wrote: On Wed, 2009-04-22 at 17:37 -0500, Greg Beaver wrote: Johannes Schlüter wrote: Hi, On Wed, 2009-04-22 at 16:14 +, Zoe Slattery wrote: --EXPECTHEADERS-- Status: 404 Not Found X-Powered-By: PHP/5.3.0RC2-dev Content-type: text/html --EXPECT-- shouldn't that support %s modifiers? I'm quite sure the X-Powered-By header will change quite often and it will be painful to change them all the time :-) Probably better is to remove the X-Powered-By in this test, since its point is only to verify that EXPECTHEADERS is working? Wasn't sure whether it means expecting all of them or just at least them (in a random order?) it means all of these headers must be present, but others may be as well Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions phpinfo.phpt
Zoe Slattery wrote: zoe Wed Mar 4 10:23:01 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions phpinfo.phpt Log: fixed test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpinfo.phpt?r1=1.1.2.2.2.8r2=1.1.2.2.2.9diff_format=u Index: php-src/ext/standard/tests/general_functions/phpinfo.phpt diff -u php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.8 php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.9 --- php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.8 Sun Feb 15 21:46:01 2009 +++ php-src/ext/standard/tests/general_functions/phpinfo.phpt Wed Mar 4 10:23:01 2009 @@ -46,27 +46,17 @@ Configuration - -%a - +%A Hi Zoe, Is there documentation on this change? I'm finding it a little bit arbitrary that run-tests keeps changing basic stuff so often, it's making me split tests simply to have a different EXPECTF for php 5.2 vs. 5.3. First it was %s, then %a, and now %A to match multi-line? Thanks, Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions phpinfo.phpt
zoe wrote: Hi Zoe, Is there documentation on this change? Hi Greg - you mean the change I made to the phpinfo.phpt test? If so I changed it because it was failing and should not have been. Or do you mean changes to run-tests.php options? I meant to run-tests.php. I'm finding it a little bit arbitrary that run-tests keeps changing basic stuff so often, it's making me split tests simply to have a different EXPECTF for php 5.2 vs. 5.3. First it was %s, then %a, and now %A to match multi-line? Sure - all the --EXPECTF-- options are documented here http://qa.php.net/expectf_details.php, and, as far as I'm aware all the EXPECTF options should be common to PHP 52, PHP 53 and PHP 6. If they aren't then it's an oversight and I'll be happy to fix. I don't think any of them should require changes to existing tests. Thanks, this is very helpful, and answers all of my questions. Greg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests front.phar.phpt phar_get_supported_signatures_002.phpt
cellog Sun Mar 1 06:50:26 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests front.phar.phpt phar_get_supported_signatures_002.phpt Log: fix SKIPIF, EXPECT in 2 tests http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/front.phar.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/phar/tests/front.phar.phpt diff -u php-src/ext/phar/tests/front.phar.phpt:1.1.2.3 php-src/ext/phar/tests/front.phar.phpt:1.1.2.4 --- php-src/ext/phar/tests/front.phar.phpt:1.1.2.3 Fri Aug 1 13:38:46 2008 +++ php-src/ext/phar/tests/front.phar.phpt Sun Mar 1 06:50:26 2009 @@ -12,8 +12,8 @@ Content-type: text/html; charset=UTF-8 --FILE_EXTERNAL-- files/blog.phar ---EXPECT-- -string(167) xml version=1.0 encoding=UTF-8 +--EXPECTF-- +string(%d) xml version=1.0 encoding=UTF-8 config database hostlocalhost/name http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt?r1=1.2.2.3r2=1.2.2.4diff_format=u Index: php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt diff -u php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.2.2.3 php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.2.2.4 --- php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.2.2.3 Sun Aug 31 19:18:35 2008 +++ php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt Sun Mar 1 06:50:26 2009 @@ -5,7 +5,7 @@ if (!extension_loaded(phar)) die(skip); if (!extension_loaded(hash)) die(skip extension hash required); $arr = Phar::getSupportedSignatures(); -if (in_array(OpenSSL, $arr)) die (skip openssl support enabled); +if (!in_array('SHA-256', $arr)) die(skip hash extension loaded shared); ? --INI-- phar.require_hash=0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests front.phar.phpt phar_get_supported_signatures_002.phpt
cellog Sun Mar 1 06:50:38 2009 UTC Modified files: /php-src/ext/phar/tests front.phar.phpt phar_get_supported_signatures_002.phpt Log: MFB: fix SKIPIF, EXPECT in 2 tests http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/front.phar.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/phar/tests/front.phar.phpt diff -u php-src/ext/phar/tests/front.phar.phpt:1.3 php-src/ext/phar/tests/front.phar.phpt:1.4 --- php-src/ext/phar/tests/front.phar.phpt:1.3 Fri Aug 1 13:36:18 2008 +++ php-src/ext/phar/tests/front.phar.phpt Sun Mar 1 06:50:38 2009 @@ -12,8 +12,8 @@ Content-type: text/html; charset=UTF-8 --FILE_EXTERNAL-- files/blog.phar ---EXPECT-- -string(167) xml version=1.0 encoding=UTF-8 +--EXPECTF-- +string(%d) xml version=1.0 encoding=UTF-8 config database hostlocalhost/name http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt diff -u php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.4 php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.5 --- php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.4 Sun Aug 31 20:54:27 2008 +++ php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt Sun Mar 1 06:50:38 2009 @@ -5,7 +5,7 @@ if (!extension_loaded(phar)) die(skip); if (!extension_loaded(hash)) die(skip extension hash required); $arr = Phar::getSupportedSignatures(); -if (in_array(OpenSSL, $arr)) die (skip openssl support enabled); +if (!in_array('SHA-256', $arr)) die(skip hash extension loaded shared); ? --INI-- phar.require_hash=0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/phar zip.c
cellog Sun Mar 1 06:58:01 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/phar zip.c Log: update NEWS with phar enabling, fix swapping of time/date in timestamp saving for zip, which can cause crash on windows http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.503r2=1.2027.2.547.2.965.2.504diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.503 php-src/NEWS:1.2027.2.547.2.965.2.504 --- php-src/NEWS:1.2027.2.547.2.965.2.503 Wed Feb 18 22:35:32 2009 +++ php-src/NEWSSun Mar 1 06:58:01 2009 @@ -3,6 +3,8 @@ ?? ??? 2009, PHP 5.3.0 Beta 2 - Upgraded bundled sqlite to version 3.6.11. (Scott) +- Re-enabled phar for big-endian systems after fixing problems. (Greg) + - Fixed Bug #47443 (metaphone('scratch') returns wrong result). (Felipe) - Fixed bug #47438 (mysql_fetch_field ignores zero offset). (Johannes) - Fixed bug #47398 (PDO_Firebird doesn't implements quoter correctly). (Felipe) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.47.2.30r2=1.47.2.31diff_format=u Index: php-src/ext/phar/zip.c diff -u php-src/ext/phar/zip.c:1.47.2.30 php-src/ext/phar/zip.c:1.47.2.31 --- php-src/ext/phar/zip.c:1.47.2.30Sat Feb 21 02:32:16 2009 +++ php-src/ext/phar/zip.c Sun Mar 1 06:58:01 2009 @@ -147,8 +147,8 @@ struct tm *tm, tmbuf; tm = php_localtime_r(time, tmbuf); - ctime = ((tm-tm_year+1900-1980)9) + ((tm-tm_mon+1)5) + tm-tm_mday; - cdate = ((tm-tm_hour)11) + ((tm-tm_min)5) + ((tm-tm_sec)1); + cdate = ((tm-tm_year+1900-1980)9) + ((tm-tm_mon+1)5) + tm-tm_mday; + ctime = ((tm-tm_hour)11) + ((tm-tm_min)5) + ((tm-tm_sec)1); PHAR_SET_16(dtime, ctime); PHAR_SET_16(ddate, cdate); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar zip.c
cellog Sun Mar 1 06:58:23 2009 UTC Modified files: /php-src/ext/phar zip.c Log: MFB: fix swapping of time/date in timestamp saving for zip, which can cause crash on windows http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.65r2=1.66diff_format=u Index: php-src/ext/phar/zip.c diff -u php-src/ext/phar/zip.c:1.65 php-src/ext/phar/zip.c:1.66 --- php-src/ext/phar/zip.c:1.65 Sat Feb 21 02:34:01 2009 +++ php-src/ext/phar/zip.c Sun Mar 1 06:58:23 2009 @@ -147,8 +147,8 @@ struct tm *tm, tmbuf; tm = php_localtime_r(time, tmbuf); - ctime = ((tm-tm_year+1900-1980)9) + ((tm-tm_mon+1)5) + tm-tm_mday; - cdate = ((tm-tm_hour)11) + ((tm-tm_min)5) + ((tm-tm_sec)1); + cdate = ((tm-tm_year+1900-1980)9) + ((tm-tm_mon+1)5) + tm-tm_mday; + ctime = ((tm-tm_hour)11) + ((tm-tm_min)5) + ((tm-tm_sec)1); PHAR_SET_16(dtime, ctime); PHAR_SET_16(ddate, cdate); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests/files blog.phar blog.phar.inc
cellog Sun Mar 1 07:00:13 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests/files blog.phar blog.phar.inc Log: fix blog.phar for front.phar.phpt test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/files/blog.phar?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/phar/tests/files/blog.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/files/blog.phar.inc?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/phar/tests/files/blog.phar.inc diff -u php-src/ext/phar/tests/files/blog.phar.inc:1.1.2.2 php-src/ext/phar/tests/files/blog.phar.inc:1.1.2.3 --- php-src/ext/phar/tests/files/blog.phar.inc:1.1.2.2 Tue Sep 30 13:25:48 2008 +++ php-src/ext/phar/tests/files/blog.phar.inc Sun Mar 1 07:00:13 2009 @@ -15,7 +15,7 @@ include install.php; exit; } -var_dump(file_get_contents(config.xml)); +var_dump(str_replace(\r\n, \n, file_get_contents(config.xml))); ?'; $phar['install.php'] = '?php echo install\n; ?'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests/files blog.phar blog.phar.inc
cellog Sun Mar 1 07:00:22 2009 UTC Modified files: /php-src/ext/phar/tests/files blog.phar blog.phar.inc Log: MFB: fix blog.phar for front.phar.phpt test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/files/blog.phar?r1=1.4r2=1.5diff_format=u Index: php-src/ext/phar/tests/files/blog.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/files/blog.phar.inc?r1=1.3r2=1.4diff_format=u Index: php-src/ext/phar/tests/files/blog.phar.inc diff -u php-src/ext/phar/tests/files/blog.phar.inc:1.3 php-src/ext/phar/tests/files/blog.phar.inc:1.4 --- php-src/ext/phar/tests/files/blog.phar.inc:1.3 Tue Sep 30 13:25:54 2008 +++ php-src/ext/phar/tests/files/blog.phar.inc Sun Mar 1 07:00:22 2009 @@ -15,7 +15,7 @@ include install.php; exit; } -var_dump(file_get_contents(config.xml)); +var_dump(str_replace(\r\n, \n, file_get_contents(config.xml))); ?'; $phar['install.php'] = '?php echo install\n; ?'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar config.w32
cellog Sun Mar 1 07:07:05 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar config.w32 Log: fix hash support on windows in ext/phar (Kalle) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/config.w32?r1=1.27.2.8r2=1.27.2.9diff_format=u Index: php-src/ext/phar/config.w32 diff -u php-src/ext/phar/config.w32:1.27.2.8 php-src/ext/phar/config.w32:1.27.2.9 --- php-src/ext/phar/config.w32:1.27.2.8Mon Sep 1 16:32:55 2008 +++ php-src/ext/phar/config.w32 Sun Mar 1 07:07:05 2009 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.27.2.8 2008/09/01 16:32:55 sfox Exp $ +// $Id: config.w32,v 1.27.2.9 2009/03/01 07:07:05 cellog Exp $ // vim:ft=javascript ARG_ENABLE(phar, disable phar support, yes); @@ -35,5 +35,12 @@ STDOUT.WriteLine('Native OpenSSL support in Phar disabled'); } } + if (PHP_HASH != no) { + if (PHP_HASH_SHARED == no) { + AC_DEFINE(PHAR_HASH_OK, 1); + } else { + WARNING('Phar: sha256/sha512 signature support disabled if ext/hash is built shared'); + } + } ADD_EXTENSION_DEP('phar', 'spl', true); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar config.w32
cellog Sun Mar 1 07:07:14 2009 UTC Modified files: /php-src/ext/phar config.w32 Log: MFB: fix hash support on windows in ext/phar (Kalle) http://cvs.php.net/viewvc.cgi/php-src/ext/phar/config.w32?r1=1.30r2=1.31diff_format=u Index: php-src/ext/phar/config.w32 diff -u php-src/ext/phar/config.w32:1.30 php-src/ext/phar/config.w32:1.31 --- php-src/ext/phar/config.w32:1.30Sun Aug 31 20:54:27 2008 +++ php-src/ext/phar/config.w32 Sun Mar 1 07:07:14 2009 @@ -1,17 +1,16 @@ -// $Id: config.w32,v 1.30 2008/08/31 20:54:27 sfox Exp $ +// $Id: config.w32,v 1.31 2009/03/01 07:07:14 cellog Exp $ // vim:ft=javascript -ARG_ENABLE(phar, enable phar support, no); +ARG_ENABLE(phar, disable phar support, yes); ARG_ENABLE(phar-native-ssl, enable phar with native OpenSSL support, no); if (PHP_PHAR_NATIVE_SSL != no) { PHP_PHAR = PHP_PHAR_NATIVE_SSL; - PHP_PHAR_SHARED = PHP_PHAR_NATIVE_SSL_SHARED; } if (PHP_PHAR != no) { EXTENSION(phar, dirstream.c func_interceptors.c phar.c phar_object.c phar_path_check.c stream.c tar.c util.c zip.c); - if (PHP_PHAR_SHARED) { + if (PHP_PHAR_SHARED || (PHP_PHAR_NATIVE_SSL_SHARED PHP_SNAPSHOT_BUILD == no)) { ADD_FLAG(CFLAGS_PHAR, /D COMPILE_DL_PHAR ); } if (PHP_PHAR_NATIVE_SSL != no) { @@ -36,5 +35,12 @@ STDOUT.WriteLine('Native OpenSSL support in Phar disabled'); } } + if (PHP_HASH != no) { + if (PHP_HASH_SHARED == no) { + AC_DEFINE(PHAR_HASH_OK, 1); + } else { + WARNING('Phar: sha256/sha512 signature support disabled if ext/hash is built shared'); + } + } ADD_EXTENSION_DEP('phar', 'spl', true); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests phar_gzip.phpt /ext/phar/tests/zip phar_stub.phpt
cellog Sun Mar 1 07:16:46 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests phar_gzip.phpt /php-src/ext/phar/tests/zip phar_stub.phpt Log: add safeguard check for timestamp modification to phar_stub.phpt and phar_gzip.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_gzip.phpt?r1=1.4.2.1r2=1.4.2.2diff_format=u Index: php-src/ext/phar/tests/phar_gzip.phpt diff -u php-src/ext/phar/tests/phar_gzip.phpt:1.4.2.1 php-src/ext/phar/tests/phar_gzip.phpt:1.4.2.2 --- php-src/ext/phar/tests/phar_gzip.phpt:1.4.2.1 Fri Aug 1 13:38:47 2008 +++ php-src/ext/phar/tests/phar_gzip.phpt Sun Mar 1 07:16:46 2009 @@ -42,6 +42,11 @@ $b = new Phar($fname2); var_dump($b-isFileFormat(Phar::PHAR)); var_dump($b-isCompressed() == Phar::GZ); +$a = stat($pname . '/test'); +$b = stat($pname2 . '/test'); +if ($a['mtime'] != $b['mtime']) { + echo timestamp changed, was $a[mtime], now $b[mtime]!\n; +} ? ===DONE=== --CLEAN-- http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/zip/phar_stub.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/phar/tests/zip/phar_stub.phpt diff -u php-src/ext/phar/tests/zip/phar_stub.phpt:1.1.2.1 php-src/ext/phar/tests/zip/phar_stub.phpt:1.1.2.2 --- php-src/ext/phar/tests/zip/phar_stub.phpt:1.1.2.1 Fri Aug 1 13:38:48 2008 +++ php-src/ext/phar/tests/zip/phar_stub.phpt Sun Mar 1 07:16:46 2009 @@ -19,6 +19,12 @@ $p['c'] = 'c'; copy($fname2, $fname); +$a = stat($pname . '/a'); +$b = stat($pname2 . '/a'); +if ($a['mtime'] != $b['mtime']) { + echo timestamp changed, was $a[mtime], now $b[mtime]!\n; +} + $phar = new Phar($fname); echo $phar-getStub(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests phar_gzip.phpt /ext/phar/tests/zip phar_stub.phpt
cellog Sun Mar 1 07:16:55 2009 UTC Modified files: /php-src/ext/phar/tests phar_gzip.phpt /php-src/ext/phar/tests/zip phar_stub.phpt Log: MFB: add safeguard check for timestamp modification to phar_stub.phpt and phar_gzip.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_gzip.phpt?r1=1.6r2=1.7diff_format=u Index: php-src/ext/phar/tests/phar_gzip.phpt diff -u php-src/ext/phar/tests/phar_gzip.phpt:1.6 php-src/ext/phar/tests/phar_gzip.phpt:1.7 --- php-src/ext/phar/tests/phar_gzip.phpt:1.6 Fri Aug 1 13:36:18 2008 +++ php-src/ext/phar/tests/phar_gzip.phpt Sun Mar 1 07:16:55 2009 @@ -42,6 +42,11 @@ $b = new Phar($fname2); var_dump($b-isFileFormat(Phar::PHAR)); var_dump($b-isCompressed() == Phar::GZ); +$a = stat($pname . '/test'); +$b = stat($pname2 . '/test'); +if ($a['mtime'] != $b['mtime']) { + echo timestamp changed, was $a[mtime], now $b[mtime]!\n; +} ? ===DONE=== --CLEAN-- http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/zip/phar_stub.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/phar/tests/zip/phar_stub.phpt diff -u php-src/ext/phar/tests/zip/phar_stub.phpt:1.3 php-src/ext/phar/tests/zip/phar_stub.phpt:1.4 --- php-src/ext/phar/tests/zip/phar_stub.phpt:1.3 Fri Aug 1 13:36:19 2008 +++ php-src/ext/phar/tests/zip/phar_stub.phpt Sun Mar 1 07:16:55 2009 @@ -19,6 +19,12 @@ $p['c'] = 'c'; copy($fname2, $fname); +$a = stat($pname . '/a'); +$b = stat($pname2 . '/a'); +if ($a['mtime'] != $b['mtime']) { + echo timestamp changed, was $a[mtime], now $b[mtime]!\n; +} + $phar = new Phar($fname); echo $phar-getStub(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests phar_get_supported_signatures_002.phpt
cellog Sun Mar 1 07:20:27 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests phar_get_supported_signatures_002.phpt Log: revert removal of openssl check, was confusion on my part http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt?r1=1.2.2.4r2=1.2.2.5diff_format=u Index: php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt diff -u php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.2.2.4 php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.2.2.5 --- php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.2.2.4 Sun Mar 1 06:50:26 2009 +++ php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt Sun Mar 1 07:20:26 2009 @@ -5,6 +5,7 @@ if (!extension_loaded(phar)) die(skip); if (!extension_loaded(hash)) die(skip extension hash required); $arr = Phar::getSupportedSignatures(); +if (in_array(OpenSSL, $arr)) die(skip openssl support enabled); if (!in_array('SHA-256', $arr)) die(skip hash extension loaded shared); ? --INI-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests phar_get_supported_signatures_002.phpt
cellog Sun Mar 1 07:20:38 2009 UTC Modified files: /php-src/ext/phar/tests phar_get_supported_signatures_002.phpt Log: MFB: revert removal of openssl check, was confusion on my part http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt diff -u php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.5 php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.6 --- php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt:1.5 Sun Mar 1 06:50:38 2009 +++ php-src/ext/phar/tests/phar_get_supported_signatures_002.phpt Sun Mar 1 07:20:38 2009 @@ -5,6 +5,7 @@ if (!extension_loaded(phar)) die(skip); if (!extension_loaded(hash)) die(skip extension hash required); $arr = Phar::getSupportedSignatures(); +if (in_array(OpenSSL, $arr)) die(skip openssl support enabled); if (!in_array('SHA-256', $arr)) die(skip hash extension loaded shared); ? --INI-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php