pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0

我在使用yii2搭建网站的时候,打开该网站时,经常会出现以下警告:

PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20121212/pdo_mysql.so‘ - /usr/lib/php5/20121212/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0

解决方法:

remove and purge the php5-common package. 即移除并合并php5-common的安装包。

但是你在进行上述操作时,其他的包也会被移除掉,所以要把移除php5-common时,相应被移除地包记下来,待会重新安装。

注意:以下命令将会删除所有php5的相关配置文件。

apt-get --purge remove php5-common

然后把移除 php5-common 时移除地相关包重新下载安装。

apt-get install php5-common etc.

例子:

[email protected]:~# apt-get --purge remove php5-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libc-client2007e libmcrypt4 libonig2 libqdbm14 mlock
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libapache2-mod-php5* libphp-adodb* php-auth-sasl* php-net-smtp* php-net-socket* php-pear* php5* php5-cgi* php5-cli* php5-common* php5-curl* php5-ffmpeg* php5-gd* php5-geoip* php5-imap*
  php5-mcrypt* php5-memcache* php5-mysql* php5-pspell* php5-xcache*
0 upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
After this operation, 41.7 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 60054 files and directories currently installed.)
Removing libphp-adodb ...
Purging configuration files for libphp-adodb ...
Removing php5 ...
Removing libapache2-mod-php5 ...
Module php5 disabled.
To activate the new configuration, you need to run:
  service apache2 restart
Purging configuration files for libapache2-mod-php5 ...
dpkg: warning: while removing libapache2-mod-php5, directory '/etc/php5/apache2' not empty so not removed
Removing php-auth-sasl ...
Removing php-net-smtp ...
Removing php-net-socket ...
Removing php-pear ...
Purging configuration files for php-pear ...
Removing php5-cgi ...
ERROR: Module php5_cgi does not exist!
Purging configuration files for php5-cgi ...
dpkg: warning: while removing php5-cgi, directory '/etc/php5/cgi' not empty so not removed
Removing php5-pspell ...
WARNING: pspell module does not exist!
Purging configuration files for php5-pspell ...
Removing php5-mysql ...
Purging configuration files for php5-mysql ...
Removing php5-mcrypt ...
WARNING: mcrypt module does not exist!
Purging configuration files for php5-mcrypt ...
Removing php5-imap ...
WARNING: imap module does not exist!
Purging configuration files for php5-imap ...
Removing php5-gd ...
WARNING: gd module does not exist!
Purging configuration files for php5-gd ...
Removing php5-curl ...
WARNING: curl module does not exist!
Purging configuration files for php5-curl ...
Removing php5-xcache ...
WARNING: xcache module does not exist!
Purging configuration files for php5-xcache ...
Removing php5-memcache ...
WARNING: memcache module does not exist!
Purging configuration files for php5-memcache ...
Removing php5-geoip ...
Purging configuration files for php5-geoip ...
Removing php5-ffmpeg ...
WARNING: ffmpeg module does not exist!
Purging configuration files for php5-ffmpeg ...
Removing php5-cli ...
Purging configuration files for php5-cli ...
Removing php5-common ...
WARNING: pdo module does not exist!
Purging configuration files for php5-common ...
dpkg: warning: while removing php5-common, directory '/etc/php5/conf.d' not empty so not removed
Processing triggers for man-db ...
[email protected]:~# apt-get install libapache2-mod-php5 libphp-adodb php-auth-sasl php-net-smtp php-net-socket php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-ffmpeg php5-gd php5-geoip php5-imap php5-mcrypt php5-memcache php5-mysql php5-pspell php5-xcache libc-client2007e libmcrypt4 libonig2 libqdbm14 mlock
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmcrypt4 is already the newest version.
libmcrypt4 set to manually installed.
libonig2 is already the newest version.
libonig2 set to manually installed.
libqdbm14 is already the newest version.
libqdbm14 set to manually installed.
libc-client2007e is already the newest version.
libc-client2007e set to manually installed.
mlock is already the newest version.
mlock set to manually installed.
Suggested packages:
  php5-adodb php5-dev
The following NEW packages will be installed:
  libapache2-mod-php5 libphp-adodb php-auth-sasl php-net-smtp php-net-socket php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-ffmpeg php5-gd php5-geoip php5-imap php5-mcrypt
  php5-memcache php5-mysql php5-pspell php5-xcache
