#50349 [Fbk->Opn]: Problem with the function ZipArchive::deleteName()
| From: | c dot hugot at uniteam dot fr | Date: | Tue, 01 Dec 2009 11:50:17 +0000 |
| Subject: | #50349 [Fbk->Opn]: Problem with the function ZipArchive::deleteName() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145274@lists.php.net to get a copy of this message | ||
ID: 50349
User updated by: c dot hugot at uniteam dot fr
Reported By: c dot hugot at uniteam dot fr
-Status: Feedback
+Status: Open
Bug Type: Zip Related
Operating System: windows xp with wamp
PHP Version: 5.3SVN-2009-12-01 (SVN)
Assigned To: pajoye
New Comment:
I found the cause of my problem, it provide of an error of my script.
The cause is the second argument passed to the method
ZipArchive::open(), in my script it was ZIPARCHIVE::OVERWRITE. I
suppress it and my script work correctly.
Sorry for my english, my useless bug reporting and the disarrangement.
Best regards,
Christophe HUGOT
Previous Comments:
------------------------------------------------------------------------
[2009-12-01 09:58:31] pajoye@php.net
Please provide a script we can use to reproduce your problem, not only
a function.
------------------------------------------------------------------------
[2009-12-01 09:15:20] c dot hugot at uniteam dot fr
In the code $_SESSION['step5'][$p_sName . '_name'] is the name of the
file, that is in the archive file ($_SESSION['step5']['zip_name'] .
".zip" = the name of the archive file), and RACCORDEMENT_ZIP_FILE_PATH
is the constant, that contained the path to the archive file.
I hope, that could help you to solve my problem. Thanks for your work.
Best regards.
------------------------------------------------------------------------
[2009-12-01 08:58:03] jani@php.net
Is that self-contained? I don't have your session available.
------------------------------------------------------------------------
[2009-12-01 08:53:46] c dot hugot at uniteam dot fr
<?php
private function myDelZipFile($p_sName){
$l_oZip = new ZipArchive();
if($l_oZip->open(RACCORDEMENT_ZIP_FILE_PATH . "/" .
$_SESSION['step5']['zip_name'] . ".zip", ZIPARCHIVE::OVERWRITE) ===
true){
$l_oZip->deleteName( $_SESSION['step5'][$p_sName.'_name']);
$l_oZip->close();
return true;
}
return false;
}
?>
------------------------------------------------------------------------
[2009-12-01 08:49:00] jani@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
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
http://bugs.php.net/50349
--
Edit this bug report at http://bugs.php.net/?id=50349&edit=1