views:

65

answers:

2

If you are uploading something like Zend Framework using poor internet conneciton it may be problematic.

I think the compression of the catalog is the best solution. But what compression system is the best for this task ? We are using PHP, of course.

I have some ideas like PHP + exec + unrar and http://www.php.net/manual/en/refs.compression.php but they are all not flexible enough and are not accessible in many hostings.

A: 

I assume you mean uploading the Zend Framework itself (or other programming components) and extracting it on the server side in a shared hosting environment.

This is not easy, as in a shared environment, you can't rely on unzip tar etc. being available. Any exec based idea is therefore not feasible IMO.

Probaby the only reliable possibility is a PHP Unzip class like dUnzip. With that, you would upload the zip file onto the server, and send the script along to unpack it. It requires the gzip extension activated in PHP, but that is the case with most providers.

Pekka
Thanks, but could you give some links for gzip extension? There are so many extentions and libraries that I'm starting to get confused.
Kamil Mroczek
@Kamil the dunzip class needs this extension enabled: http://de3.php.net/manual/en/zlib.installation.php you will find info about whether it is enabled or not by using `phpinfo()` on the host.
Pekka
A: 

Iirc, the Zend Framework can be installed via PEAR. You could ask your provider (if you are using shared using which i assume) to install that PEAR package for you and then you should be able to just include it via the php default include-path.

http://code.google.com/p/zend/

Karsten
I think the OP is talking about shared hosting environments, where PEAR is usually not available. But if it is, it definitely is the no. 1 choice.
Pekka
Karsten, my question is general and ZF is only an example.
Kamil Mroczek