Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ into server: 
/etc/httpd/modules/ 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/
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
share|improve this question
is this module is present in your apache module directory /etc/httpd/modules/ – 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

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

Your Answer


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.