PECL Zip 1.5.0, features additions, modify OpenDocument
Comments
Display comments as
(Linear | Threaded)
|
January '09 | |||||
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
5.2.0
5.2.7
antispam
apache2
binary
cartoon
cgi
conference
Dotclear
dotclear2
fastcgi
feed
filter
filters
GD
google
graphics
htaccess
htscanner
iis
innotek
internals
ipc
ISP
libGD
lighttpd
Mysql
PEAR
PECL
PHP
PHP-core
php 5.2.7
png
qa
release
security
Sun
symfony
tutorial
virtualbox
virtualization
visual-C
win32
windows
wtf
zip
ziparchive
Posted by Pierre in
PHP
Friday, July 14. 2006
This release tries to bring a bit of consistency in the new API. I try now to follow the actionName and actionIndex scheme where name and index are respetively the name and the position of an entry. The following methods have been renamed:
And a couple of new methods made it in:
Thanks to M. Pigozzi and Alexander Pak (PEAR’s Summer of Code project, OpenDocument support) to have catched a special type of archives (rarely used). This type is used by OpenOffice and/or other OpenDocument provider and was not fully supported by pecl/zip. It was not possible to modify such archive (like delete an element and add a new one with the same name entry). This release fixes this issue.
Another important fix has been applied to the zip::open method. It now returns the error code on failure and still true
on success. The correct way to call it should be, if you care to know why it was not possible to open a given path:
[php] <?php $zip = new Zip; $r = $zip->open($dirname . 'nofile') if ($r !== TRUE) { // an error occured and $r contains its error code } A locateName() example:
[php] <?php echo $zip->locateName('entry1.txt') . " "; echo $zip->locateName('eNtry2.txt') . " "; echo $zip->locateName('eNtry2.txt', ZIP::FL_NOCASE) . " "; echo $zip->locateName('enTRy2d.txt', ZIP::FL_NOCASE|ZIP::FL_NODIR) . " ";
axgle - #1 - 2006-07-25 04:35 - (Reply)
zipArchive open must need realpath ? see below: <?php $zip = new zipArchive; echo $r = $zip->open(realpath(‘2.zip’));//My windowsXP (PHP Version 5.2.0RC1), there need "realpath", Then success. // $zip->addfile(‘test.php’); $zip->extractTo("./");//but there do not need "realpath" echo $zip->getArchiveComment(); echo ‘<pre>’; print_r($zip); $zip->close(); ?>
Pierre - #2 - 2006-07-26 00:40 - (Reply)
Do you use CLI or apache/IIS or fcgi? Can you report a bug here: http://pecl.php.net/zip
axgl - #3 - 2006-07-26 11:31 - (Reply)
Winxp+Apache/2.0.54+PHP5.2.0RC1(CGI/FastCGI ) not CLI ,not IIS
Pierre - #4 - 2006-07-26 12:00 - (Reply)
It seems to be a problem in the Apache2 SAPI on windows. It is not a problem in the zip extension itself but somewhere in php. I will try to get more info asap, but it is a known problem in this SAPI.
axgl - #5 - 2006-07-27 10:52 - (Reply)
Oh,yes. I try the same code on CLI,then zipArchive work fine too(without realpath). goooooood! _
Pierre - #6 - 2006-07-27 16:08 - (Reply)
Ok, I got the confirmation of the Apache2 bug on windows. It is even not a PHP bug. Let say you need realpath to be portable ![]()