Greg Beaver
64cb8c8111
fix conflict on win32 if phar compiled statically
2008-01-12 16:18:26 +00:00
Greg Beaver
9bcbbce5bf
add definitions for MAX_WBITS in case it isn't defined
2008-01-12 16:15:17 +00:00
Greg Beaver
4df43510b9
make zip optional
2008-01-12 05:17:12 +00:00
Greg Beaver
e9ee7dbfc5
fix compile on windows
...
remove internal libzip
add required dep on zip (will make optional in a few minutes)
2008-01-12 04:32:19 +00:00
Greg Beaver
67a15e332f
add missing defines, s/filename_len/filename_length/ (thanks steph) - now over to the windows box and debug this properly
2008-01-12 02:13:52 +00:00
Greg Beaver
36f3d80779
stupid windows doesn't allow varargs macros, so remove it. remove unused variable
2008-01-11 07:39:02 +00:00
Greg Beaver
aae1442ee3
update package.xml
2008-01-11 07:33:32 +00:00
Greg Beaver
8fb4205a8d
add Phar::interceptFileFuncs()
...
To intercept fopen(), file_get_contents(), opendir(), and all the stat-based functions so that
code like "if (is_readable('./config.inc.php'))" actually works inside of a phar
[DOC]
2008-01-11 07:30:03 +00:00
Greg Beaver
a38e4ff9a7
always mung PATH_INFO and PATH_TRANSLATED, fix segfault if tar-based phar has no stub
2008-01-11 02:52:13 +00:00
Greg Beaver
7e65f56264
MAPPHAR_ALLOC_FILE slipped in there somehow
2008-01-10 22:05:30 +00:00
Greg Beaver
74df58d255
fix tsrm build, fix various problems with initialization and zlib/bz2-compressed phars
2008-01-10 21:21:38 +00:00
Greg Beaver
ab4c2caf4b
add interception of is_dir(), file_exists() and file_get_contents() - will make these optional shortly
2008-01-10 15:13:00 +00:00
Greg Beaver
aeda51223c
update package.xml
2008-01-09 08:49:58 +00:00
Greg Beaver
7def324a80
new tests for bz2-compressed tar or phar-based phars (wow, worked on first try, how about that)
2008-01-09 08:48:56 +00:00
Greg Beaver
21ab2ca8e9
fix gzipped phars in phar file format, add test
2008-01-09 08:45:00 +00:00
Greg Beaver
f6b16061d1
implement whole-file compression of phars for phar/tar-based phars
...
still not 100% working, add failing test
add Phar::isCompressed(), which returns either 0, Phar::GZ, or Phar::BZ2
[DOC]
2008-01-09 07:09:04 +00:00
Greg Beaver
59da946283
add tests to package.xml, note new empty directory feature
2008-01-09 03:53:42 +00:00
Greg Beaver
6961da0811
add tests for directory creation and management for tar and zip-based phars, add isPhar() to phar-based test
...
to confirm it is indeed a phar-based archive
2008-01-09 03:51:38 +00:00
Greg Beaver
abde85c420
add rmdir() support, add rmdir to dir test
...
fix *extremely* ancient problem where phar_wrapper_stat always returned success indicating the file existed
rename phar_destroy_manifest to phar_destroy_manifest_entry
2008-01-09 03:47:22 +00:00
Greg Beaver
9f5b3a229f
fix empty directories in phar, add test
2008-01-09 00:58:37 +00:00
Greg Beaver
1a3624494e
implement mkdir (compiles, not yet tested), support for empty directories in phar (not yet tested)
...
revert last commit of efree(), it's necessary.
2008-01-08 22:14:16 +00:00
Greg Beaver
70ce6b77d0
remove invalid free if opening a phar file in plain_map fails
2008-01-08 21:40:48 +00:00
Greg Beaver
88bdd12803
update package.xml so this can be installed
2008-01-08 20:36:32 +00:00
Greg Beaver
4bce48417b
split stream file handlers into stream.c and directory handlers into dirstream.c
2008-01-08 20:31:54 +00:00
Greg Beaver
63adb98f78
split out zip functions
2008-01-08 19:40:23 +00:00
Greg Beaver
b93b48663d
complete set of new tests for zip-based phars (need to test compression for zip-based phars)
...
fix a whole bunch of zip-related bugs
tar tests need some naming
add phar information to error messages, fix existing tests to reflect this
2008-01-08 07:08:46 +00:00
Greg Beaver
0c346d9aec
add tar-based to 2 tests
2008-01-07 22:22:27 +00:00
Greg Beaver
36efc2a907
eliminate potential double-free of alias
...
major improvement of zip/tar-based phar stub execution, now __FILE__ says it is the phar, and not phar/.phar/stub.php,
so that the same stub can be used for phar or tar/zip-based phars
ridiculous speedup of rename() within a phar (something like 1000%)
last of the tar-based phar fixes
new tests for tar-based phars, fix existing tests to use new format of __FILE__
2008-01-07 22:21:10 +00:00
Greg Beaver
e78819fc01
new tests
2008-01-07 18:07:10 +00:00
Greg Beaver
5767e570b4
make test OS-agnostic
2008-01-07 18:05:23 +00:00
Greg Beaver
d9d91f424b
fp must be nulled on every write also when == phar->fp or we get stale fp and problems. add new test that unearthed this problem
2008-01-07 17:58:31 +00:00
Greg Beaver
4a59f700f1
add tar-based to test names
2008-01-07 17:41:30 +00:00
Greg Beaver
b18b960e17
new tests
2008-01-07 17:40:43 +00:00
Greg Beaver
71f6ae0be5
fix segfault (now all existing tests pass
2008-01-07 17:31:53 +00:00
Greg Beaver
ed312a7a05
fix segfault (duh, can't free something that was not initialized)
2008-01-07 17:28:45 +00:00
Greg Beaver
3dca799fbb
fix extension detection for aliases with no extension
2008-01-07 17:18:41 +00:00
Greg Beaver
9e179e4b93
fix test
2008-01-07 05:46:12 +00:00
Greg Beaver
8a46146f37
fix stat of directory in tar/zip
...
improve phar recognition of tar/zip-based phars in phar_compile_file
fix segfault in Phar::webPhar() with invalid redirect
add Phar->isTar()/isZip()/isPhar() to determine internal file format
fix creation of tar-based phars from filename in some circumstances
fix read of corrupted file contents from a tar if the tar had been opened readonly and then modified
ensure directories are marked with is_dir in tar file format entries
copy fp_refcount logic into phar_tar_flush() from phar_flush()
fix segfault when flushing a tar with a new stub/alias
2008-01-07 05:41:09 +00:00
Greg Beaver
ff1c8b2beb
new tests for tar format
2008-01-07 05:35:18 +00:00
Greg Beaver
826e98be83
eliminated memleak, now to make it recognize "dir" as a directory
2008-01-06 05:28:27 +00:00
Greg Beaver
99922cb729
fix typo in phar.c if bz2 is disabled
2008-01-06 05:16:20 +00:00
Greg Beaver
0f94226b71
new test, exposes some memleaks, but not yet sure where they are (done for today)
2008-01-05 23:26:24 +00:00
Greg Beaver
632a633154
fix segfault, add separate tar test for readonly=0 on corrupted tar
2008-01-05 23:02:23 +00:00
Greg Beaver
bd0d9e8de3
remove mung server list hash destroy, this is done in shutdown
2008-01-05 22:48:06 +00:00
Greg Beaver
2fa568b7b0
do not attempt to create a new phar if a file exists and is corrupted or is not a phar archive,
...
i.e. require a clean slate - a non-existent file or a valid phar archive - to muck around with phar contents
add the first tar-based phar test
2008-01-05 22:46:54 +00:00
Greg Beaver
ec0cd27f0d
modify test to ensure that query string is preserved when munging server vars
2008-01-05 22:04:58 +00:00
Greg Beaver
2410cc96b6
complete tests for Phar::mungServer
2008-01-05 22:02:33 +00:00
Greg Beaver
efc22a3726
new tests, fix mime type overrides (all web front controller primary features are now tested and working for regular phar files)
2008-01-05 06:14:43 +00:00
Greg Beaver
e864f512bb
new test, free resources on error in webPhar() (thanks new test\!)
2008-01-05 05:47:47 +00:00
Greg Beaver
dd11d4f64e
new test
2008-01-05 05:12:44 +00:00