Reputation: 105
I have opensuse 12.2 installed with php 5.4.x, pdo and pdo_pgsql works well under apache, but it does not work with inner server $php -S localhost:8080
$php -m
[PHP Modules]
Core
ctype
date
dom
ereg
fileinfo
filter
gd
hash
iconv
interbase
json
libxml
mbstring
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zlib
[Zend Modules]
$php --ini
Configuration File (php.ini) Path: /etc/php
Loaded Configuration File: /etc/php/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
I add the following two lines in php.ini
extension=pgsql.so
extension=pdo_pgsql.so
then I get:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/pgsql.so' - /usr/lib64/php/extensions/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/lib64/php/extensions/pdo_pgsql.so' - /usr/lib64/php/extensions/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
but I am sure pgsql.so and pdo_pgsql.so are all both located under /usr/lib64/php/extensions/
Upvotes: 1
Views: 3535
Reputation: 11307
You should run php_info();
through a web page so you can see the configuration your web server is using. Compare that with your CLI configuration.
Also, you should check the file permissions of /usr/lib64/php/extensions
.
Upvotes: 1