This is the mail archive of the
mailing list for the Cygwin project.
PHP zip extension broken with libzip
- From: Joni Eskelinen <jonieske at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 15 May 2017 16:03:47 +0300
- Subject: PHP zip extension broken with libzip
- Authentication-results: sourceware.org; auth=none
This has been a long standing bug, but i just recently sought out the cause.
The following snippets fails in currently packaged php:
$zip = new ZipArchive;
$zip->open("test.zip", ZipArchive::CREATE | ZipArchive::OVERWRITE);
With a warning:
Warning: ZipArchive::close(): Renaming temporary file failed: Illegal
seek in /tmp/zip.php on line 5
It appears that the problem lies in libzip. If the extension is built
without `--with-libzip=/usr`, the error doesn't emerge. When libzip is
not available, extension is built with a bundled zip implementation.
To test, navigating into `ext/zip` in php source.
Test with bundled library:
phpize && LDFLAGS='-lpcre' ./configure && make test
Test with libzip:
phpize && LDFLAGS='-lpcre' ./configure --with-libzip=/usr && make test
Latter produces 19 failed tests.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple