-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Closed as not planned
Copy link
Description
Description
I installed PHP-8.1.2 and php-mysql
extension on Ubuntu 22.04. After enabling it manually in php.ini
, PHP keeps warning that there's a undefined symbol: pdo_parse_params
and refuses to load it.
root@linux /v/w/html# php --version (base)
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20210902/pdo_mysql (/usr/lib/php/20210902/pdo_mysql: undefined symbol: pdo_parse_params), /usr/lib/php/20210902/pdo_mysql.so (/usr/lib/php/20210902/pdo_mysql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0
PHP 8.1.2-1ubuntu2.8 (cli) (built: Nov 2 2022 13:35:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.8, Copyright (c), by Zend Technologies
And I'm sure that it has been installed.
root@linux /v/w/html [100]# apt install php-mysql (base)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
php-mysql is already the newest version (2:8.1+92ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@linux /v/w/html# php -m
[PHP Modules]
......
PDO
pdo_mysql
......
root@linux /v/w/html# tree /usr/lib/php/
/usr/lib/php/
|-- 20210902
| |-- ......
| |-- pdo.so
| |-- pdo_mysql.so
| |-- ......
But readelf
told me that pdo_parse_params
does exist.
root@linux /u/l/p/20210902# readelf -a pdo_mysql.so | grep "pdo_parse"
000000008de8 000100000007 R_X86_64_JUMP_SLO 0000000000000000 pdo_parse_params + 0
000000008f98 003e00000007 R_X86_64_JUMP_SLO 0000000000000000 php_pdo_parse_dat[...] + 0
1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pdo_parse_params
62: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND php_pdo_parse_da[...]
I'm so confusing about this problem. Why PHP can't identify this pdo_parse_params
?
PHP Version
PHP 8.1.2
Operating System
Ubuntu 22.04