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/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: 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?
LVL 2
cap2501Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rokovCommented:
Hi!

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).
0
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 :(
0
cap2501Author Commented:
doubling the point value because it is a little low for the problem.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

rokovCommented:
Can you post yours postgres use flags and output of ldd /usr/lib/apache2/modules/libphp5.so ?
0
cap2501Author Commented:
postgres:"
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:
"# ldd /usr/lib/apache2/modules/libphp5.so
        linux-gate.so.1 =>  (0xffffe000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7a38000)
        libhistory.so.5 => /lib/libhistory.so.5 (0xb7a30000)
        libreadline.so.5 => /lib/libreadline.so.5 (0xb7a02000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb79c0000)
        libpq.so.4 => /usr/local/pgsql/lib/libpq.so.4 (0xb79a6000)
        libpanel.so.5 => /usr/lib/libpanel.so.5 (0xb79a2000)
        libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0xb7847000)
        libsybdb.so.5 => /usr/lib/libsybdb.so.5 (0xb77fd000)
        libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0xb77d1000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb77ca000)
        libldap-2.3.so.0 => /usr/lib/libldap-2.3.so.0 (0xb7796000)
        liblber-2.3.so.0 => /usr/lib/liblber-2.3.so.0 (0xb7789000)
        libgdbm.so.3 => /usr/lib/libgdbm.so.3 (0xb7783000)
        libz.so.1 => /lib/libz.so.1 (0xb7771000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb775f000)
        libm.so.6 => /lib/libm.so.6 (0xb7739000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7734000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb771d000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb76f5000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb767b000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb7658000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7654000)
        libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb760e000)
        libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb74cf000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0xb7496000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7383000)
        libc.so.6 => /lib/libc.so.6 (0xb7253000)
        /lib/ld-linux.so.2 (0x80000000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb724a000)
"

0
rokovCommented:
Sorry for late response...

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

So please check:
1. If /usr/local/pgsql/lib/libpq.so.4 exists. If this is a symlink, check that it is not broken.
2. Look into /etc/ld.so.conf 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.
0
cap2501Author Commented:

lrwxrwxrwx 1 root root      12 Jan 24  2006 libpq.so.4 -> libpq.so.4.1
-rwxr-xr-x 1 root root  116514 Jan 24  2006 libpq.so.4.1

are both in the correct folder (/usr/local/pgsql/libpq.so.4).

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

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

I tried remerging libpq to no avail.
0
cap2501Author 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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rokovCommented:
2 Netminder:
>Recommendation: PAQ/refund
I agree.
0
Vee_ModCommented:
Closed, 250 points refunded.
Vee_Mod
Community Support Moderator
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.