Jump to content

PHP issues with mysqli extension and PDO, pdo_mysql extensions


Go to solution Solved by requinix,

Recommended Posts

A script I am going to install requires either the mysqli extension or both the PDO and pdo_mysql extensions.

VPS running Centos 7 with Nginx.

PHP installation:

rpm -qa | grep php
php70w-fpm-7.0.17-1.w7.x86_64
php70w-opcache-7.0.17-1.w7.x86_64
php70w-common-7.0.17-1.w7.x86_64

When trying to install php-mysqli I've got the following output:

yum install php-mysqli
Loaded plugins: fastestmirror, priorities, replace
Loading mirror speeds from cached hostfile
 * base: mirror.softaculous.com
 * epel: fr2.rpmfind.net
 * extras: ftp.halifax.rwth-aachen.de
 * updates: ftp.plusline.de
 * webtatic: sp.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php71w-mysql.x86_64 0:7.1.3-1.w7 will be installed
--> Processing Dependency: php71w-pdo(x86-64) for package: php71w-mysql-7.1.3-1.w7.x86_64
--> Running transaction check
---> Package php71w-pdo.x86_64 0:7.1.3-1.w7 will be installed
--> Processing Dependency: php71w-common(x86-64) = 7.1.3-1.w7 for package: php71w-pdo-7.1.3-1.w7.x86_64
--> Running transaction check
---> Package php71w-common.x86_64 0:7.1.3-1.w7 will be installed
--> Processing Conflict: php71w-common-7.1.3-1.w7.x86_64 conflicts php-common < 7.1
--> Finished Dependency Resolution
Error: php71w-common conflicts with php70w-common-7.0.17-1.w7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

So it seems to me there is a conflict between php71w-common and php70w-common.

Php71w is installed but not in use.

I have tried to install something else and got a similar error, this time with php-common-5.4.16:

yum install php-devel php-pear mysql-devel httpd-devel
Processing Conflict: php70w-common-7.0.17-1.w7.x86_64 conflicts php-common < 7.0
Error: php70w-common conflicts with php-common-5.4.16-42.el7.x86_64

I am pretty new to unix and php, so please forgive me if my question is silly.

What can I do to get the mysqli extension or the PDO, pdo_mysql extensions working and is there an easy way to remove php 5.4.16 and php 7.1 to avoid such conflicts in the future.

Thank you very much for any help!

  • Solution

You have 7.0 installed but CentOS has 7.1 in their repos. Try

yum install php70w-mysqli
As for multiple versions, don't. Until you understand how your OS does packaging, use whatever version they provide. That probably means uninstalling PHP 5.whatever and 7.0 you have now and installing 7.1 instead.
  • Like 1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.