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 have installed PHP 5.2 from source (we're moving some sites that require 5.2, unfortunately) to a CentOS box. PHP is compiled from source, but when I try to start apache I get the following error:

Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: 
Syntax error on line 1 of /etc/httpd/conf.d/php.conf: 
Cannot load /etc/httpd/modules/libphp5.so into server: 
/etc/httpd/modules/libphp5.so: undefined symbol: php_sig_jpg

I have libpng, libpng-devel, gd, gd-devel, libjpeg, and libjpeg-devel all installed as well but can't figure out what could be causing this.

Edit: adding the contents of /etc/httpd/conf.d/php.conf

LoadModule php5_module modules/libphp5.so
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>
share|improve this question
    
is this module is present in your apache module directory /etc/httpd/modules/libphp5.so? –  Abhishek Anand Amralkar May 22 '13 at 13:36
    
Yes, it looks like it's there –  Rob May 22 '13 at 13:38
    
Syntax error on line 1 of /etc/httpd/conf.d/php.conf , please check for syntax on line 1. –  Abhishek Anand Amralkar May 22 '13 at 13:38
    
Doesn't look like there are any syntax errors. I'll add that to the question too –  Rob May 22 '13 at 13:47
    
Just use 5.3 if you can. Nearly all PHP scripts which "need" 5.2 will work fine on 5.3. –  Michael Hampton May 22 '13 at 14:18
show 1 more comment

1 Answer 1

This looks like you are missing some part of the gd library. Check out what php/gd-related packages you have with this:

rpm -qa| grep -iE php\gd |sort

If you have not already, you may want to use the source RPMs to build custom RPM packages. This is often a less-brittle way to build and deploy from source on RedHat-based distros.

share|improve this answer
add comment

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.