Closed thecodecafe closed 9 years ago
Can you provide a full stack trace ?
PHP code:
use Alchemy\Zippy\Zippy;
$zip = Zippy::load(); $zip->create('testingit.zip', array( "assets/img/logo.png" ),$recursive = true);
The Error: Alchemy \ Zippy \ Exception \ RuntimeException Unable to create archive open: C:\xampp\htdocs\r6images\vendor\alchemy\zippy\src\Alchemy\Zippy\Zippy.php }
try {
return $this
->getAdapterFor($this->sanitizeExtension($type))
->create($path, $files, $recursive);
} catch (ExceptionInterface $e) {
throw new RuntimeException('Unable to create archive', $e->getCode(), $e);
}
}
Server/Request Data MIBDIRS C:/xampp/php/extras/mibs MYSQL_HOME \xampp\mysql\bin OPENSSL_CONF C:/xampp/apache/bin/openssl.cnf PHP_PEAR_SYSCONF_DIR \xampp\php PHPRC \xampp\php TMP \xampp\tmp HTTP_HOST r6images.dev HTTP_CONNECTION keep-alive HTTP_CACHE_CONTROL max-age=0 HTTPACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/_;q=0.8 HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 HTTP_DNT 1 HTTP_ACCEPT_ENCODING gzip,deflate,sdch HTTP_ACCEPT_LANGUAGE en-US,en;q=0.8 HTTP_COOKIE cart_identifier=5706fc7e0f94eb2b41520b403ce6bc53; r6images_session=jsere79meihi1f5vrjnefmkom0 PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\xampp\php;C:\ProgramData\ComposerSetup\bin; SystemRoot C:\Windows COMSPEC C:\Windows\system32\cmd.exe PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC WINDIR C:\Windows SERVER_SIGNATURE
Apache/2.4.7 (Win32) OpenSSL/0.9.8y PHP/5.4.22 Server at r6images.dev Port 80 SERVER_SOFTWARE Apache/2.4.7 (Win32) OpenSSL/0.9.8y PHP/5.4.22 SERVER_NAME r6images.dev SERVER_ADDR 127.0.0.1 SERVER_PORT 80 REMOTE_ADDR 127.0.0.1 DOCUMENT_ROOT C:/xampp/htdocs/r6images/public REQUEST_SCHEME http CONTEXT_PREFIXHello, i have the same issue how i can investigate ? Thank you !
I'm having the same issue with Laravel 4. It runs fine on my MAMP development machine, but I get the same "Unable to create archive" RuntimeException on my production server, which runs Ubuntu 14.04 and PHP 5.6.
If I modify the code and var_dump the exception thrown on line 63 in Alchemy\Zippy\Zippy.php I get a little more information:
object(Alchemy\Zippy\Exception\RuntimeException)[1464]
protected 'message' => string 'Unable to create the inflator' (length=29)
private 'string' (Exception) => string '' (length=0)
protected 'code' => int 0
protected 'file' => string '/home/forge/mysite.com/laravel/vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractBinaryAdapter.php' (length=123)
protected 'line' => int 162
private 'trace' (Exception) =>
Same issue. Running on Laravel Homestead. PHP Zip utility is enabled.
Edit: @kylenoland's using Laravel Forge which has the same environment as Laravel Homestead.
I have this issue too. I don't have zip installed on my vm. Maybe that's the problem. So I resolved using zip-extension
adapter:
$zippy = ZipExtensionAdapter::newInstance();
@yosmanyga that did the trick for me as well. Thanks for the tip!
I tried using Zippy on laravel 4 but all i get is an error saying "Unable to create archive" can you help?