wordpress+pdo+mysql扩展_WordPress中已编译的PHP 7缺少mysql扩展

bd96500e110b49cbb3cd949968f18be7.png

I have built PHP 7 with a configuration that worked for a previous version of PHP.

Now my WordPress websites get the message:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Other websites using mysqli do work. What am I missing?

I've also included all .so files with mysql in the name:

extension=dba.so

extension=mysql.so

extension=mysqli.so

extension=mysqlnd_mysql.so

extension=mysqlnd_mysqli.so

extension=mysqlnd.so

extension=pdo.so

extension=pdo_mysql.so

extension=pdo_odbc.so

extension=odbc.so

解决方案

As has been mentioned elsewhere, the ext/mysql functions have been removed. We've been talking about this for some time.

ext/mysql was built for MySQL 3.23 and only got very few additions since then while mostly keeping compatibility with this old version which makes the code a bit harder to maintain.

If you're hell-bent on putting them back in, you can add them back to PHP 7 by using the ext/mysql PECL Library

In WordPress 3.9, we added an extra layer to WPDB, causing it to switch to using the mysqli PHP library, when using PHP 5.5 or higher.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值