Hi,
On Wed, Aug 5, 2009 at 11:52 AM, Karanbir Singhmail-lists@karan.org wrote:
On 08/04/2009 10:13 PM, Peter Peltonen wrote:
I wish to use PostgreSQL with PHP+PDO. I haven't use PDO before.
I have the php-pdo package installed on my CentOS 4.7 server:
# rpm -qa |grep pdo php-pdo-5.1.6-3.el4s1.10
on the command line : php -i | less
should give you more info on what is going on. also make sure the php.ini in /etc/ is the standard distro one and not something custom.
Thanks! Here seems to lie the problems:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo.so' - /usr/lib/php/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: undefined symbol: pdo_raise_impl_error in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.so: undefined symbol: pdo_raise_impl_error in Unknown on line 0
This is strange, because:
# ls -lah /usr/lib/php/modules/pdo.so -rwxr-xr-x 1 root root 91K Apr 7 16:03 /usr/lib/php/modules/pdo.so
# rpm -qf /usr/lib/php/modules/pdo.so php-pdo-5.1.6-3.el4s1.10
So I did:
# rpm -e --nodeps php-pdo php-pgsql
# ls -lah /usr/lib/php/modules/pdo.so ls: /usr/lib/php/modules/pdo.so: No such file or directory
# yum install php-pdo php-pgsql
# ls -lah /usr/lib/php/modules/pdo.so -rwxr-xr-x 1 root root 84K Jul 31 2008 /usr/lib/php/modules/pdo.so
# service httpd restart
And now it seems to work. There must have been something fishy in the previous rpm installation...
Thanks for your help, everyone.
Cheers, Peter