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

I installed PHP 5.4:

rpm -qa | grep php
php-common-5.4.6-1.el5.remi
php-5.4.6-1.el5.remi
php-cli-5.4.6-1.el5.remi

Here's my php-m output:

php -m
PHP Warning:  PHP Startup: curl: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: json: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/extensions/no-debug-non-zts-20060613/phar.so' - /usr/local/lib/extensions/no-debug-non-zts-20060613/phar.so: undefined symbol: zend_resolve_path in Unknown on line 0
PHP Warning:  PHP Startup: zip: Unable to initialize module
Module compiled with module API=20090626, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
[PHP Modules]
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mcrypt
mysql
mysqli
openssl
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
soap
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

php.ini:

[gd]
; Tell the jpeg decode to ignore warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
; http://php.net/gd.jpeg-ignore-warning
;gd.jpeg_ignore_warning = 0
extension=gd.so

I have gd.so in /usr/local/lib/extensions/no-debug-non-zts-20060613/ with 777 perms.

I have restart apache. Php is working, gd is not.

Thanks for any input!

Available Packages
php-gd.i386                        5.1.6-39.el5_8                        updates
[root@ser ~]# yum install php-gd.i386
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirror.symnds.com
 * extras: mirror.cogentco.com
 * updates: mirror.ash.fastserv.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i386 0:5.1.6-39.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-39.el5_8 for package: php-gd
--> Finished Dependency Resolution
php-gd-5.1.6-39.el5_8.i386 from updates has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-39.el5_8 is needed by package php-gd-5.1.6-39.el5_8.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-39.el5_8 is needed by package php-gd-5.1.6-39.el5_8.i386 (updates)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
share|improve this question

2 Answers 2

up vote 1 down vote accepted

Look for a php-gd RPM in your repos. I believe that is what you're missing.

UPDATE: You can search for available RPMs with yum list "php-gd".

If you find one available, then you can install it with yum install php-gd.

share|improve this answer
    
how can I go about that? Thanks. –  user1062058 Aug 22 '12 at 12:56
    
Please view the bottom of my question, it has the output of your answer. What can I do to fix this? Thank you for your help, this is very difficult to configure correctly for some reason –  user1062058 Aug 22 '12 at 15:15
1  
See rackspace.com/knowledge_center/article/… for how to enable Remi repository. –  skohrs Aug 22 '12 at 15:26
    
Thanks, the remi solution worked! DId yum install php and then yum install php-gd –  user1062058 Aug 22 '12 at 20:48

It looks like you are using Remi repository. You have to disable the PHP packages from CentOS Base repo, add the line below to /etc/yum.repos.d/CentOS-Base.repo on the [updates] block:

[updates]
...   
exclude=php*
share|improve this answer

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.