waitz Posted December 18, 2008 Share Posted December 18, 2008 My web host doesn't have a cpanel where I can unzip files, and since I am uploading a Joomla site, it is a drag to have to ftp all the 3000+ files. Is there a way to create a php script that can unzip a zip file on a remote server? I tried with a couple of simple ones I found (like this one), but nothing happened... (My hosting uses MySQL 5.0.51a and PHP 5.2.5 if that has any meaning...) Thanx for answer Rajan Quote Link to comment https://forums.phpfreaks.com/topic/137530-solved-ftp-and-unzip/ Share on other sites More sharing options...
premiso Posted December 18, 2008 Share Posted December 18, 2008 http://us3.php.net/manual/en/function.zip-open.php I bet that would be the only way to do it without using exec. Quote Link to comment https://forums.phpfreaks.com/topic/137530-solved-ftp-and-unzip/#findComment-718720 Share on other sites More sharing options...
waitz Posted December 18, 2008 Author Share Posted December 18, 2008 Thanks for the tip. There where quite a few threads in the linked topic. Which one did you mean..? Rajan Quote Link to comment https://forums.phpfreaks.com/topic/137530-solved-ftp-and-unzip/#findComment-718748 Share on other sites More sharing options...
premiso Posted December 18, 2008 Share Posted December 18, 2008 No clue, it is not my code I am trying to get working. Thus I would look through the usage of zip_open and zip_read and see how it should be used. Or look through the user comments and see if anyone already built an extractor. I will not do this for you cause you can read and test just as well as I can. Quote Link to comment https://forums.phpfreaks.com/topic/137530-solved-ftp-and-unzip/#findComment-718759 Share on other sites More sharing options...
waitz Posted December 18, 2008 Author Share Posted December 18, 2008 Sure, I'll have a look. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/137530-solved-ftp-and-unzip/#findComment-718771 Share on other sites More sharing options...
waitz Posted December 18, 2008 Author Share Posted December 18, 2008 Hmm... It seemed like this little thing worked fine after all, on this server: <?php echo exec("unzip file.zip"); ?> Rajan Quote Link to comment https://forums.phpfreaks.com/topic/137530-solved-ftp-and-unzip/#findComment-718867 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.