Problems loading php-5.2.5 ebuild with postgres module into apache

After building the new 5.2.5-r1 ( I also tried the 5.2.4 ebuild) I cannot load the shared object into apache. When I try to start apache I get:

"apache2: Syntax error on line 152 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib/apache2/modules/ into server: /usr/lib/apache2/modules/ undefined symbol: PQescapeByteaConn"

It was built using the following flags:
[ebuild R ] dev-lang/php-5.2.5-r1 USE="apache2 crypt curl gdbm iconv kerberos ldap mssql mysql ncurses nls pcre postgres readline reflection session spl ssl unicode xml zlib -adabas -bcmath -berkdb -birdstep -bzip2 -calendar -cdb -cgi -cjk -cli -concurrentmodphp -ctype -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -hash -imap -inifile -interbase -iodbc -ipv6 (-java-external) -json -ldap-sasl -libedit -mcve -mhash -msql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -spell -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -truetype -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip -zip-external" 0 kB

Googling PQescapeByteaConn shows that it is part of the postgres module and if I use the -postgres use flag then apache will load php and start.

I am upgrading from 5.1 (or something thereabouts) and it was working then. I have tried 5.2.4 which is the only other one in the current portage tree but it has the same problem.

Any Ideas?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

cap2501Connect With a Mentor Author Commented:
Alright well I gave up on using postgreSQL with PHP 5.2.5 on gentoo. I tried everything I cold think of and had no luck at all. It compiles and works fine without postgre support so I ported my Database over to Mysql (quite a PITA on it's own, let me tell you).

Closing Question, thanks for the help for those who replied.

I don't sure that it is your case, but it looks like there are broken dependencies in your system.
Try running revdep-rebuild to check and fix (if any).
cap2501Author Commented:
Thanks for the advice, I had never used revdep-rebuild before. It does seem like a handy tool but unfortunately did not work for me.

I should mention that I also did a "emerge --with-bdeps y deep php" to try to eliminate any dependancy issues, unfortunately this didnt help much :(
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

cap2501Author Commented:
doubling the point value because it is a little low for the problem.
Can you post yours postgres use flags and output of ldd /usr/lib/apache2/modules/ ?
cap2501Author Commented:
ebuild     UD] dev-db/postgresql-8.0.15 [8.1.1] USE="kerberos* nls perl python readline ssl xml%* zlib -doc -pam -pg-intdatetime (-selinux) -tcl% -test% (-libg++%*) (-tcltk%) (-xml2%*)" 0 kB

"# ldd /usr/lib/apache2/modules/ =>  (0xffffe000) => /lib/ (0xb7a38000) => /lib/ (0xb7a30000) => /lib/ (0xb7a02000) => /lib/ (0xb79c0000) => /usr/local/pgsql/lib/ (0xb79a6000) => /usr/lib/ (0xb79a2000) => /usr/lib/ (0xb7847000) => /usr/lib/ (0xb77fd000) => /usr/lib/ (0xb77d1000) => /usr/lib/ (0xb77ca000) => /usr/lib/ (0xb7796000) => /usr/lib/ (0xb7789000) => /usr/lib/ (0xb7783000) => /lib/ (0xb7771000) => /lib/ (0xb775f000) => /lib/ (0xb7739000) => /lib/ (0xb7734000) => /lib/ (0xb771d000) => /usr/lib/ (0xb76f5000) => /usr/lib/ (0xb767b000) => /usr/lib/ (0xb7658000) => /lib/ (0xb7654000) => /usr/lib/ (0xb760e000) => /usr/lib/ (0xb74cf000) => /usr/lib/ (0xb7496000) => /usr/lib/ (0xb7383000) => /lib/ (0xb7253000)
        /lib/ (0x80000000) => /usr/lib/ (0xb724a000)

Sorry for late response...

This line looks strange to me.
> => /usr/local/pgsql/lib/ (0xb79a6000)
I have libpq in /usr/lib on my gentoo boxes.

So please check:
1. If /usr/local/pgsql/lib/ exists. If this is a symlink, check that it is not broken.
2. Look into /etc/ and check that /usr/local/pgsql/lib/ directory is listed there. If not try to fix with ldconfig.

If nothing of the above helps, try to remerge libpq.
cap2501Author Commented:

lrwxrwxrwx 1 root root      12 Jan 24  2006 ->
-rwxr-xr-x 1 root root  116514 Jan 24  2006

are both in the correct folder (/usr/local/pgsql/

This folder was not listed in /etc/ I ran ldconfig but it didn't seem to do anything. I manually added the entry to the but am unsure oh how to make the system recognize this.

I tried copying (and to /usr/lib, which is in the /etc/ in hopes that this would enable it to be found but had no luck.

I tried remerging libpq to no avail.
2 Netminder:
>Recommendation: PAQ/refund
I agree.
Closed, 250 points refunded.
Community Support Moderator
All Courses

From novice to tech pro — start learning today.