Hi, I found that my linux (CentOS) server hasn't got any of the php extensions installed but can't seem to find any easy way to do it. Can anybody guide me the easiest way to install the php extensions curl and gd. A google search has showen dozens of lines of commands are required for the complete process and was wondering if there is any easier way to install on CentOS. PHP 5.2.8 is my version and I have ssh access and root file transfer access.
Please reply.

Recommended Answers

All 6 Replies

Anybody?
Also is there a graphical interface to install apache and php for a test run (but without php extensions). Because I might try and test some online tutorials but need an easy way to install without extensions like xampp on windows.

The easiest way I know is to install the files into the directory where extensions are suppose to be and add the extension to the php.ini file. Worked for my install on a Kubuntu box.

Then where could I get those pre-compiled files becaused I've searched and searched and only find instructions on how to compile the c/c++ files. It would be a great help if you could post a link to download the standard precompiled extensions in the .so format.

You still have to compile them. I thought you didn't want to have to configure and install php with new extension (which is a pain in the ass).

Just extract the files from the tar file and then run the usual ./configure,make,make install crap in the default extension directory. This directory can be changed in the php.ini.

Then add the extension to the php.ini file.

I am no expert, but I just did this a month ago.

Also, let me know how the curl extension goes. For some reason my system didn't like to install that.

After a lot of googling and experimenting in a test environment I managed to find a thing call "yum install". I have one question before I do this on my vps and that is - Are these commands sufficient to install the curl and gd libraries? They are as follows:

yum install php-gd
yum install php-curl

And the links I found about these from:

Links:
 Curl
 http://www.linuxquestions.org/questions/linux-newbie-8/yum-install-php-curl-trouble-631681/
 Above link has code that might be slightly misleading
 http://www.eukhost.com/forums/f30/how-install-php-curl-php-ssl-5704/

 Gd
 http://www.rasyid.net/2008/02/02/install-php-gd-in-centos/

Hope somebody can answer this question but in the mean time I will see if I can test on my testing environment but will be hard since there is a forbidden error in my test environment.

I have found out that to yum install curl the following commands may be used:

yum install php-curl
yum install curl

However that does not work on all servers and may need to be compiled from the source. Since that didn't work for me and I didn't have the slightest clue on how to compile from the source I paid support to do it for me. So with my extensions now installed, I am a happy customer and the daniweb bot is now online.
*Solved*

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.