How do I install a php extension?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

How do I install a php extension?

Post by JellyFish »

I'm attempting to install a php extension on my server, pecl_http. I've downloaded the tga file from the pecl site and don't know what to do next. Does the installation process very from extension to extension? I've extracted the tga file and got a <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> load of files! Is there one file in the pile of files I downloaded that I need to run on my server through a command line? I don't have access to a command line but I could use php to evoke the command line.

I'm new at this so I don't know anything about installing php. It seems to me that php is extended with the C language, and that I haven't worked with much.

So, I don't know what else to say.

How do I install a php extension?

Thanks for your time.
Last edited by JellyFish on Thu Jul 24, 2008 9:26 pm, edited 1 time in total.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: First time installing a php extension.

Post by Eran »

Is your server running windows or linux?
On windows you can download the .dll binaries and put them in the PHP extension path.
On linux, if you have the PECL package installed, you don't even need to download the files - just have pecl install it. If you don't have it installed, you will have to compile from the C source. For the last two options read here - http://www.jellyandcustard.com/2006/01/ ... l-modules/
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: How do I install a php extension?

Post by JellyFish »

I'm on a shared server so I don't have root access or access to the directory php is installed in.

The answer is probably I can't because I don't have root access, right?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: How do I install a php extension?

Post by Eran »

If you are on a shared server you probably can't install it yourself. You can ask your NOC however to install it - they might be willing.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: How do I install a php extension?

Post by JellyFish »

What's my NOC?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: How do I install a php extension?

Post by Eran »

Network operations center - the people who run your server
Post Reply