Greg Beaver
07e36f5cad
increase code coverage further
2008-04-14 16:10:58 +00:00
Greg Beaver
e7cbf4ddfe
add error message on attempt to rmdir/mkdir 'phar://', add to test
2008-04-14 16:04:11 +00:00
Greg Beaver
2c0e0e1a96
update tests to ensure all temp files are erased, and to current error messages
2008-04-14 15:58:12 +00:00
Greg Beaver
61a9b7d8ee
increase code coverage slightly
2008-04-14 15:52:57 +00:00
Greg Beaver
dbf43f5e0d
add test for mkdir() of sub-directory of existing file, and restore the removed free()s with an is_temp_dir test
2008-04-14 15:48:25 +00:00
Greg Beaver
4b5079f4b7
increase test coverage of phar_wrapper_mkdir, fix segfault when mkdir() on existing directory
2008-04-14 15:46:06 +00:00
Greg Beaver
2277396fe3
fix edge case where a new phar is created via mkdir(), add to dir.phpt test
2008-04-14 15:21:41 +00:00
Greg Beaver
b8865a63ae
another attempt at fixing mac OS X compile, remove unused obsolete code
2008-04-14 04:47:34 +00:00
Greg Beaver
2ed2ae7e53
missing from previous commit to remove stat from opendir wrapper ops
2008-04-14 04:47:00 +00:00
Greg Beaver
e69ea0731d
more test coverage and fixes from increased coverage to opendir(). dir.phpt fails, but for wrong reasons (bug uncovered that needs fix)
2008-04-14 04:44:04 +00:00
Greg Beaver
aee1be851e
add fstat to 027 test. Remove phar_dir_stat, stat should not be possible on a dir handle
2008-04-13 23:57:44 +00:00
Greg Beaver
61f439c1ad
add to 027 test (for code coverage) of fwrite on dir handle
2008-04-13 23:48:46 +00:00
Greg Beaver
653b67b34f
minor optimization
2008-04-13 23:47:15 +00:00
Greg Beaver
6f6a6dcb0e
100% code coverage for dir handle seeking, remove error log (not used in dir seeking, causes leak), update 027 test to have seeking test
2008-04-13 23:46:15 +00:00
Greg Beaver
c22b6a76ed
add test for stat interception, fix stat interception
2008-04-13 23:33:31 +00:00
Greg Beaver
dc4da5e2f9
make tests php version-agnostic with regards to stream errors
2008-04-13 21:31:46 +00:00
Greg Beaver
02bbb72f6d
add test for fopen interception, fix fopen interception
2008-04-13 20:46:45 +00:00
Greg Beaver
24d5595a8f
add test for file_get_contents interception, fix file_get_contents interception
2008-04-13 19:36:33 +00:00
Greg Beaver
72daaf1d44
add test for opendir, fix bugs found
2008-04-12 22:21:29 +00:00
Greg Beaver
0814b2df09
fix build if SPL is disabled
2008-04-12 21:43:39 +00:00
Greg Beaver
b0f281b159
restore Phar->compress/decompress() to simplify $phar->convertToExecutable(NULL, Phar::GZ) to $phar->compress(Phar::GZ)
...
[DOC]
2008-04-11 13:41:59 +00:00
Greg Beaver
8f28d19d4e
cosmetics, extra space
2008-04-11 13:26:36 +00:00
Greg Beaver
3493fb6561
combine PharFileInfo->setCompressedGZ/setCompressedBZIP2 into compress() with parameter Phar::GZ or Phar::BZ2
...
use ZEND_ACC_PUBLIC in PharFileInfo definitions, to be consistent
[DOC]
2008-04-11 13:26:03 +00:00
Greg Beaver
ab34fcac05
merge PharFileInfo->isCompressed/isCompressedGZ/isCompressedBZIP2 by adding an
...
optional parameter to isCompressed for testing specific compression algorithm
[DOC]
2008-04-11 13:07:14 +00:00
Greg Beaver
c07a07ea68
change PharFileInfo->setUncompressed to decompress
...
[DOC]
2008-04-11 12:56:53 +00:00
Greg Beaver
c0d82e966f
refactor compress/convertToTar/convertToPhar/convertToZip/convertToExecutable/convertToData
...
into 2 methods:
convertToExecutable/convertToData. Both methods accept 3 optional parameters
1 archive type, Phar::PHAR, Phar::TAR, or Phar::ZIP
2 compression Phar::NONE, Phar::GZ, or Phar::BZ2
3 file extension. Default is <format>.<compression> where .phar.tar is executable .tar
convertToExecutable always returns a Phar object
convertToData always returns a PharData object
also added Phar::PHAR, Phar::TAR, and Phar::ZIP class constants
[DOC]
2008-04-11 04:20:15 +00:00
Greg Beaver
f0ff6fb109
s/getContents/getContent/
2008-04-10 13:41:29 +00:00
Greg Beaver
61b5fc48e3
re-factor all-file compression. Remove compressAllFilesGZ/compressAllFilesBZ2 in favor of
...
unifying compressFiles which accepts Phar::GZ or Phar::BZ2 as argument. rename uncompressAllFiles to decompressFiles
2008-04-10 13:40:26 +00:00
Greg Beaver
06df9bff83
add Phar->isWritable() for detecting whether a phar archive can be written to based on phar.readonly combined with actual file permissions
...
[DOC]
2008-04-10 03:32:10 +00:00
Greg Beaver
1c3097fcbe
make built-in SplFileInfo->isWriteable() work for PharFileInfo as well, by ensuring phar->is_writeable is set/reset when phar.readonly is changed
2008-04-10 03:12:08 +00:00
Greg Beaver
abfc228f36
add addFile/addFromString/addEmptyDir. API is identical to ext/zip
...
[DOC]
2008-04-09 19:23:31 +00:00
Greg Beaver
e56beeeefd
add PharFileInfo->getContents() to retrieve file contents
...
[DOC]
2008-04-09 18:12:41 +00:00
Steph Fox
c2a8b95137
Bump dev version ready for any new changes
2008-04-01 17:59:00 +00:00
Greg Beaver
54cfa7437c
correct last commit (comparison of "nu" in wrong order)
2008-03-28 21:03:29 +00:00
Greg Beaver
6ff19e08f4
fix Bug #13518 : comparision of a char* pointer with a string literal
2008-03-27 21:31:27 +00:00
Marcus Boerger
5b3560f069
- Ifdef out code that has if(0) and doesn't compile anyway
2008-03-27 12:54:23 +00:00
Greg Beaver
a090d45251
fix build on PHP 5.2, prepare release of 2.0.0a2
2008-03-27 06:38:53 +00:00
Greg Beaver
0084937b10
turns out it is now tomorrow, so update package.xml
2008-03-26 05:20:43 +00:00
Greg Beaver
085bb5cdd6
prepare release of 2.0.0a1
2008-03-26 03:55:37 +00:00
Marcus Boerger
7202434956
- Add documentation
2008-03-24 12:53:28 +00:00
Greg Beaver
1bda8cf708
a subtle plea for help to Marcus...
2008-03-24 03:05:24 +00:00
Greg Beaver
2e9fca4f0b
fix read/write for PharData object, update tests to current API
2008-03-24 03:01:31 +00:00
Greg Beaver
b4b890cb8f
check for invalid aliases, add tests for this and direct setting of stub/alias
2008-03-24 01:33:30 +00:00
Greg Beaver
cea3169ca6
prevent direct setting of stub or alias in tar/zip
2008-03-24 01:18:50 +00:00
Greg Beaver
7493b9dfb6
update TODO
2008-03-23 22:51:00 +00:00
Greg Beaver
95eeee9156
not all tests have been converted over to the new API, but it works
...
conversion is now split into 3 separate methods
1\) convertToZip\(\) convertToTar\(\) and convertToPhar\(\) exclusively change file format
2\) compress\(\) sets compression, accepting Phar::GZ, Phar::BZ2, or Phar::NONE
3\) convertToExecutable\(\) allows stub creation in tar/zip, convertToData\(\) prevents it
all methods return either Phar or PharData objects, allowing fluent interface.
only 1 test has been converted to the new format, but the API works
2008-03-23 22:42:45 +00:00
Greg Beaver
cac70206f2
add Phar->getPath() for retrieving the full path to the phar archive.
...
this is useful for renaming and also always returns the realpath()
2008-03-23 19:03:15 +00:00
Greg Beaver
ca92928b48
fix param parsing for Phar::running() to be optional
...
# this is the last bug for ZF app - it now works!
2008-03-23 17:36:57 +00:00
Marcus Boerger
69c71f703e
- Add .cvsignore
2008-03-23 16:51:52 +00:00
Greg Beaver
27ca45f898
don't disallow opening .tar/.zip files as Phar object if readonly is disabled, the whole idea is to be able to
...
add crap including an automatic stub or explicit stub
2008-03-23 06:59:59 +00:00
Greg Beaver
39c4f38c27
rename Phar::getRunningPhar\(\) to Phar::running\(\) and by default return the full
...
phar url, if optional parameter is false, return the path to the phar on disk. Fix a double free on failed mount
2008-03-23 06:00:31 +00:00
Greg Beaver
eea82226c1
fix potential segfault by misuse of phar_find_in_include_path
2008-03-23 05:39:58 +00:00
Greg Beaver
62ed0adcca
fix memleak found by valgrind
2008-03-23 00:05:53 +00:00
Greg Beaver
15f8facded
fix Bug #13110 : using rewrite parameter to webPhar causes memory error
2008-03-22 22:56:04 +00:00
Greg Beaver
bf081ec2a5
add failing test for bug #13110
2008-03-22 22:44:21 +00:00
Greg Beaver
6cef8da201
move all blah++ to ++blah where possible for those with crapass compilers
2008-03-22 22:11:49 +00:00
Greg Beaver
1b05ce68d7
fix all frontcontroller tests - cgi sapi was not being detected, only fastcgi
2008-03-22 22:04:21 +00:00
Greg Beaver
01e5bbbaf5
fix memleak in php 5.2, simplify code slightly
2008-03-22 21:54:55 +00:00
Steph Fox
1feb9b581a
Satisfy Greg's inertia
2008-03-22 21:54:15 +00:00
Greg Beaver
6be582b537
fix test
2008-03-22 21:53:11 +00:00
Steph Fox
c0619c6523
Make versioning more standard
2008-03-22 17:09:24 +00:00
Marcus Boerger
f022bca16b
- Fix build for PHP < 5.3
2008-03-22 16:33:33 +00:00
Marcus Boerger
cc3ee90dc5
- Update and include 'channel://pear.php.net/PHP_Archive-0.11.3'
2008-03-22 01:52:12 +00:00
Marcus Boerger
eb0f0e36e1
- Still missed one debug output
2008-03-22 01:48:45 +00:00
Marcus Boerger
1b286e1475
- If multiple possible exts are found use the first one.
...
This fixes an issue with: phar.phar info -f install-pear-nozlib.phar
because that archive contains a .tar file
2008-03-22 00:15:45 +00:00
Marcus Boerger
e08556eb2e
- Constify
2008-03-22 00:11:43 +00:00
Marcus Boerger
4d8073056c
- Don't throw exception for uninitialized instance
2008-03-21 23:56:52 +00:00
Marcus Boerger
efc1c1ea99
- Damn forgot to remove the debug code
2008-03-21 23:31:31 +00:00
Marcus Boerger
6d3bb76302
- Fix stub/hashbang generation
2008-03-21 23:22:18 +00:00
Marcus Boerger
9bfa3909bf
- Fix error message
2008-03-21 23:07:44 +00:00
Greg Beaver
891067c975
fix the memleak - but this breaks the \*compressAllFiles\*() methods because of fatal flaw
...
in renaming implementation - see pecl-dev email for details
2008-03-21 19:54:07 +00:00
Greg Beaver
3fcc6565b7
with stream wrappers in include_path, and after marcus's last fix, only 1 failing test (tar/tar_makegz.phpt)
...
add mounted file/dir to url stat
2008-03-21 18:50:22 +00:00
Steph Fox
c11bcd5414
Deliberate test breakage (no idea how many) in an attempt to see where the valgrind 'bad news' is coming from on gcov.php.net.
2008-03-21 05:22:10 +00:00
Steph Fox
f0fdef1b64
Cosmetics (RC data)
2008-03-21 05:05:23 +00:00
Greg Beaver
d02dff1363
save work - sandbox is completely f**ed up, have to rm -rf and start again
...
This *SHOULD* fix issues, but I can't get run-tests to work reliably to be absolutely sure
2008-03-20 23:59:07 +00:00
Antony Dovgal
044f39293b
fix 5_3 ZTS build
2008-03-17 08:55:56 +00:00
Marcus Boerger
a1cbab9142
- Rewrite scanner to be based on re2c instead of flex
...
The full patch is available as:
http://php.net/~helly/php-re2c-5.3-20080316.diff.txt
This is against php-re2c repository version 98
An older patch against version 97 is available under:
http://php.net/~helly/php-re2c-97-20080316.diff.txt
2008-03-16 21:06:54 +00:00
Marcus Boerger
58f7de98f4
- Fix build
2008-03-13 19:43:14 +00:00
Antony Dovgal
983ff657ba
fix zts build
2008-03-13 09:57:49 +00:00
Greg Beaver
0262e844c4
implement full support and usage of phar stream in include_path, for both 5.2 and 5.3.
...
5.3 code expects the proposed patch for stream wrapper in include_path to be committed
5.2 code only supports phar stream wrapper in include_path.
this is a 2-step process. After this, more magic, particularly in funcinterceptors.c will be
converted to use phar_resolve_path, which is far safer than the current implementation.
this needs windows and 5.2 testing unix/windows
2008-03-12 03:55:12 +00:00
Greg Beaver
70e30449bb
fix leaked var, fixes all tests for me
2008-03-12 03:12:35 +00:00
Steph Fox
54615ca871
Fix for crash caused by unhappy c&p.
...
@Greg: this still doesn't fix bug #13353... not sure why
2008-03-10 19:11:16 +00:00
Steph Fox
3ee08069a6
Rename archive during compressAllFiles*()
...
Note: this only works for tar archives at present pending a fix for bug #13352
2008-03-09 04:46:16 +00:00
Greg Beaver
f0b329da20
pack tar structs so speed optimizations don't add extra bytes to the header
...
# Steph: try this and see if it fixes Bug #13353
2008-03-09 04:17:20 +00:00
Steph Fox
410c1584c6
update TODO
2008-03-07 14:59:47 +00:00
Steph Fox
5e4b47fa87
fix tests
2008-03-03 19:36:09 +00:00
Steph Fox
8343d7c139
- A bit more work on PharData creation/conversion.
...
- If readonly=0, why not $phardata->convertToPhar()?
- Known issue with directories creating 'as-file' copies within the archive (all formats)
@Greg/Marcus/Tony: This passes all tests on my box, 5.2/5.3/release_ts/debug_ts, and I can't find any more memleaks. Obviously this is too good to be true, so if conversion is still messy elsewhere please feel free to fix, or bug and assign to me.
2008-03-03 08:41:15 +00:00
Steph Fox
1cdade809b
Going back to square one ("it works on Scott's box" - OSX 10.5, gcc version 4.0.1 (Apple Inc. build 5465)). Thanks ScottMac, David C and Philip for testing...
...
Possibly a gcc version issue?
2008-03-02 00:42:29 +00:00
Steph Fox
5c2be9551b
Should work on all platforms now. (Testing.)
2008-03-01 22:38:10 +00:00
Steph Fox
d4cf7e47f6
Right problem, wrong solution. Also missed an '= 1' , thanks Marcus
2008-03-01 22:28:33 +00:00
Steph Fox
f96cd8fbc3
Tested this time. All's fine here, MacOSX still complaining @ present.
2008-03-01 22:04:19 +00:00
Steph Fox
66d3abac02
Untested. Killing remaining warnings under MacOSX (thanks again Philip).
2008-03-01 21:44:32 +00:00
Steph Fox
15fefd3692
All tests pass here now. Thanks Philip for reporting compiler errors that don't show on my setup.
2008-03-01 21:31:03 +00:00
Antony Dovgal
cd858fe243
fix segfault, comment out useless line
2008-02-29 13:56:46 +00:00
Steph Fox
ad0a7679ac
Kill an unnecessary bit of internal docu and add 'compression' to the TODO
2008-02-28 02:09:49 +00:00
Steph Fox
413df68971
Forgot to return... not that I understand this stuff...
2008-02-28 01:16:43 +00:00
Steph Fox
9e61358eda
Allow alias for phar.tar/phar.zip
2008-02-28 01:08:34 +00:00
Steph Fox
dd5196cf01
Update TODO
2008-02-27 21:41:59 +00:00
Steph Fox
001ffec19f
Initial support for PharData object.
...
Note: two tests currently fail. IMHO we should be throwing E_ERROR on encountering a corrupted archive, not trying to throw a trail of exceptions...
New tests still to be written, not all functionality is in place yet.
2008-02-27 21:34:26 +00:00
Steph Fox
6a63b3921e
Update protos.
2008-02-25 16:27:23 +00:00
Steph Fox
eaef0319d2
Make it possible to read the TODO file on a laptop :)
2008-02-25 16:15:57 +00:00
Steph Fox
4b849dcac6
Lunchbreak III
2008-02-25 15:44:21 +00:00
Steph Fox
d712008ba7
Lunchbreak II
2008-02-25 15:43:14 +00:00
Steph Fox
303b72fed3
Lunchbreak.
2008-02-25 15:41:47 +00:00
Steph Fox
f5ab70a3b9
Update reflection info
2008-02-25 12:21:19 +00:00
Steph Fox
1a3bf3619f
Leftover from experimenting with zend_hash_del...
2008-02-25 11:37:08 +00:00
Greg Beaver
2d36a89d83
update TODO
2008-02-25 04:49:19 +00:00
Greg Beaver
0503140256
add little fix to phar_mount_entry to ensure path separators are unix-based on windows
2008-02-25 04:30:55 +00:00
Greg Beaver
ec7f89fe79
implement Phar::mount() for directories, add test
...
# opendir not yet implemented for mounted directories
2008-02-25 04:23:36 +00:00
Greg Beaver
b5c765f942
fix tests
2008-02-24 23:48:19 +00:00
Greg Beaver
d108a03553
fix --CLEAN--
2008-02-24 23:47:13 +00:00
Greg Beaver
1ea58d0c04
fix test
2008-02-24 23:44:12 +00:00
Greg Beaver
a5a246e876
add missing declaration of phar_rename_archive
2008-02-24 23:40:14 +00:00
Steph Fox
8513db73bb
A bunch of stuff to do with filename conversion. Hopefully it won't sink the ship.
2008-02-24 22:29:06 +00:00
Steph Fox
89842172e3
Updating tests. 100% pass rate here now - not sure about the rest of the world just yet (sorry Marcus).
2008-02-24 19:34:05 +00:00
Greg Beaver
a8d0c64662
fix faulty & in check for creation of phar manifest
2008-02-23 21:33:46 +00:00
Greg Beaver
588f0660e9
free mounted_dirs on error to avoid memleak
2008-02-23 21:29:57 +00:00
Greg Beaver
f6862d4a33
fix unfreed value found in tempmanifest1.phpt
2008-02-23 19:44:51 +00:00
Greg Beaver
b3a266fca8
fix double error (this fixes frontcontroller22.phpt)
2008-02-23 19:26:18 +00:00
Greg Beaver
dc43219add
down to 1 failing zip test with this commit
2008-02-23 18:28:36 +00:00
Greg Beaver
94f39ee501
fix unfreed value
2008-02-23 18:26:20 +00:00
Greg Beaver
a0e5e40663
port same fix from tar.c to zip.c
2008-02-23 18:24:41 +00:00
Greg Beaver
2eb4db8d79
best fix for the bad logic in tar.c, now all tests pass that should
2008-02-23 18:17:48 +00:00
Greg Beaver
18444e3b5a
revert previous changes to tar.c, fix incorrect user_stub == dummy check, now things work that should
2008-02-23 18:14:44 +00:00
Greg Beaver
a561228843
revert previous changes to tar.c, fix incorrect user_stub == dummy check, now things work that should
2008-02-23 18:09:31 +00:00
Greg Beaver
0c647b5c1c
fix test, missing phar.readonly=0 --INI-- section
2008-02-23 18:08:54 +00:00
Greg Beaver
9d9bd2715a
that !zend_hash_exists should be zend_hash_exists
2008-02-23 15:07:02 +00:00
Greg Beaver
a1828999c5
fix unfreed stuff when adding default stub
2008-02-23 15:05:05 +00:00
Greg Beaver
0e6457b2cf
free spprintf'ed stub after using it
2008-02-23 14:59:52 +00:00
Greg Beaver
0996c1ffb5
fix test - needed phar.readonly=0 INI section
2008-02-23 14:57:59 +00:00
Marcus Boerger
2f29db8333
- Fix logic
2008-02-23 13:04:59 +00:00
Steph Fox
b2dbfbc321
As the line below says - there shouldn't be an exception here.
2008-02-21 18:51:54 +00:00
Steph Fox
20836262c8
Updated wrong expectation (different stub).
2008-02-21 18:44:06 +00:00
Steph Fox
9a1e7ee88b
Update tests to accommodate those two extra bytes
2008-02-21 15:20:46 +00:00
Steph Fox
cf9bbcc2e6
Satisfy the pedants :)
2008-02-21 14:48:41 +00:00
Steph Fox
e8e85afbcc
Updating conversion tests to check for more conversion parameters than one. Note that these will all fail against current CVS.
...
@Greg: We need to clarify conversion policy across the board.
2008-02-21 14:45:44 +00:00
Steph Fox
eb7565451d
s/zip/tar
2008-02-21 14:27:19 +00:00
Steph Fox
6cc2426ff1
A much better solution for setDefaultStub(). The convertTo*() fixes should be trivial now.
2008-02-21 00:24:38 +00:00
Steph Fox
15158bf49d
Fix filenames
2008-02-20 19:26:40 +00:00
Steph Fox
d8bebd7259
Implement $phar->setDefaultStub()
...
Note that Phar::createDefaultStub() still exists at this point
2008-02-20 19:22:12 +00:00
Steph Fox
9752739cf2
Let's have reflection reflect reality...
2008-02-20 17:58:56 +00:00
Steph Fox
3285ceba7e
Take some of the pain out of stub rewrites. (Full default stub is tested elsewhere.)
2008-02-20 14:28:49 +00:00
Steph Fox
8febc7fd54
Fix 'clean' sections
2008-02-20 13:33:00 +00:00
Steph Fox
6306029051
Move supporting files to their own directory (toplevel tests)
2008-02-20 13:11:40 +00:00
Steph Fox
89217ae543
Fix clean section
2008-02-19 03:24:18 +00:00
Steph Fox
76b02cca40
Update tests to match new stub length
2008-02-19 03:12:11 +00:00
Steph Fox
7bb00d024e
Allow createDefaultStub() to accept 0, 1 or 2 parameters. Default for both CLI and web is 'index.php'.
...
@Greg: this breaks a handful of tests due to the change in stub.h - will fix in a bit. The only one that's interesting is you can't do strlen(Phar::createDefaultStub()) and expect anything other than an exception now.
2008-02-18 21:45:02 +00:00
Steph Fox
335e57e443
Fix ZTS build (again), kill unused var
2008-02-18 04:51:04 +00:00
Greg Beaver
ba9fcf62fc
add initial support for hashing mounted directories. Actual matching of mounted directories is not yet supported.
2008-02-18 04:45:42 +00:00
Steph Fox
87626d56d2
Fix ZTS build *nicely*
2008-02-18 04:42:04 +00:00
Greg Beaver
6798dc44ed
add Phar::mount() to manually mount a file or directory
...
# TODO: implement directory mounting. Involves scanning paths that are not exact matches for a partial match.
# this also means maintaining a per-phar hash of mounted directories for quick matching
2008-02-18 04:32:50 +00:00
Greg Beaver
9c62ef1124
add externally parsed files to temporary manifest (this will be made
...
optional and must be explicitly enabled per-phar)
2008-02-18 03:37:51 +00:00
Steph Fox
6acac494ab
Fix ZTS build
2008-02-18 00:46:07 +00:00
Greg Beaver
54ff8c3a8f
begin work on ability to mount files from external locations as if they were inside of a phar archive
2008-02-15 05:01:40 +00:00
Greg Beaver
f72ce59e95
remove refcount hack to workaround zlib memleak fixed in zlib
...
intercepted file functions now fall through if the file is not found in the phar, this allows access to external libraries
actually use include_path for locating files for inclusion and in file_get_contents/fopen when include_path is requested.
This allows applications like Zend Framework MVC implementation to function properly
2008-02-13 15:00:31 +00:00
Steph Fox
2a5f1ba3a6
Add missing SKIPIF, rename vars for readability
2008-02-12 16:55:50 +00:00
Steph Fox
2ad96985c7
- it helps if you add the new files :)
2008-02-12 16:42:35 +00:00
Steph Fox
85e641ebb4
Make tests/tar in line with tests/zip.
2008-02-12 16:39:59 +00:00
Greg Beaver
592635d0c0
fix TSRM build
2008-02-12 05:38:01 +00:00
Greg Beaver
97484e0b95
update TODO to reflect must-haves prior to 2.0
2008-02-12 05:36:02 +00:00
Greg Beaver
22d05677c1
fix test (all tests pass on unix now)
2008-02-12 05:30:59 +00:00
Greg Beaver
3234e78ca1
fix remaining broken tests broken by the addition of phar->fp closing
2008-02-12 05:28:06 +00:00
Greg Beaver
2f1ec934af
fix some of the failing tests due to non-reopened phar fp
2008-02-12 05:16:53 +00:00
Steph Fox
b1ed2e8059
There's a difference between 'BORKED' and 'FAILED'...
2008-02-11 21:05:47 +00:00
Steph Fox
ef46f3e3a2
Funnily enough those frontcontroller tests still pass here! Investigating...
2008-02-11 20:55:44 +00:00
Steph Fox
914c94d497
kill a couple of msvc warnings
2008-02-11 20:53:05 +00:00
Greg Beaver
ba002c5b9c
revert last commit to phar_object.c
...
fix open file pointers issue on windows
2008-02-11 17:13:18 +00:00
Greg Beaver
4c68617106
add destructor for Phar object to decrease refcount
2008-02-11 16:49:53 +00:00
Greg Beaver
d659ce7a0c
fix windows pathname issues
2008-02-11 07:33:20 +00:00
Greg Beaver
8cd58822c3
fix TSRM and 5.2 build
2008-02-11 06:58:56 +00:00
Greg Beaver
ca7ae5d190
update TODO
2008-02-11 06:54:46 +00:00
Greg Beaver
d388ec586f
move creation of phar archive to the point at which it is committed to disk, instead of
...
at the moment it is attempted access. (making some real progress now, all tests pass on unix)
2008-02-11 06:53:56 +00:00
Greg Beaver
de5238a3bc
minor refactoring to remove 1 call to zend_get_executed_filename()
2008-02-11 06:49:22 +00:00
Greg Beaver
1a6fb65c83
new test for special tar-based app and more iteration test
2008-02-11 06:47:26 +00:00
Greg Beaver
78e8eb3900
major refactoring of internal handling of aliases.
...
1) rename is_explicit_alias to is_temporary_alias for clarity and flip the value
2) fix setAlias so that it sets a permanent to-be-saved alias, and restores the old one on error
3) fix Phar constructor to work with sub-directories in RecursiveDirectoryIterator
2008-02-11 06:46:44 +00:00
Greg Beaver
3874e12ee5
fix 5.2 build
2008-02-11 04:48:58 +00:00
Greg Beaver
3ade59e537
update test phars
2008-02-11 01:07:53 +00:00
Antony Dovgal
6d9453aa91
add ifdefs and fix folding
2008-02-08 09:25:02 +00:00
Antony Dovgal
271e0394d7
fix 5_3 build
2008-02-08 09:21:24 +00:00
Greg Beaver
19df8a4d7f
fix issues in opendir() with empty directories within a phar archive, port filterparams fix to tar.c
2008-02-08 05:57:40 +00:00
Greg Beaver
15410a4f66
make maximum manifest size 100MB for phar archives, simple apps are hitting the 1 MB limit quite easily.
2008-02-08 05:56:26 +00:00
Greg Beaver
5b5c86df9f
better fix for double free - ensure that SEPARATE_ZVAL() inside
...
zlib_filter.c actually separates the zval, then we can zval_dtor() it
properly
2008-02-08 05:41:59 +00:00
Greg Beaver
4e42110f3e
remove test accidentally added
2008-02-08 05:08:18 +00:00
Greg Beaver
fa7a1779a1
remove unnecessary INIT_ZVAL(filterparams) that causes unfreed value
2008-02-08 05:05:13 +00:00
Greg Beaver
e3c64bd53b
fix memory leaks. There are some leaks in libz that I can't fix, but none triggered in the current tests
2008-02-08 04:26:41 +00:00
Greg Beaver
c31f04b5f3
SEPARATE_ZVAL does not work for this situation. We always want
...
to duplicate and copy, so do it manually and reset refcount to 1
2008-02-08 03:53:17 +00:00
Greg Beaver
a3c910739f
fix flipped logic
2008-02-08 01:08:02 +00:00
Greg Beaver
67a9fd8783
fix mem leaks
...
strip trailing slash if present in a directory entry. This code assumes that
tar_type is directory, as it must be to be a valid directory.
2008-02-08 01:06:12 +00:00
Greg Beaver
43f2638634
better fix for invalid mem access
2008-02-08 00:58:39 +00:00
Greg Beaver
7575b012f2
fix invalid read/write if strstr() returns NULL
2008-02-08 00:55:38 +00:00
Greg Beaver
e67c584348
[DOC]
...
refactor the $rewrites parameter in Phar::webPhar. Now it is a callback
that accepts the path requested. This callback should return the actual filename
requested as a string, or false to deny access as HTTP 403.
Also fix incorrect munging of SCRIPT_NAME variable in mungServer
More importantly, Phar::webPhar now finds the filename hidden in:
http://localhost/myphar.phar/internal/file.php/extra/stuff
as 'internal/file.php' in phar 'myphar.phar' with REQUEST_URI '/internal/file.php/extra/stuff'
this will allow pharring up apps that use REQUEST_URI for front controller stuff.
2008-02-07 23:42:03 +00:00
Antony Dovgal
a04bcdfcec
remove old code leftover causing problems
2008-02-07 08:45:43 +00:00
Greg Beaver
1cac0aa8e2
fix webPhar() in CGI sapi, update tests to reflect reality of how these ENV vars are passed
2008-02-07 04:24:58 +00:00
Greg Beaver
2b9a4279dd
fix logic of path redirection. always prepend index_php with "/" if it doesn't have it,
...
and then if path_info ends with "/" just use entry + 1
2008-02-02 05:20:37 +00:00
Greg Beaver
9af8b12b2b
move to in between BEGIN_EXTERN_C() block, to avoid breakage with C++ (i.e. windows)
...
# david, can you check on mac to be sure this doesn't break?
2008-02-01 22:23:37 +00:00
David Coallier
d4d8f3d412
- OSX "extern" compatibility fix.
2008-02-01 22:13:14 +00:00
Greg Beaver
47320359e9
remove unused variable, eliminate an invalid read reported by valgrind
2008-02-01 19:50:06 +00:00
Steph Fox
b5e8315e80
ws
2008-02-01 14:40:57 +00:00
Steph Fox
3e6d9e72d4
Generate newline at end of stub.h
2008-02-01 14:38:45 +00:00
Antony Dovgal
e493059f55
check for empty/null path
...
still some leaks are left
2008-02-01 11:36:45 +00:00
Antony Dovgal
addf32d7d9
we don't want to modify the pointer contents, we just want to change the pointer itself
2008-02-01 11:25:59 +00:00
Antony Dovgal
97c3dbaf56
this string should be freed later since path == free_path
2008-02-01 11:25:11 +00:00
Antony Dovgal
f6238ee664
fix compile warning (No newline at end of file)
2008-02-01 11:09:34 +00:00
Marcus Boerger
7d3758fa08
- SPL has been changed
2008-01-30 23:50:23 +00:00
Marcus Boerger
33dc86c435
- Fixed glob:// stream handling in (Recursive)DirectoryIterator.
2008-01-30 20:31:09 +00:00
Steph Fox
ed2785e2a5
OK so let's kill the bug-hider
2008-01-30 00:53:56 +00:00
Steph Fox
76640a615f
- One last tweak (so Phar and no-phar work the same again now)
...
- Bunch of test fixes
- Note: I added a silencer to the unlink() call in zip/tarmaker to avoid system warnings here. If this messes up tests elsewhere we'll need to re-think.
2008-01-29 11:58:27 +00:00
Steph Fox
182519877b
Job done.
2008-01-29 09:45:11 +00:00
Steph Fox
7e85b150a6
Rock'n'roll... just php includes to figure out now.
2008-01-29 07:10:22 +00:00
Steph Fox
a6abbfd55d
'It works on my box'.
...
Please test.
2008-01-28 21:23:02 +00:00
Greg Beaver
f4e4ad0cd1
fix PharFileInfo->setAlias (was wildly broken)
...
fix directory creation in zip archives
update zip tests to use phar to create the zip, and then copy to a new file
2008-01-28 20:18:15 +00:00
Steph Fox
618a29411d
Get rid of zip requirement in the last few tests
...
@Greg: zip/tarmaker.inc needs a rewrite
2008-01-28 16:49:28 +00:00
Steph Fox
975a1b87af
Get rid of zip requirement
2008-01-28 16:31:56 +00:00
Steph Fox
9fd5c0b438
- Moved phar_unixify_path_separators() to a single central point
...
- The last two VC 6 compiler warnings gone. Please test under *nix.
2008-01-28 14:39:17 +00:00
Greg Beaver
6cdabede4c
remove ext/zip dependency entirely, write better native zip support
...
re-organize, create util.c, move entry_info/archive_data/entry_data access methods to this file
refactor entry->fp, now this is abstracted with phar_get_efp() and phar_seek_efp(), fixes all weird dependency issues
permanently solve the "millions of file pointers" issue for read access. All compressed files are read into a single
temporary stream, and their constraints are controlled by the entry->fp abstraction
Improvements in this zip implementation over ext/zip:
* full read/write support for bzip2 compressed files
* much more efficient access for accessing only a few files within large zip files, as crc/header validation is
done just-in-time
* full stream support for opendir/rename/rmdir/mkdir as well as all of the other stream funcs
* full support for setting file perms via Phar::chmod(), stored as zip-standard extra field
* no problem with large zips and many open file pointers
# TODO: add big-endian system support for tar/zip file format headers, otherwise the implementation is complete
# TODO: test on windows and fix any windows-specific issues
# TODO: verify zips created work with unzip/winzip/windows explorer and so on
2008-01-28 08:52:08 +00:00
Steph Fox
6f95353e77
- Added is_writable() check on temp directory
...
- Regenerated stub and tests/nophar.phar
- Fixed tests
2008-01-26 00:12:00 +00:00
Steph Fox
ddc051cebe
- Rewrite stub to take up slightly less space
...
- Fix tests
- Test phars should probably be regenerated, although only one fails here currently (nophar.phar in web context)
2008-01-25 17:26:18 +00:00
Steph Fox
69afbc1099
"What helly said"
2008-01-25 16:05:26 +00:00
Steph Fox
61c3a60815
Make all possible build combinations work under doze (external zip library)
2008-01-25 15:00:24 +00:00
Greg Beaver
29c5c804d0
initial work on more efficient zip implementation, read support working, write not implemented yet
...
This implementation will support read/write of extra field headers, both zlib/bzip2 compression read/write
it will also delay header comparison/crc32 check until file open, making opening a single file
within the zip much more efficient for large zip files
it also uses emalloc/php streams and is therefore less likely to leak.
this code is not yet built in config.m4/config.w32
2008-01-23 23:19:03 +00:00
Greg Beaver
47a60c4f16
fix 2 tests, add phar.readonly checks to rmdir/mkdir
2008-01-22 20:24:52 +00:00
Greg Beaver
f51bf6118c
fix tests to match CVS
2008-01-22 05:26:38 +00:00
Greg Beaver
b2412c4568
fix problems found while documenting. Throw consistent exceptions, chmod is not allowed on
...
temporary directories, but is allowed on regular ones
allow uncompressAllFiles() to decompress a gzip/bzipped tar archive
fix some protos
2008-01-21 05:28:09 +00:00
Greg Beaver
117f5e2639
add web-based support for default stub, now phars written with webPhar() will work
...
out of the box regardless of server configuration with phar file format
split up stub.h strings into 2046 byte chunks because MS VC 6 is friggin stupid
2008-01-20 00:49:45 +00:00
Greg Beaver
34c1e6e112
s/1.3.0/2.0.0/
2008-01-19 20:13:31 +00:00
Greg Beaver
d5fd042872
bump 1.3.0 to 2.0.0, this is a big feature addition release
2008-01-19 19:51:14 +00:00
Greg Beaver
d7ff13cf9a
update package.xml
2008-01-19 18:39:49 +00:00
Greg Beaver
a5358c0725
bump API version if the created phar has directories in it, so that it won't load with older phar versions
2008-01-19 18:30:30 +00:00
Greg Beaver
d583fae0cc
add Phar::createDefaultStub(), which can take as an argument the filename
...
that should be loaded as a "bootstrap" for the phar archive
2008-01-19 04:26:22 +00:00
Nuno Lopes
dc84b8b767
fix gcov build
2008-01-18 20:12:45 +00:00
Greg Beaver
7540adf058
major improvement:
...
the new default stub allows creation of phars that run identically
1) with Phar extension
2) without Phar extension
3) extracted to disk from the phar
this makes the default phar format quite interesting as it eliminates the only drawback of the extension
2008-01-18 05:42:16 +00:00
Greg Beaver
109cbc9f50
add needed define back into config.w32, make zip required mod on win32, remove lib/.cvsignore
2008-01-18 00:11:37 +00:00
Greg Beaver
ad23787e0c
remove unneeded define, zip is required on windows
2008-01-17 20:21:55 +00:00
Greg Beaver
5689f3c9c6
add new test for opening a zip-based phar with no zip ext, update skipif for phar_convert test
2008-01-17 20:17:40 +00:00
Greg Beaver
e4c02a6b96
do fancy-shmancy zip dependency validation because ZEND_MOD_OPTIONAL_EX doesn't do any version validation
2008-01-17 05:52:18 +00:00
Greg Beaver
86fc96d86b
update package.xml
2008-01-17 04:56:40 +00:00
Greg Beaver
fa6027041d
refine config.m4 to use the newly found zip headers
2008-01-17 04:04:30 +00:00
Greg Beaver
9a59e60657
remove HAVE_ZIP defines just as we removed HAVE_BZ2 defines and for the same reason
...
update outdated description of phar in config.m4
make zip extension mandatory on windows for compiling purposes
2008-01-17 03:59:07 +00:00
Greg Beaver
a3718dcfa3
no need to use conditional defines for bz2, we don't call it except indirectly through stream wrappers.
...
After removing HAVE_BZ2 conditionals, phar works even if bz2 is not present on installation through pecl
2008-01-17 03:48:29 +00:00
Greg Beaver
535865e908
give up on gpg signing because of non-existent windows support for gpg signing lib
2008-01-17 03:19:44 +00:00
Greg Beaver
ff076eb3cc
update m4 to make zip support always enabled so zip headers must be installed, add dep to package.xml
2008-01-17 02:03:59 +00:00
Greg Beaver
0e934c70d7
add optional whole-file compression to convertToTar/convertToPhar
2008-01-16 21:09:32 +00:00
Greg Beaver
31ed60001c
fix build on windows
2008-01-16 20:17:47 +00:00
Greg Beaver
d1eda9c8ac
add Phar::convertToTar(), Phar::convertToZip(), and Phar::convertToPhar()
2008-01-16 07:24:39 +00:00
Greg Beaver
cb40b39b5b
add support for creation of gzipped and bzipped tar-based phars
2008-01-15 23:41:44 +00:00
Marcus Boerger
9fe2dd5697
- cleanup and make build with HEAD
2008-01-14 18:06:05 +00:00
Greg Beaver
ba707bad4c
fix test (make OS-agnostic)
2008-01-14 06:25:22 +00:00
Greg Beaver
505247b6ef
fix test to be OS-agnostic
...
# steph - this is a different test from the one I fixed earlier, I think that's the confusion :)
2008-01-14 06:23:10 +00:00
Greg Beaver
34bb2d7e76
unixify path separators in tar-based phars, always use this value for duping alias
...
# found by delete.phpt unit test. I love unit tests
2008-01-14 06:19:43 +00:00
Greg Beaver
0df060f18b
add missing skip sections in zip tests
2008-01-14 05:25:11 +00:00
Greg Beaver
b4eecadd7c
fix test (make OS-agnostic)
2008-01-14 05:19:23 +00:00
Greg Beaver
ab99c77a5e
add a whole slew of missing returns after throwing an exception, and remove 1 spurious return after RETURN_TRUE
2008-01-14 05:12:46 +00:00
Greg Beaver
611da7a5c1
fix test (make OS-agnostic)
2008-01-14 05:03:02 +00:00
Greg Beaver
3fd137c88f
fix build on windows (Steph Fox)
2008-01-14 02:47:55 +00:00
Greg Beaver
9131f152ba
new test for inclusion within phar that takes CWD into account
2008-01-12 22:25:40 +00:00
Greg Beaver
f5e4ff21dd
fix segfault in Phar::mungServer() found in frontcontroller20.phpt
2008-01-12 22:21:50 +00:00
Greg Beaver
56e84a390c
fix segfault in Phar::webPhar() if file is in root directory, found in frontcontroller16.phpt
2008-01-12 22:16:00 +00:00
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
Greg Beaver
41762671c8
new test
2008-01-05 04:30:30 +00:00
Greg Beaver
8f79663143
new test
2008-01-05 04:27:01 +00:00
Greg Beaver
3a27729fd8
new test
2008-01-05 04:12:24 +00:00
Greg Beaver
b859c9dd4b
beautify 404 error handler, and note missing file.
...
throw exception if webPhar() is attempted with an extracted file, as webPhar() makes no sense on-disk
2008-01-05 04:03:33 +00:00
Greg Beaver
2fd9f17353
clarify test names
2008-01-05 03:50:13 +00:00
Greg Beaver
08b7b76418
fix Location header for index if request has a /, 2 new tests, add index.php to frontcontroller phar
2008-01-05 03:49:01 +00:00
Greg Beaver
1549f54264
clarify test name
2008-01-05 03:42:05 +00:00
Greg Beaver
653dc9e8ce
fix front controller tests (requires patch to run-tests.php posted to internals a little while ago)
...
allow phars to have extension .php as last resort
fix phar-based phars for MIME_OTHER type
2008-01-05 03:41:43 +00:00
Greg Beaver
67688371f7
use zip_free() instead of zip_close(), and don't add a stub if it already exists in phar_zip_flush(), update TODO
2008-01-04 17:04:41 +00:00
Marcus Boerger
2eecfbf94e
- Change 'print' to 'die' for skip notices
2008-01-04 16:26:44 +00:00
Marcus Boerger
95a9f1faf6
- Fix module info for bz2
...
- Differentiate enabled, disabled and unavailable
2008-01-04 16:10:49 +00:00
Marcus Boerger
4aec466e95
- Pendantic changes
2008-01-04 14:06:50 +00:00
Greg Beaver
7babdcfe59
fix windows build (hopefully :)
2008-01-04 04:59:12 +00:00
Greg Beaver
e8a5b20514
replace crappy $_SERVER munging with explicit munging via
...
Phar::mungServer(). This static method takes an array with one of these 4 indices (case-sensitive):
'PHP_SELF', 'SCRIPT_NAME', 'SCRIPT_FILENAME', 'REQUEST_URI'
and removes any reference to the actual path on the server. This allows older apps to function unmodified inside a phar.
the variables are re-registered as PHAR_PHP_SELF and company to allow access from clever script files
[DOC]
2008-01-04 04:57:11 +00:00
Greg Beaver
8e18f1cae1
Phar::webPhar() and various problems relating to shutdown in an apache process fixed
2008-01-04 01:45:37 +00:00
Greg Beaver
f589855093
fix tar-based phars creation and loading
2008-01-03 18:13:27 +00:00
Greg Beaver
c83b566218
commit missing files (helps if you cvs add, don't it?) for tar implementation
2008-01-03 05:35:19 +00:00
Greg Beaver
8ee4266b3f
initial tar support - a few kinks to work on in phar creation, but read works
2008-01-03 04:45:00 +00:00
Greg Beaver
652d39c330
add zip-based phar support. not quite working is webPhar(), not sure why yet
2007-12-31 22:42:40 +00:00
Greg Beaver
b8592e228d
make blah.phar/ access indexfile just like blah.phar
2007-12-29 02:40:49 +00:00
Greg Beaver
f56865ad4d
fix redirects and s/redirects/rewrites/
2007-12-29 02:38:29 +00:00
Greg Beaver
9320ac9893
remove FIXME - it's been fixed
2007-12-29 02:04:09 +00:00
Greg Beaver
3dcee1c8c7
fix index/custom 404 page
2007-12-29 02:01:12 +00:00
Greg Beaver
06a98d96c7
update proto, arginfo for webPhar
2007-12-29 01:37:12 +00:00
Greg Beaver
acc44900de
add vastly improved 404 handling
2007-12-29 01:35:46 +00:00
Greg Beaver
60dc8e5ff4
fix redirect to index file
2007-12-28 23:33:15 +00:00
Greg Beaver
e1a41da652
fix on windows
...
# it works! it works!
2007-12-26 16:59:01 +00:00
Greg Beaver
e861913e39
fix windows build
...
# there HAS to be a better way to do this...
2007-12-24 21:40:54 +00:00
Greg Beaver
4ae47c1df9
remove unused variable
2007-12-24 20:48:12 +00:00
Greg Beaver
5200481aaf
fix mem leak
2007-12-24 20:30:44 +00:00
Greg Beaver
02c7ff1343
complete re-factoring of front controller. Now it is done with
...
Phar->webPhar():
<?php
Phar::webPhar();
__HALT_COMPILER();
With the above stub, the default front controller will kick in. An array of mime type overrides, and another
array mapping phar file entry -> redirected entry can be used to further customize
[DOC]
2007-12-23 21:12:42 +00:00
Greg Beaver
d443c76bed
new test for front controller
2007-12-22 07:47:15 +00:00
Greg Beaver
8e4cc4b3dd
first attempt at major new feature: default front controller for web
...
Currently, an entire phar entry is leaked for no obvious reason, otherwise it works. Sample code:
The phar has to be created using Phar->useFrontController(); and the stub performs actual resolution of which file to load:
<?php
Phar::mapPhar();
include 'phar://' . __FILE__ . '/' . substr($_SERVER['REQUEST_URI'], strlen(basename(__FILE__)));
__HALT_COMPILER();
?>
Phar automatically determines mime type from the file extension and either parses or displays the file. Modification of REQUEST_URI
and other variables should happen in the stub
[DOC]
2007-12-22 07:46:53 +00:00
Greg Beaver
245ca069c8
same fix we used in linux to make all extension deps optional
2007-12-21 19:02:20 +00:00
Greg Beaver
185a4a8309
on second thought, hooking into getcwd() is a bad idea, who uses this for code loading, anyways?
2007-12-21 04:49:25 +00:00
Greg Beaver
0d830a27ea
implement cleaning of crap paths - major functionality boost
2007-12-20 23:12:40 +00:00
Greg Beaver
0bfc046eac
remove minor (and unnecessary I might add) windows compile warnings
2007-12-20 04:12:23 +00:00
Greg Beaver
d4eccb4471
holy cow - include/fopen/cwd magic fully working on unix now for windows testing
2007-12-19 04:37:25 +00:00
Greg Beaver
2222da9493
making progress (include magic works)
2007-12-19 03:17:05 +00:00
Greg Beaver
0c51d58138
[unfinished] magically handle getcwd() and fopen() with include_path inside phar
...
this work is incomplete, but compiles and existing tests pass
2007-12-18 17:01:24 +00:00
Greg Beaver
d757f6ee5e
oops, need to make these things optional, not required
2007-12-18 05:32:11 +00:00
Greg Beaver
7fa0b43518
fully implement Phar->copy(), fix test
2007-12-16 06:31:00 +00:00
Greg Beaver
427e54dcd9
add failing test
2007-12-16 01:11:50 +00:00