0

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>
6
  • is this module is present in your apache module directory /etc/httpd/modules/libphp5.so? May 22, 2013 at 13:36
  • Yes, it looks like it's there
    – Rob
    May 22, 2013 at 13:38
  • Syntax error on line 1 of /etc/httpd/conf.d/php.conf , please check for syntax on line 1. May 22, 2013 at 13:38
  • Doesn't look like there are any syntax errors. I'll add that to the question too
    – Rob
    May 22, 2013 at 13:47
  • Just use 5.3 if you can. Nearly all PHP scripts which "need" 5.2 will work fine on 5.3. May 22, 2013 at 14:18

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .