Installing PECL Package


#1

(Apologies if this should have been in the Programming forum, but this involves SSH, so I thought it would be better in here)

I am a couple of more errors away from screaming my head off and giving up with this - please, oh please, could somebody help me?

I am trying to install the PHP PECL package ‘Zip’, so that functions such as zip_open() will work in one of my PHP scripts.

When I was developing the script offline, I downloaded XAMPP (from apachefriends), which has Apache, PHP and MySQL with it - and for some reason this came with the zip functions enabled. Of course when I uploaded it I found that it didn’t work on Dreamhost.

I have been through the DH Wiki and I’ve followed all the instructions about installing PEAR/PECL packages, and I’ve had absolutely no luck whatsoever - and I’m actually left with non-existant folders still appearing on the server because of it. I can deal with that though - they don’t really bother me - what bothers me is that I still haven’t got this working yet. I’m currently running a recompiled PHP5 (5.1.6) with the ‘–enable-zip’ option in the configuration, but that didn’t seem to do anything.

I’ve also tried using the exec() PHP function and using the server’s unzip function, but that was very slow and halted my sites when it was unzipping something…

I’ve searched through Google for an explanation too, but I’ve still not had any luck, and I’m just getting sick of it.

The zip functions seem to be quite common (they’re in the actual PHP manual), so I don’t understand why a host would not have them enabled by default when I can easily download a local copy of Apache/PHP and have them working automatically without having to do anything - but I’m not angry at DH for not enabling it - I’m just angry that SSH and PEAR is so complicated to work on shared hosting. :smiley:

So - I would be extremely grateful if somebody would help me with this issue - otherwise people in America will probably hear my scream all the way from Scotland. :wink:


#2

I also requested this in the last week, and see what they said to me:

"Regretfully we can’t do this. We dont’ do custom installs or
configurations of our Apache instances. As a matter of security and
maintanance ease we keep all apache instances for our 300,000+ domains to
be the same. Sorry!!

Thanks!
Glen"

Sadly, i REALLY need to work width zip files (and extract them online)… so, i don’t know what to do, cuz this function is very important to me… If you know how to extract zip files from another way, please tell me.
Thanks.


#3

This is what I am using as an alternative (in PHP) -

exec("/usr/bin/unzip $pathtozip -d $unzipdirectory", $output);

I didn’t want to use this because I was testing it out when the servers/routers were having problems and it wasn’t very responsive - however now that the network seems to be performing well now it’s a good alternative to the PHP zip functions.

If you don’t want to use the unzip function exactly as I have above, you can search around the net for other usage examples.

Also, after the /usr/bin/unzip part you can have modifiers which you can find using the SSH access and typing “unzip -help” (without the quotes).

Hope that helps, but if you need anymore info just post here (I’ve got email notification on) and I’ll do my best to help. :slight_smile:


#4

Hey Beagle2, it works!
Thank you so much for help me!
:slight_smile: