From: samantha86 at web dot de Operating system: windows (xp and 7) PHP version: 5.3.0 PHP Bug Type: Zip Related Bug description: folders inside a zip archive are not displayed
Description: ------------ hi, i have a problem with files generated/altered via the ziparchive class. my problem is the same as Bug #39714, but i have been using php 5.3.0 instead of 5.2.x i use to use ubuntu linux and i have NO problem there with extracting the zip files. it does not matter on what server the zip files are generated, windows or linux, it depends on the client where i try to open one of these zip files. the code for the zipfile generation looks like this: Reproduce code: --------------- <?php class Zipper extends ZipArchive { public function addDir($path, $newname) { $nodes = glob($path.DIRECTORY_SEPARATOR."*"); if (!empty($nodes)) { foreach ($nodes as $node) { //exclude temporary files if (substr($node,-1)!="~") { $newnode=substr($node,strlen($path)+1); $newnode=$newname.DIRECTORY_SEPARATOR.$newnode; if (is_dir($node)) { $this->addDir($node,$newnode); } else if (is_file($node)) { $this->addFile($node,$newnode); } } } } } } ?> Expected result: ---------------- i'd like to receive a zipfile where i can see the files, but also the directories wit the included files that are generated in a deeper recursion of the function Actual result: -------------- under windows i only see the files that are in the root of the zip archive, under ubuntu linux everything is ok. thank you in advance for sacrificing your time -- Edit bug report at http://bugs.php.net/?id=50141&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50141&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50141&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50141&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50141&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50141&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50141&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50141&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50141&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50141&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50141&r=support Expected behavior: http://bugs.php.net/fix.php?id=50141&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50141&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50141&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50141&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50141&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50141&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50141&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50141&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50141&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50141&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50141&r=mysqlcfg