[CentOS] Problem with PHP / Postgresql on CentOS6.2

Tue Mar 27 16:18:06 UTC 2012
Rudinei Dias <rudinei.dias at gmail.com>

Em 27 de março de 2012 11:47, Johnny Hughes <johnny at centos.org> escreveu:

> The problem you are having with pgsql not talking to php is not related
> the error you see with the php-embeded install.  The script that is
> running is running after the install of php-embedded is calling the
> command "ldconfig".  The purpose is to rebuild the linker cache so that
> CentOS knows where shared libraries are.
> You need to look in /etc//ld.so.conf.d/ at all the files and find the
> ones concerning pgsql ... and see what they have to say about the file
> in question (/opt/PostgreSQL/psqlODBC/lib/libpq.so.5) and fix it if
> there is a problem with that file.  This is an issue (and you need to
> fix it), but it does not have anything to do with pgsql not recognizing
> your PHP.
> You also are going to need to install a php-pgsql.rpm in order to get
> php to work with pgsql.  However, that rpm
> (php-pgsql-<version>.x86_64.rpm) from the CentOS distribution is
> probably not going to work.  It expects to find the shared library
> libpq.so.5 in /usr/lib64/libpq.so.5 and was built against the 8.4.9
> libraries included in CentOS.  You are going to need to rebuild the php
> RPM with it instead pointing at the new libraries and headers from the
> new postgresql that you want to use.
> I would suspect that you are going to need to rebuild any of these
> packages (if you want to use them) against the new development libraries
> for the new version of postgresql that you want to use:
> apr-util-pgsql.x86_64
> dovecot-pgsql.x86_64
> libdbi-dbd-pgsql.x86_64
> mod_auth_pgsql.x86_64
> php-pgsql.x86_64
> rsyslog-pgsql.x86_64
> uuid-pgsql.x86_64
> Remember, this stuff (CentOS) is all built to work together and if you
> want to go outside of that, you have to not only rebuild the specific
> package in question, but also any packages that link against that
> package and use its shared libraries.
> You can try to install the distro version of php-pgsql, it is possible
> it will work.  You will need to remove any of the centos pgsql items
> though and make sure the new libraries are in the ldcache.
> Thanks,
> Johnny Hughes
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos

Thanks Johnny!

you rocks!

ldconfig was mapping /opt/postgresql by ldconfig of pgsqlODBC (I wont need
Once commented ld.so.conf.d/psqlODBC.conf
runs ldconfig
and restarted postgresql and httpd
and now all its fine!