heavencore Posted February 16, 2007 Share Posted February 16, 2007 Hello, intro I have come across a bit of a problem with one of my clients, i developed their website in php and it is hosted on a server farm under easyspace they have zlib 1.1.4 and gzip(i think) installed. i dont have shell access. The problem The site in question has thousands and thousands of product images, backing these up over ftp takes AGES due to thousands of ftp get commands etc, i need a way of compressing these images server side into one file, it does not matter about compression strength, this can be low, its just the 1 file i need. Any ideas would be greatly appreciated as i have little experience in server side archiving. Regards J. Quote Link to comment Share on other sites More sharing options...
Jenk Posted February 16, 2007 Share Posted February 16, 2007 <?php shell_exec('tar cvf images.tar /path/to/images/dir/ && gzip images.tar'); ?> Quote Link to comment Share on other sites More sharing options...
heavencore Posted February 16, 2007 Author Share Posted February 16, 2007 thankyou for your response. The script runs ok (no errors are thrown back) However no file is created. Do i have to specify save location? or should it just create in same folder as script? Cheers Quote Link to comment Share on other sites More sharing options...
Jenk Posted February 16, 2007 Share Posted February 16, 2007 change it to: <?php echo shell_exec('tar cvf images.tar /path/to/images/ && gzip images.tar'); ?> to see errors. Quote Link to comment Share on other sites More sharing options...
taith Posted February 16, 2007 Share Posted February 16, 2007 you do need write privaliges to the folder as well Quote Link to comment 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.