ID:               47324
 Updated by:       paj...@php.net
 Reported By:      kmteoh at hotmail dot com
-Status:           Assigned
+Status:           Feedback
 Bug Type:         Zip Related
 Operating System: w2k
 PHP Version:      5.2.9RC1
 Assigned To:      pajoye
 New Comment:

please provide a link to the file you are adding.

Also the windows files are in http://windows.php.net/snapshots/


Previous Comments:
------------------------------------------------------------------------

[2009-02-09 04:53:19] kmteoh at hotmail dot com

extension dir is definitely correct. the same script worked in cli but
not browser (isapi). tried http://snaps.php.net/php5.2-latest.tar.gz
 still no luck. i ended up using system() with external rar.exe and
unrar.exe to do the job which is perfect. though certain system setup
will not allow system() or exec() due to permission settings, which is
why i am keen to have my product coded with php internal lib rather than
using external tools.

------------------------------------------------------------------------

[2009-02-06 08:30:21] paj...@php.net

And be sure to actually use the correct extension dir.

------------------------------------------------------------------------

[2009-02-06 08:29:51] paj...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

[2009-02-06 04:43:26] kmteoh at hotmail dot com

Description:
------------
can't get the ziparchive to add files correctly. tried different
version of php_zip.dll same thing happen, and it generates funny files.
followed instructions in #46985, used php_zip.dll version 5.2.5.5,
5.2.8.8, 5.2.9.9 all not work. it only work in cli but not browser
(isapi). it generates files like test.zip.b03252 and test.zip.a03252 for
me instead of actual test.zip. i renamed to test.zip then tried to
extract but crc error.

Reproduce code:
---------------
<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
    $zip->addFile('index.txt', 'newname.txt');
    $zip->close();
    echo 'ok';
} else {
    echo 'failed';
}
?>


Expected result:
----------------
should be able to open the test.zip with winzip or winrar easily

Actual result:
--------------
crc error.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47324&edit=1

Reply via email to