Re: On going ZipArchive saga
| From: | Jeffry Killen | Date: | Thu, 21 May 2015 21:10:02 +0000 |
| Subject: | Re: On going ZipArchive saga | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-324934@lists.php.net to get a copy of this message | ||
recalling:
I was having problems with ZipArchive->open(<file name>, ZipArchive::CREATE)
returning error code 1 (multidisc archives not supported) in various circumstances.
This seems to make a subtle but important difference
$zipper = new ZipArchive();
$ret = $zipper->open('some.zip', ZipArchive::CREATE)
the dfference:
If($ret > 0)// look for an int representing an err code
{
// but no legitimate err is returned by open
// I get the multidisc not supported error and the zip file is not created
// this seems to imply that 'true' is being evaluated as 1
}
if($ret !== true)
{
// when no legitimate err code is returned by open
// test fails and the zip file is created.
}
I have been getting the error 1 code on three different Mac OSX based servers.
I finally decided to resurrect one of my home built machines and install FreeBSD v10.1
I did that and went through the laborious processes of adding apache/php to it
and migrating the relevant dev work to it, only to find the same problem.
So I had to get inventive
I hope this will be a relief to anyone with anxieties about it (it is for me)
JK