* PHP zip extension broken with libzip
@ 2017-05-15 13:05 Joni Eskelinen
0 siblings, 0 replies; only message in thread
From: Joni Eskelinen @ 2017-05-15 13:05 UTC (permalink / raw)
To: cygwin
This has been a long standing bug, but i just recently sought out the cause.
The following snippets fails in currently packaged php:
<?php
$zip = new ZipArchive;
$zip->open("test.zip", ZipArchive::CREATE | ZipArchive::OVERWRITE);
$zip->addFromString("foo.txt", "foo");
$zip->close();
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
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-15 13:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 13:05 PHP zip extension broken with libzip Joni Eskelinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).