Re: Re: ZipArchive headache

From: Date: Wed, 06 May 2015 18:35:26 +0000
Subject: Re: Re: ZipArchive headache
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-324874@lists.php.net to get a copy of this message
On May 6, 2015, at 9:52 AM, Jeffry Killen wrote:
On May 6, 2015, at 5:45 AM, Christoph Becker wrote:
Hi Jeffry, Am 06.05.2015 um 02:41 schrieb Jeffry Killen:
On May 5, 2015, at 3:36 PM, Christoph Becker wrote:
Jeffry Killen wrote:
1: ZipArchive::ER_MULTIDISK|Multi-disk zip archives not supported: test-2.zip
I just found <https://bugs.php.net/bug.php?id=60348>, where the same meaningless result was returned. It turned out to be related to symlinked directories. Can you please verify, Jeffry?
Well, I haven't worked with any symlinked directories. And I have not worked with any linked or aliased resources in a web server context or otherwise. So it would require me to get familiar with that scenario first, to test it out. (if that is what you mean by verify)
A simple verification would be to use realpath(getcwd()) instead of getcwd(). BTW: usually you should "reply to all" – the discussion might be interesting for others, too. :)
Thank you: You suggestion for verification is simple enough, I am sorry, I sometimes am distracted and neglect to reply all JK
here is the revised code using realpath(getcwd()) At the bottom is the same result; else if($_GET['newArchAlt'])
     {
      //header('Content-Type: text/plain');
      //print $_GET['newArchAlt'];
      //exit;
      require_once("php/zpArchConst.php");
      //$_constER;
      $_alt = new ZipArchive();
      $_ret = $_alt->open(realpath(getcwd()).'/'.$_GET['newArchAlt'], ZipArchive::CREATE);
      header('Content-Type: text/plain');
      print $_ret.': '.$_constER[$_ret].":  ".$_GET['newArchAlt'];
      exit;
1: ZipArchive::ER_MULTIDISK|Multi-disk zip archives not supported: test-2.zip JK

« previous php.general (#324874) next »