Dmitry Stogov
68537af530
Fixed directory reanming/deletion
2008-07-20 14:42:34 +00:00
Dmitry Stogov
529ac539d0
Fixed access to freed memory
2008-07-18 09:35:51 +00:00
Dmitry Stogov
67b77b06e5
Fixed search on uninitialized data
2008-07-17 14:05:07 +00:00
Dmitry Stogov
5c631e8765
Fixed wrong arguments order
2008-07-17 13:22:32 +00:00
Dmitry Stogov
44557cf981
Improved support for opcode caches. Now some open() syscalls might be eliminated by caches.
2008-07-16 15:09:39 +00:00
Jani Taskinen
1e2b2bbeae
- Some config*.m4 file cleanups: NO tabs in these!
2008-07-14 09:02:26 +00:00
Antony Dovgal
0be3a5dcd5
drop unused var
2008-07-11 09:11:18 +00:00
Antony Dovgal
120f19b6a6
fix function protos and is_link() wrapper
2008-07-11 08:53:43 +00:00
Dmitry Stogov
478234b235
Fixed wrong refcount updates
2008-07-10 16:16:15 +00:00
Dmitry Stogov
d82b5d59b4
Added tests that demonstrate serious PHAR errors
...
They cannot be easly fixed without algorithms modification
2008-07-10 14:27:21 +00:00
Dmitry Stogov
53bbf1238c
Extensions MUST NOT manipulate with internal functions from EG(function_table) in run-time. It may cause problems with opcode caches and in multi-threaded environment. Now the same functions are overriden at MINIT and call original functions or PHAR ones dependent on flag setting.
2008-07-10 11:36:50 +00:00
Antony Dovgal
ae7eff10e8
add zero-terminator to the delimiter (and make valgrind happy)
2008-07-09 14:15:41 +00:00
Dmitry Stogov
1cfd92fc43
Fixed efree(NULL)
2008-07-09 08:47:05 +00:00
Etienne Kneuss
e53a9ca709
Fix filename/pathname/getpathinfo tests according to SPL fix
2008-07-09 08:39:42 +00:00
Steph Fox
27340e60fc
- Fixed config.w32 to keep Elizabeth happy
...
- NB This whole lot still might disappear, OpenSSL patch review pending
2008-07-07 01:13:14 +00:00
Steph Fox
2c9df0990d
- We forgot to check that the phar exists before trying to extract files from it :)
2008-07-07 01:11:07 +00:00
Steph Fox
5db08e7d1f
Duplicate tests to accommodate parameter parsing fixes in 5_3 core
...
(NB the 5_2 tests will fail currently due to name changes, will fix tomorrow)
2008-07-07 01:09:21 +00:00
Greg Beaver
37c684ab3d
in preparation for a performance optimization that involves
...
eliminating phar's interception of zend_compile in favor of a new to-be-added hook in PHP 5.3+,
allow "include 'phar:///path/to/my.phar';" to work as equivalent to
php /path/to/my.phar
this slight change in scripting still allows inclusion and execution of phar stub, but removes the need to
check and modify path in zend_compile, which allows us to play much nicer with external tools like
debuggers/opcode caches
2008-06-27 01:21:12 +00:00
Greg Beaver
8bf72978b3
fix several issues:
...
1) segfault in phar_buildfromdirectoryiterator8.phpt
2) tests failing because SKIPDOTS is default on 64 bit, not on 32
3) Marcus, you really need to add SKIPDOTS as a class constant, so we don't have to use 0x00001000
2008-06-24 01:11:27 +00:00
Steph Fox
b9e8695e75
- One solution for the openssl issues
...
- config.m4 needs bringing into line with config.w32, there may be broken behaviour under *nix until this is done
2008-06-23 19:18:01 +00:00
Steph Fox
019c586191
- Wrong SKIPIF message
2008-06-23 17:48:23 +00:00
Greg Beaver
10f6d9a556
true fix for potential segfault in phar_build
2008-06-23 04:00:23 +00:00
Greg Beaver
fb448c5c28
fix tar-related failures
2008-06-23 03:55:50 +00:00
Steph Fox
c68a82ac7d
- Revert the two blocks of code that implement the phar_build optimization, causes segfaults under *nix
...
- Leave the new structure in place to make re-implementation trivial
2008-06-22 16:35:26 +00:00
Steph Fox
f3844ecd17
- Revert the tar.c part of the inode calculation fix
...
- All tests now pass under win32, please test under *nix/osx (4 known fails at present)
2008-06-22 14:46:10 +00:00
Steph Fox
332a185e08
- ws, typo fix
2008-06-22 13:10:03 +00:00
Greg Beaver
3a8b14f83f
fix inode calculation, we need fname to be set for phar/tar formats prior to manifest parsing
2008-06-22 00:50:32 +00:00
Greg Beaver
0ad165e402
new tests for phar.cache_list
2008-06-22 00:49:54 +00:00
Steph Fox
0e5b3a3527
- Don't free stuff you still need
2008-06-21 21:37:39 +00:00
Steph Fox
35e0565a4b
- Kill a couple of double frees and a memleak
...
@Greg: You may want to run valgrind over the filestat functions before release..
2008-06-21 20:47:35 +00:00
Steph Fox
ad20b9e6bb
- pefree pemalloc'd filename
2008-06-21 20:14:43 +00:00
Steph Fox
22fb73c71e
- Fix macro definition syntax
...
- Remove pre-existing workaround
2008-06-21 19:40:41 +00:00
Steph Fox
f43a2be8cd
- fix for segfault in 5.2 (patch from Greg)
2008-06-21 19:15:46 +00:00
Steph Fox
b964ec6e5d
- ws
2008-06-21 18:57:53 +00:00
Greg Beaver
4b77c2baa5
define ALLOC_PERMANENT_ZVAL for PHP 5.2
2008-06-21 17:05:32 +00:00
Greg Beaver
eb0a98939a
PHP 5.2 fixes to direct include of compressed archives
2008-06-21 17:05:18 +00:00
Greg Beaver
baee4e6028
close stream on failure
2008-06-21 06:55:56 +00:00
Greg Beaver
529aa19cc7
82x(./profile2) speedup for buildFrom*()
2008-06-21 06:53:10 +00:00
Greg Beaver
14c26d05ba
fix leak
2008-06-21 06:21:58 +00:00
Steph Fox
97cf2a15da
- 5_2 compatibility stuff (so we can stay in sync with PECL)
2008-06-20 16:29:36 +00:00
Steph Fox
c88e99d9ea
- Use SKIP_SLOW_TESTS where it's most useful
2008-06-20 14:42:04 +00:00
Steph Fox
6ef7aef1d4
- Kill the last compiler warning under 5.3 (release-only)
2008-06-20 14:40:53 +00:00
Steph Fox
fc08a7cc2f
The only reason that particular 'real solution' wasn't applied in the first place was that it also breaks the shared build
...
Maybe we don't need to call a non-existent dtor if we're going to physically apply zend_hash_graceful_reverse_destroy()?
- This works on my box, please test under *nix/OSX
2008-06-20 12:21:32 +00:00
Johannes Schlüter
62726c967c
- Fix ZTS build (not required on HEAD, patch by Uwe Pries)
2008-06-20 09:17:53 +00:00
Greg Beaver
aff3636d9c
minor performance improvement
2008-06-20 06:37:14 +00:00
Greg Beaver
7cc6b9f3f5
making progress - up to 42/phar vs. 48/disk with these optimizations
2008-06-20 05:42:58 +00:00
Greg Beaver
5233505043
revert really bad solution to the zend_init_rsrc_list/zend_destroy_rsrc_list problem, replace with real solution
2008-06-20 04:50:11 +00:00
Steph Fox
5d4eed8f47
- inherited methods don't unixify paths along the way. Allow for it.
2008-06-18 16:48:18 +00:00
Steph Fox
aa694b8b51
- Kill 10 MSVC compiler warnings due to type conflict
...
- Make cached manifest test platform agnostic
- Comment out zend_(init|destroy)_rsrc_list() and associated references
@Greg: cached manifest test (now) passes here regardless, make of that what you will
2008-06-18 15:06:50 +00:00
Pierre Joye
e5e9be2d1a
- really fix the windows builds, don't cast many times when only the hash function requires void **
...
- copy/paste evilness with TSRM_CC/DC
(tests still pass but would be nice to speed them up...)
2008-06-18 10:20:47 +00:00
Greg Beaver
cbe23b9f20
fix windows build and more performance jumps (these are minor)
...
implement real copy-on-write
use virtual_dirs for wrapper stat
2008-06-18 06:38:47 +00:00
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
4e65a58146
fix hashtable creation for tar to be estimated size needed
2008-06-16 04:09:20 +00:00
Greg Beaver
03b9673ba2
fix hashtable creation for zip to be exact size needed, fix endian issue for loading manifest
2008-06-16 04:06:59 +00:00
Greg Beaver
c353e9277e
minor performance improvement
2008-06-15 23:00:46 +00:00
Greg Beaver
5e3f592d88
fix memleak
2008-06-15 22:51: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
Felipe Pena
c772aca929
- Fix build (ZTS)
2008-06-13 22:28:55 +00:00
Greg Beaver
4f9daeed11
[DOC] implement full signature support for tar-based archives. By default, data archives do
...
not have a signature, but can have one set via setSignatureAlgorithm()
2008-06-13 22:07:44 +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
Greg Beaver
09e1f0249e
PHP_5_2 compat - add pestrndup if undefined
2008-06-13 15:59:13 +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
84eb9cc145
ensure we don't try to use an unitialized hash table
2008-06-12 18:46:58 +00:00
Antony Dovgal
ca3e7643a6
fix build (noticed by Alexey Zakhlestin)
2008-06-12 10:31:22 +00:00
Greg Beaver
279771dc4b
fix error messages
2008-06-12 04:57:24 +00:00
Greg Beaver
4a62db4e6c
new tests (forgot to add these earlier)
2008-06-10 19:23:09 +00:00
Greg Beaver
8b8a64a3e8
fix PHP Bug #45218 : PHAR archive built from directory limited by max open file handles
2008-06-10 19:20:33 +00:00
Greg Beaver
d0734964ca
fix memleak on error
2008-06-10 17:58:09 +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
Marcus Boerger
332d83555c
- Make phar.phar building work for virtualized builds
2008-06-04 16:38:13 +00:00
Marcus Boerger
ad8eb0f672
- Make sure we are not trying to pack directories
2008-06-04 14:36:33 +00:00
Marcus Boerger
376ca12a21
- Update
2008-06-04 09:47:41 +00:00
Marcus Boerger
e8609b5199
- Use -n only for current built PHP
2008-06-04 09:47:17 +00:00
Marcus Boerger
350824478b
- Improve pear usage and PHP_Archive detection
2008-06-04 09:46:34 +00:00
Antony Dovgal
2ac1ba6254
fix tests
2008-06-04 07:38:10 +00:00
Marcus Boerger
c317ce0d67
- Prefer current CLI target to build phar.phar
...
- Use php -n
- Use shared phar, bz2, zlib automatically
2008-06-03 20:18:58 +00:00
Marcus Boerger
4e61f63d3f
- Remove checked-in or older version of phar.phar as we might not be able to open it
2008-06-02 15:50:42 +00:00
Marcus Boerger
159561e9da
- Need to use a proper inheritance check
2008-06-02 15:49:03 +00:00
Marcus Boerger
c60365e9b3
- Fix issue with -y parameter hanlding (fix typo)
2008-06-02 13:39:54 +00:00
Marcus Boerger
4f74e50c1b
- Fix issue with -y parameter hanlding
2008-06-02 13:33:45 +00:00
Marcus Boerger
cb0af1eeb8
- Fix issue with -y parameter hanlding
2008-06-02 13:24:15 +00:00
Marcus Boerger
678a38e9ba
- Make work with new API
2008-06-01 17:16:40 +00:00
Marcus Boerger
147eed53e2
- Fix signature handling (and remaining API change fixes)
2008-06-01 17:16:04 +00:00
Marcus Boerger
aaf6b216ed
- Fix docu
2008-06-01 17:14:48 +00:00
Marcus Boerger
c05c40cea4
- Add Openssl support
2008-06-01 07:39:06 +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
Marcus Boerger
4c2e05a6e7
- MFH Simplify
2008-05-31 20:30:27 +00:00
Marcus Boerger
28dd1f5f5e
- MFH Add 'help commands' support
2008-05-31 20:24:34 +00:00
Marcus Boerger
631484e2c7
- Add phar command as installable command
2008-05-31 20:02:57 +00:00
Marcus Boerger
aa4e898fe5
- Add version comand
2008-05-31 18:40:05 +00:00
Marcus Boerger
1debfd2a15
- Add version comand
2008-05-31 16:40:55 +00:00
Marcus Boerger
8010892bf0
- MFH Fix function names after they have been refactored
2008-05-31 15:53:16 +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
Steph Fox
51967b91d5
"We shouldn't need a full path to the mount"
...
- Fixed under Windows, cleaned up test
2008-05-24 13:13:47 +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
Felipe Pena
e1bfc452d3
- Fix build (ZTS)
2008-05-21 22:52:30 +00:00
Greg Beaver
1f661c81c4
fix offset detection in tar files
2008-05-21 22:00:43 +00:00
Greg Beaver
79ae1c7273
fix convertTo\*() for same-named archives with no files
2008-05-21 20:24:40 +00:00
Greg Beaver
07d6758c86
relax conversion, so that if a phar has no files, we can convert it to another format without changing the extension
2008-05-20 03:56:35 +00:00
Greg Beaver
0800b3b159
fix memleak, add test for previous segfault fix
2008-05-18 23:41:08 +00:00
Greg Beaver
b149e8c0fa
fix segfault, test coming shortly
2008-05-18 23:11:24 +00:00
Steph Fox
53fd21de33
- Keep 5_3 stub and creation files in sync with what I have in CVS HEAD
...
(MFB will likely be tomorrow now)
2008-05-18 20:52:34 +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
Greg Beaver
d35f27b896
fix test (again)
2008-05-17 20:04:06 +00:00
Greg Beaver
57b3bba46e
cosmetics
2008-05-16 00:11:42 +00:00
Greg Beaver
a5ec4d5f2b
as discussed on internals, enable phar by default for testing purposes.
...
Phar is enabled as a shared extension by default in order to allow zlib/bz2 to be built shared. If phar is statically built,
both zlib and bz2 must be statically built in order for phar to use them, so default compile as shared is much more flexible
2008-05-16 00:01:56 +00:00
Greg Beaver
719beb79d4
add full metadata support for tar-based archives and test
2008-05-15 23:46:29 +00:00
Greg Beaver
de5aaaa74c
fix potentially major security hole: modification/creation of files in .phar directory enabled in many locations
...
which then allows easy creation of tar/zip-based phar archives with a simple rename even when phar.readonly=1. Plug the hole very tightly, allowing read access to
files, and also excluding them from opendir() output
2008-05-15 16:09:01 +00:00
Greg Beaver
8cc335a0da
make test OS-agnostic
2008-05-15 14:01:30 +00:00
Steph Fox
93183728d2
- Fix test, add a couple of new ones
...
@Greg: it seems we covered it already ;)
2008-05-15 12:37:45 +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
Felipe Pena
6552d91743
- Fixed tests (added default_charset=)
2008-05-13 19:17:17 +00:00
Greg Beaver
9b5b694c92
fix test
2008-05-13 18:06:55 +00:00
Felipe Pena
613f2d2afc
- Added SKIPIF
2008-05-13 14:49:06 +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
SVN Migration
0e5d551a56
This commit was manufactured by cvs2svn to create branch 'PHP_5_3'.
2007-09-26 15:44:16 +00:00