Unable to install php-mysqli on PHP7

前端 未结 2 1221
南旧
南旧 2021-02-14 04:55

I have installed PHP 7, mysql5.7, Apache2.2, CentOS6.

And I\'m installing CodeIgniter3.0.6.

When I use database connection, error occured and said



        
2条回答
  •  隐瞒了意图╮
    2021-02-14 05:25

    Please remind that the mysql extension is deprecated and doesn't exists anymore with PHP 7.

    The php-mysqlnd package provides only the mysqli and pdo_mysql extensions.

    The php-pecl-mysql is also available, build from a git snapshot, provided for compatibility for legacy applications, but is not supported.

    From the original question:

    Installed: php-common-7.0.4-1.el6.remi.x86_64 (@remi-php70)

    You have php 7.0.4 installed from remi-php70, but the repository is not enabled. You need to enabled it, so yum will find the right package matching the installed version.

    From the Configuration Wizard instructions:

    yum install yum-utils
    yum-config-manager --enable remi-php70
    yum install php-mysqlnd
    

    Notice: the correct command to install an "foo" extension is yum install php-foo, so "yum install php-mysql" will install the package which provides the mysql extension (so php-pecl-mysql), "yum install php-mysqli" will install the packages which provides the mysqli extension (so php-mysqlnd).

提交回复
热议问题