I'm on an ubuntu 16.04 server.
I upgraded postgresql from version 9.5 to 12.3. I upgraded php from v 7.0 to 7.3. I upgraded libpq-dev to 12.3-1.pgdg16.04+1
phpinfo() shows php version 7.3
but it shows version PostgreSQL 9.5.21
for pdo_pgsql and pgsql
apache logs show:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20180731/pdo_pgsql (/usr/lib/php/20180731/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_pgsql.so (/usr/lib/php/20180731/pdo_pgsql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0
PHP Warning: Module 'pgsql' already loaded in Unknown on line 0
So what have I done wrong here and how do I get php / pdo using the correct versiion of pgsql / libpq?
Try
apt remove *-pgsql
apt install php7.3-pgsql
then restart your apache
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.