0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 804 kB/12.5 MB of archives.
After this operation, 41.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.us.debian.org/debian/ wheezy/main php-net-socket all 1.0.9-2 [9,068 B]
Get:2 http://ftp.us.debian.org/debian/ wheezy/main php-net-smtp all 1.6.1-1 [22.7 kB]
Get:3 http://ftp.us.debian.org/debian/ wheezy/main php5-xcache amd64 2.0.0-4 [112 kB]
Get:4 http://ftp.us.debian.org/debian/ wheezy/main libphp-adodb all 5.15-1 [567 kB]
Get:5 http://ftp.us.debian.org/debian/ wheezy/main php-auth-sasl all 1.0.4-1 [9,530 B]
Get:6 http://ftp.us.debian.org/debian/ wheezy/main php5-ffmpeg amd64 0.6.0-2.2 [23.9 kB]
Get:7 http://ftp.us.debian.org/debian/ wheezy/main php5-memcache amd64 3.0.6-6 [60.6 kB]
Fetched 804 kB in 2s (295 kB/s)
Preconfiguring packages ...
Selecting previously unselected package php5-common.
(Reading database ... 59432 files and directories currently installed.)
Unpacking php5-common (from .../php5-common_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-cli.
Unpacking php5-cli (from .../php5-cli_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php-pear.
Unpacking php-pear (from .../php-pear_5.4.41-0+deb7u1_all.deb) ...
Selecting previously unselected package php-net-socket.
Unpacking php-net-socket (from .../php-net-socket_1.0.9-2_all.deb) ...
Processing triggers for man-db ...
Setting up php5-common (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/pdo.ini with new version
Setting up php5-cli (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/cli/php.ini with new version
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode
Setting up php-pear (5.4.41-0+deb7u1) ...
Selecting previously unselected package php-net-smtp.
(Reading database ... 59677 files and directories currently installed.)
Unpacking php-net-smtp (from .../php-net-smtp_1.6.1-1_all.deb) ...
Selecting previously unselected package php5-cgi.
Unpacking php5-cgi (from .../php5-cgi_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-curl.
Unpacking php5-curl (from .../php5-curl_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-gd.
Unpacking php5-gd (from .../php5-gd_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-imap.
Unpacking php5-imap (from .../php5-imap_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-mcrypt.
Unpacking php5-mcrypt (from .../php5-mcrypt_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-mysql.
Unpacking php5-mysql (from .../php5-mysql_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-pspell.
Unpacking php5-pspell (from .../php5-pspell_5.4.41-0+deb7u1_amd64.deb) ...
Selecting previously unselected package php5-xcache.
Unpacking php5-xcache (from .../php5-xcache_2.0.0-4_amd64.deb) ...
Selecting previously unselected package php5.
Unpacking php5 (from .../php5_5.4.41-0+deb7u1_all.deb) ...
Selecting previously unselected package libphp-adodb.
Unpacking libphp-adodb (from .../libphp-adodb_5.15-1_all.deb) ...
Selecting previously unselected package php-auth-sasl.
Unpacking php-auth-sasl (from .../php-auth-sasl_1.0.4-1_all.deb) ...
Selecting previously unselected package php5-ffmpeg.
Unpacking php5-ffmpeg (from .../php5-ffmpeg_0.6.0-2.2_amd64.deb) ...
Selecting previously unselected package php5-geoip.
Unpacking php5-geoip (from .../php5-geoip_1.0.7-8_amd64.deb) ...
Selecting previously unselected package php5-memcache.
Unpacking php5-memcache (from .../php5-memcache_3.0.6-6_amd64.deb) ...
Processing triggers for man-db ...
Setting up php-net-socket (1.0.9-2) ...
Setting up php-net-smtp (1.6.1-1) ...
Setting up php5-cgi (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/cgi/php.ini with new version
update-alternatives: using /usr/bin/php5-cgi to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php5 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode
Setting up libapache2-mod-php5 (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/apache2/php.ini with new version
[ ok ] Restarting web server: apache2.
Setting up php5-curl (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/curl.ini with new version
Setting up php5-gd (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/gd.ini with new version
Setting up php5-imap (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/imap.ini with new version
Setting up php5-mcrypt (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/mcrypt.ini with new version
Setting up php5-mysql (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/mysql.ini with new version

Creating config file /etc/php5/mods-available/mysqli.ini with new version

Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
Setting up php5-pspell (5.4.41-0+deb7u1) ...

Creating config file /etc/php5/mods-available/pspell.ini with new version
Setting up php5-xcache (2.0.0-4) ...
Setting up php5 (5.4.41-0+deb7u1) ...
Setting up libphp-adodb (5.15-1) ...
Setting up php-auth-sasl (1.0.4-1) ...
Setting up php5-ffmpeg (0.6.0-2.2) ...
Setting up php5-geoip (1.0.7-8) ...
Setting up php5-memcache (3.0.6-6) ...
Processing triggers for libapache2-mod-php5 ...
[ ok ] Reloading web server config: apache2.
时间: 2024-10-09 09:49:23

pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0的相关文章

在php添加mongo过程中出现的mongo.so: > undefined symbol: php_json_encode in Unknown on line 0. After installation mongo driver for php 的错误

3 down vote my system is centos 6.3. I got the problem solved. vim /etc/php.ini then add extension=json.so before extension=mongo.so at last restart the php-fpm and nginx(apache) service php-fpm restart service ngxin restart It's OK!

PHP错误: Exception thrown without a stack frame in Unknown on line 0[转载]

来自:网易博客 就目前我的了解,在两种情况下,PHP会报 Exception thrown without a stack frame in Unknown on line 0这种错误: 1)异常捕捉用了set_exception_handler导向,Exception里面执行另一个Exception 如下面这段代码,就会出现这种问题: http://de.php.net/manual/de/function.set-exception-handler.php#88082 function er

PHP Warning: Module 'modulename' already loaded in Unknown on line 0 的解决方法

今天无间断服务加载php-fpm时,爆出了一个错误:PHP Warning:  Module 'xhprof' already loaded in Unknown on line 0 <br /> 从英文可以看出PHP的扩展xhprof已经加载了,所以就查看php.ini,搜索xhprof.so发现有两个,删除其中一个,然后无间断服务加载php-fpm就解决了该问题. PHP Warning: Module 'modulename' already loaded in Unknown on l

PHP &quot;Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0&quot; 错误

遇到这个问题,研究了很久,结果发现上传的文件的全部没有读权限 不只是文件夹,上传的文件也要至少添加+444的权限,也就是读的权限 Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/mnt/yun0/api/login.php' (include_path='.:/opt/lampp/lib/p

php-fpm启动报错:libgearman.so.8: No such file or directory in Unknown on line 0

从一台服务器上拷贝php-fpm程序到另一台后启动提示错误: /etc/init.d/php-fpm-5.4 start Starting php-fpm [27-Jul-2017 11:31:39] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525/gearman

PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0

代码在本地运行一切都OK,放到服务器上,网站访问正常,上传就出现该错误. 提示:PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0 出现问题的服务器:Windows server 2012 Standard iis8 php5.5.37 fastCGI 原因:原来是在配置php环境的时候,php.ini没有设置upload_tmp_dir . 如果 php.ini 没有设置

windows下安装mongodb扩展出现 PHP Warning: PHP Startup: in Unknown on line 0

系统 windows7 集成环境 xampp 1.8.3 php-mongo.dll下载地址 http://pecl.php.net/package/mongo/1.6.0RC2/windows 选择对应的版本下载 将php-mongo.dll放入php的ext文件夹下 修改php.ini. 但是在安装mongodb扩展的时候 出现了PHP Warning:  PHP Startup:  in Unknown on line 0的问题 版本没问题 php版本是5.5.11 和 php-mongo

php warning: php startup: in unknown on line 0

Windows下运行php-cgi报错如下: D:\php>php-cgi.exe -b 127.0.0.1:9000 -c php.ini PHP Warning:  PHP Startup:  in Unknown on line 0 <br /> <b>Warning</b>:  PHP Startup:  in <b>Unknown</b> on line <b>0</b><br /> PHP W

Warring:POST Content-Length of 625523488 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 阿星小栈

Warring:POST Content-Length of 625523488 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 上述错误信息的大致意思是,我们使用POST请求提交的数据大小超过了服务器的最大限制数(8388608字节=8MB). 解决办法:修改PHP配置文件php.ini中post_max_size的值 原文地址:https://www.cnblogs.com/dereckbu/p/9698751.ht