Commit Graph

21 Commits

Author SHA1 Message Date
Greg Beaver
d8d31bc591 remove unused variables in phar_fix_filepath
copy virtual_dirs to avoid segfault on multi-process
fix metadata reading for phar.cache_list
initialize manifest to exact size needed (performance increase)
fix freeing of signature on error to use the correct persist value (fixes segfault on error in cache.list)
reset EG(regular_list) so it is identical to how we found it
2008-06-16 04:10:53 +00:00
Greg Beaver
c353e9277e minor performance improvement 2008-06-15 23:00:46 +00:00
Greg Beaver
4104786072 another optimization - move inode hash to initial manifest parsing, improves runtime perf of stat slightly 2008-06-15 21:42:20 +00:00
Greg Beaver
d8ed660a02 minor optimization 2008-06-15 21:15:29 +00:00
Greg Beaver
04e257a8e1 HUGE speed improvement, from 19 req/sec to 27 req/sec for phpMyAdmin - now speed with apc+phar.cache_list = on-disk speedcvs diff -u |less This is by generating a list of virtual directories and using those in stat calls instead of scanning the whole manifest hash table. on-disk phpMyAdmin = 28 req/sec 2008-06-15 18:15:48 +00:00
Greg Beaver
5ff4deaa53 full refactor of signatures complete - now to implement them for tar as a starting point 2008-06-13 20:15:19 +00:00
Felipe Pena
d61f32d021 - Fix build (ZTS) 2008-06-13 13:06:46 +00:00
Greg Beaver
9c8d13fd6c partial refactor - move signature verification into its own function, in preparation for tar/zip signature support.
next is signature creation
2008-06-13 06:34:41 +00:00
Greg Beaver
98f2dc2aca [DOC] add phar.cache_list, a PATH_SEPARATOR-separated list of full paths to phar archives to cache
at startup.  This caches the manifest, so that on first access to a phar archive, no file manifest parsing occurs.

This could use further tweaking.  For instance, the full copy of the manifest into the current process may be unnecessary if refcounting could be external
to the manifest.  This would be another significant gain.  With APC, I measure a slight perf increase to 19 req/sec up from 16 req/sec, without it approaches
regular PHP at 3.8 req/sec (regular is 4 req/sec).  This is benching phpMyAdmin
2008-06-12 18:56:23 +00:00
Greg Beaver
eb77b80b9d fix compile warnings if openssl is enabled statically. fix dangerous use of wrong length var in openssl signature verification 2008-06-09 16:07:18 +00:00
Greg Beaver
5fbeb235d2 add openssl signing support. This adds an extra parameter
for the contents of the exported private key to Phar->setSignatureAlgorithm, and expects the public key to be in
a file named blah.phar.pubkey in the same directory as the phar blah.phar.  This works with openssl static or
shared and fails gracefully if openssl is not present without adding a dependency. config.w32 needs updating to match config.m4 [DOC]
2008-06-01 04:21:26 +00:00
Greg Beaver
83e491b2c3 fix corrupted zips, fix postprocess for compressed zip file 2008-05-30 22:49:33 +00:00
Greg Beaver
8b600a72dc refactor function names for clarity. No functionality change 2008-05-30 22:38:46 +00:00
Greg Beaver
4cc79b39b4 fix PECL bug #13981: Third-party zips fail entry interrogation 2008-05-29 17:34:50 +00:00
Stanislav Malyshev
370aafc62b Fix code path in phar_open_compiled_file() that tries
to open not-yet-loaded phar and fails on compressed files
# By Gregory's request
# Sorry, can't find how to write test case for that - it reproduces
# for me only under bytecode-caching. Suggestions welcome.
2008-05-28 21:42:21 +00:00
Greg Beaver
4b035dae5f major fixes
* found felipe's segfault in util.c and fixed the segfault (3 tests fail due to odd behavior of . and .. on this machine)
 * fixed serious flaws in the setting/resetting of is_data - now it works properly.  Assume
   all new PharData are tar-based, and allow passing Phar::ZIP to PharData constructor to override this
 * fix broken earlier commit, introduced segfault that broke 20 tests here
2008-05-22 06:33:09 +00:00
Greg Beaver
1f661c81c4 fix offset detection in tar files 2008-05-21 22:00:43 +00:00
Greg Beaver
4aa4f1fabb enable by default statically instead of shared
this is done by removing zlib/bz2 explicit dependencies because they are unnecessary
we only ever use the stream filter, and the check for existence has
been moved to runtime where it is after startup
2008-05-17 20:07:22 +00:00
Steph Fox
6a0682d986 - MFH
- Make internal code forward-compatible. This included a binary cast in the default stub, hence test updates.
2008-05-14 21:29:51 +00:00
Steph Fox
4d169ebcfc - Allow broken.dirnames to use phar too
- Add test
- Kill MSVC compiler warning
2008-05-13 14:11:24 +00:00
SVN Migration
16b4d8e0e1 This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. 2008-05-12 21:03:49 +00:00