Imaulle Posted June 10, 2011 Share Posted June 10, 2011 Hello, the following code is working on all but 2 of my servers I've tested it on. Anyone know the requirements for this to work correctly? I'm not having much luck. The 2 servers in question do have zlib installed. What else is required???? $zip = new ZipArchive; $res = $zip->open('newzip.zip'); if($res===TRUE){ $zip->extractTo($install_folder); $zip->close(); }else{ echo'failed'; } Quote Link to comment https://forums.phpfreaks.com/topic/238932-php-extract-zip/ Share on other sites More sharing options...
Imaulle Posted June 10, 2011 Author Share Posted June 10, 2011 ok I've figured out this is an issue with the zip of the zip file... It works only if the zip is under 10 mb. How can I increase this to zip files 20mb or less??? Sorry if this is the wrong section!!!! Quote Link to comment https://forums.phpfreaks.com/topic/238932-php-extract-zip/#findComment-1227765 Share on other sites More sharing options...
Imaulle Posted June 10, 2011 Author Share Posted June 10, 2011 sorry.. SIZE of the zip file... It works only on zips under 10mb ???? Quote Link to comment https://forums.phpfreaks.com/topic/238932-php-extract-zip/#findComment-1227774 Share on other sites More sharing options...
xyph Posted June 10, 2011 Share Posted June 10, 2011 Use a command line tool and exec. PHP wasn't built for this. Quote Link to comment https://forums.phpfreaks.com/topic/238932-php-extract-zip/#findComment-1227778 Share on other sites More sharing options...
xylex Posted June 10, 2011 Share Posted June 10, 2011 You're using functions in the Zip package, is that installed? And if so, what's the error and what's $res on failure? It'll likely be an error code. Quote Link to comment https://forums.phpfreaks.com/topic/238932-php-extract-zip/#findComment-1227809 Share on other sites More sharing options...
Imaulle Posted June 10, 2011 Author Share Posted June 10, 2011 when I would echo $res it would be '5' so that is the read error correct? It works on zips that are less than 10 mb.. I need it working on a zip that is 15-20 mb Quote Link to comment https://forums.phpfreaks.com/topic/238932-php-extract-zip/#findComment-1228033 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.