IsaacSchlueter Posted June 23, 2004 Posted June 23, 2004 I'd like to accept and read zip file uploads at my site. Preferably, it would be great to be able to use the functions in the ZZipLib php library, described at http://us4.php.net/manual/en/ref.zip.php However, I tested it out, and they're definitely not installed with php here at TCH. Any chance of getting this set up, or does anyone know of a way that I can configure the compile-time directives for php running on my site? (I'd be really surprised if you give your customers access to compile-time directives, as some of them can be highly unsafe, but maybe there's some other workaround?) Alternatively, M-Zip could provide the same sort of functionality. However, then I'd need to know what command-line function could be used in order to unpack zip files. More info available at http://esurfers.com/m-zip/ The other option is really not an option at all, and that's to study the PKWare Zip whitepapers at http://www.pkware.com/products/enterprise/...rs/appnote.html and then read it as a raw binary file and do all the interpretation in the script file itself. (Talk about re-inventing the wheel!) Thanks for any help you guys can provide Quote
borfast Posted June 23, 2004 Posted June 23, 2004 You can use PEAR's Archive_TAR or Archive_ZIP packages Check them out here, under the "File System" category: http://pear.php.net/packages.php Quote
IsaacSchlueter Posted June 23, 2004 Author Posted June 23, 2004 Cool, that seems to work! For anyone else in this position, you need to go to http://cvs.php.net/pear/Archive_Zip/Zip.php and dowload Zip.php. Then, include Zip.php in your script, and you can use the class. Thanks, Raul! Quote
jgingras Posted November 7, 2006 Posted November 7, 2006 I know that this is an old post, but I can't seem to figure out how to use the ZipArchive class? What files does i need other than the Zip.php and PEAR.php that it calls? Please help! Quote
jgingras Posted November 7, 2006 Posted November 7, 2006 (edited) ok.. the next problem. when I FTP the backup generated through an FTP program, ie. FileZilla, I can open the backup fine, but when I do it through DOS commands it doesn't work. Here are the commands. ftp -i -n -v -s:z <-- z is a file that contains the lines below. open *IPAddress* user *username* *password* cd *location to get files from* mget * <-- which gets all the files including the backups which works correctly. disconnect bye It seems to work fine, it grabs all the files, but the zip files are corrupt somehow??? Edited November 7, 2006 by jgingras Quote
TCH-Bruce Posted November 7, 2006 Posted November 7, 2006 Try setting your file type to Binary before the mget command. Quote
jgingras Posted November 7, 2006 Posted November 7, 2006 Excellent! That worked great! Thanks Again! Quote
joe056 Posted March 5, 2007 Posted March 5, 2007 I'm a bit confused here. I read elsewhere on the forum that the Pear stuff was already included on the servers. Is this true? If it's not, do I install it, or should I get the support people to do it? Quote
TCH-Bruce Posted March 5, 2007 Posted March 5, 2007 Most modules are installed. If you find one that is missing you can open a help desk ticket and see if the techs will install it for you. Quote
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.