Apache Won't Restart After Compiling PHP with Postgres

Posted by gonzofish on Server Fault See other posts from Server Fault or by gonzofish
Published on 2010-02-24T22:22:22Z Indexed on 2010/03/17 15:31 UTC
Read the original article Hit count: 591

Filed under:
|
|
|

I've compiled PHP (v5.3.1) with Postgres using the following configure:

./configure \
--build=x86_64-redhat-linux-gnu \
--host=x86_64-redhat-linux-gnu \
--target=x86_64-redhat-linux-gnu \
--program-prefix= \
--prefix=/usr/ \
--exec-prefix=/usr/ \
--bindir=/usr/bin/ \
--sbindir=/usr/sbin/ \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include/ \
--libdir=/usr/lib64 \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--sharedstatedir=/usr/com \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--cache-file=../config.cache \
--with-libdir=lib64 \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--with-pic \
--disable-rpath \
--with-pear \
--with-pic \
--with-bz2 \
--with-exec-dir=/usr/bin \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--enable-gd-native-ttf \
--with-t1lib=/usr \
--without-gdbm \
--with-gettext \
--without-gmp \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--with-kerberos \
--enable-ucd-snmp-hack \
--enable-shmop \
--enable-calendar \
--with-libxml-dir=/usr \
--enable-xml \
--with-system-tzdata \
--with-mime-magic=/usr/share/file/magic \
--with-apxs2=/usr/sbin/apxs \
--with-mysql=/usr/include/mysql \
--without-gd \
--with-dom=/usr/include/libxml2/libxml \
--disable-dba \
--without-unixODBC \
--disable-pdo \
--enable-xmlreader \
--enable-xmlwriter \
--without-sqlite \
--without-sqlite3 \
--disable-phar \
--enable-fileinfo \
--enable-json \
--without-pspell \
--disable-wddx \
--with-curl=/usr/include/curl \
--enable-posix \
--with-mcrypt \
--enable-mbstring \
--with-pgsql=/mnt/mv/pgsql

I'm using Postgres 8.4.0 and Apache 2.2.8; I have the following line in my Apache conf file:

LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so

And when I attempt to restart Apache, I get the following error message:

Starting httpd: httpd: Syntax error on line 205 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib64/httpd/modules/libphp5.so into server: /usr/lib64/httpd/modules/libphp5.so: undefined symbol: lo_import_with_oid

Now, I know that this is a problem with Postgres with PHP because lo_import_with_oid is a function in the Postgres source which allows the importing of large objects; also, if I remove the --with-pgsql option, PHP and Apache get along great. I've scoured the Internet looking for answers all day, but to no avail. Does anyone have ANY insight into what is causing my problems.

© Server Fault or respective owner

Related posts about php

Related posts about postgresql