I have updated my SO form Ubuntu 16.04 to 18.04. I am using NGINX as a server and updated my php from 7.1 to 7.2 and 7.3.
Now when I do php -v
this is what I get:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: pdo_parse_params), /usr/lib/php/20180731/pdo_mysql.so.so (/usr/lib/php/20180731/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.12-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov 28 2019 07:37:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.12-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
This is a warning but I can't load for example the php Artisan
. This is what happens:
$ php artisan
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: pdo_parse_params), /usr/lib/php/20180731/pdo_mysql.so.so (/usr/lib/php/20180731/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
In Connection.php line 1262:
Class 'PDO' not found
Inside the file /usr/lib/php/20180731
I have the pdo_mysql.so
.
/usr/lib/php/20180731$ ll
total 9340
drwxr-xr-x 3 root root 4096 Dec 4 22:31 ./
drwxr-xr-x 8 root root 4096 Dec 4 14:39 ../
drwxr-xr-x 2 root root 4096 Dec 4 14:29 build/
-rw-r--r-- 1 root root 30824 Nov 28 02:37 calendar.so
-rw-r--r-- 1 root root 14440 Nov 28 02:37 ctype.so
-rw-r--r-- 1 root root 92264 Nov 28 02:37 curl.so
-rw-r--r-- 1 root root 161896 Nov 28 02:37 dom.so
-rw-r--r-- 1 root root 84072 Nov 28 02:37 exif.so
-rw-r--r-- 1 root root 5425264 Nov 28 02:37 fileinfo.so
-rw-r--r-- 1 root root 59496 Nov 28 02:37 ftp.so
-rw-r--r-- 1 root root 104552 Nov 28 02:37 gd.so
-rw-r--r-- 1 root root 14440 Nov 28 02:37 gettext.so
-rw-r--r-- 1 root root 43112 Nov 28 02:37 iconv.so
-rw-r--r-- 1 root root 43112 Nov 28 02:37 json.so
-rw-r--r-- 1 root root 1595528 Nov 28 02:37 mbstring.so
-rw-r--r-- 1 root root 133224 Nov 28 02:37 mysqli.so
-rw-r--r-- 1 root root 247416 Nov 28 02:37 mysqlnd.so
-rw-r--r-- 1 root root 506352 Nov 28 02:37 opcache.so
-rw-r--r-- 1 root root 26728 Nov 28 02:37 pdo_mysql.so
-rw-r--r-- 1 root root 108648 Nov 28 02:37 pdo.so
-rw-r--r-- 1 root root 268392 Nov 28 02:37 phar.so
-rw-r--r-- 1 root root 34920 Nov 28 02:37 posix.so
-rw-r--r-- 1 root root 30824 Nov 28 02:37 readline.so
-rw-r--r-- 1 root root 14440 Nov 28 02:37 shmop.so
-rw-r--r-- 1 root root 51304 Nov 28 02:37 simplexml.so
-rw-r--r-- 1 root root 88168 Nov 28 02:37 sockets.so
-rw-r--r-- 1 root root 14440 Nov 28 02:37 sysvmsg.so
-rw-r--r-- 1 root root 10344 Nov 28 02:37 sysvsem.so
-rw-r--r-- 1 root root 14440 Nov 28 02:37 sysvshm.so
-rw-r--r-- 1 root root 18536 Nov 28 02:37 tokenizer.so
-rw-r--r-- 1 root root 30824 Nov 28 02:37 wddx.so
-rw-r--r-- 1 root root 30824 Nov 28 02:37 xmlreader.so
-rw-r--r-- 1 root root 47208 Nov 28 02:37 xml.so
-rw-r--r-- 1 root root 47208 Nov 28 02:37 xmlwriter.so
-rw-r--r-- 1 root root 30824 Nov 28 02:37 xsl.so
-rw-r--r-- 1 root root 63592 Nov 28 02:37 zip.so
This is what I have with php -m
.
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: pdo_parse_params), /usr/lib/php/20180731/pdo_mysql.so.so (/usr/lib/php/20180731/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[PHP Modules]
Core
curl
date
filter
gd
hash
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
readline
Reflection
session
sodium
SPL
standard
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
The pdo_mysql
is alread parsed (php -i
)
Additional .ini files parsed => /etc/php/7.3/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.3/cli/conf.d/10-opcache.ini,
/etc/php/7.3/cli/conf.d/20-curl.ini,
/etc/php/7.3/cli/conf.d/20-gd.ini,
/etc/php/7.3/cli/conf.d/20-json.ini,
/etc/php/7.3/cli/conf.d/20-mbstring.ini,
/etc/php/7.3/cli/conf.d/20-mysqli.ini,
/etc/php/7.3/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.3/cli/conf.d/20-readline.ini,
/etc/php/7.3/cli/conf.d/20-zip.ini
Any clue how to solve this issue?
0 Answers