Bug #60348 [Com]: Unable to open new zipfile in mode OVERWRITE
Edit report at https://bugs.php.net/bug.php?id=60348&edit=1
ID: 60348
Comment by: Vludko at gmail dot com
Reported by: dafish at soundtrack-board dot de
Summary: Unable to open new zipfile in mode OVERWRITE
Status: Assigned
Type: Bug
Package: Zip Related
Operating System: Linux Debian 2.6.32
PHP Version: 5.3.8
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
Also php 7.0.1
Previous Comments:
------------------------------------------------------------------------
[2015-12-15 14:55:30] Vludko at gmail dot com
I have a same issue with PHP7.0 on ubuntu 15.10 but I dont have symlinks.
In OVERWRITE mode I get error code 1. But using mode CREATE zip file is successful created.
------------------------------------------------------------------------
[2015-08-24 14:40:54] cmb@php.net
Related To: Bug #70311
------------------------------------------------------------------------
[2011-11-23 09:03:03] pajoye@php.net
hm, it supports symlink smoothly. Let me test again.
------------------------------------------------------------------------
[2011-11-23 08:36:47] dafish at soundtrack-board dot de
After some more investigation along with an colleague I've found the source of
the
issue: I was trying to create the archive inside an directory which is symlinked
to another directory. After adding realpath() to the archivename, the file could
be successfully opened and stored.
I'm not sure if the error message was helpful at all and could be changed in the
future.
------------------------------------------------------------------------
[2011-11-21 14:42:32] dafish at soundtrack-board dot de
Here is a little self contained script producing the same error:
$zip = new ZipArchive();
$archiveName = 'testtest.zip';
$error = $zip->open($archiveName, ZipArchive::OVERWRITE);
echo $error . PHP_EOL; // outputs '1'
$zip->addFromString('text.txt', 'Lorem Ipsum');
$zip->close();
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=60348
--
Edit this bug report at https://bugs.php.net/bug.php?id=60348&edit=1
Thread (9 messages)