Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to install PHP 5.2.17 on CentOS 6.2. I have downloaded RPMs from http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMs/

Problem is that the PHP RPM seems to have GD disabled by default. Hence in spite installing php-gd RPM, GD is disabled.

Is there any way that I can enable GD. Atomicorp seems to be the only website that has PHP 5.2.17 RPMs.

I am not an advanced user to be able to compile PHP.

I would appreciate help on this.

share|improve this question
1  
Did you enable the gd-extension after installing the GD RPM? In the php.ini file you need something like this extension=gd.so –  pkhamre Mar 30 '12 at 6:49

1 Answer 1

up vote 2 down vote accepted

As has been mentioned in a comment by pkhamre you may just need to edit php.ini and enable the gd extension. [change a line from ;extension=gd.so to extension=gd.so in php.ini or if that line doesn't exist add it to your php.ini]

Alternatively, if you are not looking for a specific version of PHP5, you can use a package manager. They are on most linux distro's and vary slightly from distro to distro but will take care of most of the issues involved with installing and keeping software up-to-date (important!).

On CentOS you should be able to yum install php-gd or similar.

share|improve this answer
    
Tried adding the line extension=gd.so to the php.ini file. It still wouldn't work. –  Pratik Thakkar Apr 2 '12 at 4:39
    
What does phpinfo() say about what you are running? (Create an php page with <?php phpinfo(); ?> and load up the page) Have you tried using yum ? –  syserr0r Apr 2 '12 at 11:20
    
This is on a local server. So cannot put up a direct link. Although I have copied source and put it up on one of my sites for you to view. URL is security-list.com/notused/phpinfo.html. Yum always updates PHP to 5.3 which I want to avoid. Hence am not using yum. Thanks –  Pratik Thakkar Apr 3 '12 at 4:22
    
Run updatedb && locate gd.so from a root shell and show me what it says please. It may be that gd.so is in the wrong place (since the RPMs are packaged from different authors). According to extension_dir in your phpinfo gd.so should be in /usr/lib/php/modules. Might I ask why you don't want to run php 5.3? –  syserr0r Apr 3 '12 at 15:47
    
gd.so is located in /usr/lib/php/modules/gd.so. Some portions of the websites running on the web server are not compatible with PHP 5.3. –  Pratik Thakkar Apr 4 '12 at 5:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.