[wp-hackers] wp-filesystem

Anirudh Sanjeev anirudh at anirudhsanjeev.org
Tue Mar 4 08:29:05 GMT 2008


> However, I'm interested in your Unzipping, At present, WP is using a
> pure-php unsipping method as you've noticed, Its got some limitations on
> certain setups(In the sense that it simply doesnt work -- i think it reaches
> the limit of an int..). What it really needs IMO is to use the PHP Zip
> extension if available, else use the zlib library if compiled in(90% of
> situations i think?) else revert to pure php.
>

Firstly, the zlib library is there in under 5% of the situations.

I used a php file to unzip files, a phpzip library actually. But turns out
that on some servers, there are some difficulties that the files created are
registered to the php "user" and ftp cannot delete them. Since this is on
unix based systems, I overcame this by using
<?php
exec("tar -xvwf $filename");
?>
And the other regular method can work as a fallback method.


-- 
Anirudh Sanjeev
Third Year Undergraduate Student, Indian Institute of Technology, Kharagpur
http://anirudhsanjeev.org
Mail: anirudh at anirudhsanjeev.org
Phone: +91-97335-04828
jabber/googletalk: anirudh at anirudhsanjeev.org
If this message is signed with PGP, you can verify with my public key at
http://anirudhsanjeev.org/pubkey.txt


More information about the wp-hackers mailing list