Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install php-mysqli extension on Centos

I'm trying to install mysqli extension to php

yum install php-mysqli

And I'm getting the next error

...
     Transaction Check Error:
          file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL55-server-5.5.34-2.cp1136.x86_64
          file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.1.71-

...

(the log continues)

mysqli package is not installed as I can check with

php -m | grep mysqli

It returns nothing...

like image 509
user1532587 Avatar asked Jan 22 '14 01:01

user1532587


People also ask

How can I enable the MySQLi extension in PHP 8?

ini file to php. ini and enable the extension by removing semicolon in the php. ini file. Don't forget to restart the server (Apache or Ngnix) after updating php.

Is MySQLi deprecated in PHP 7?

The oldest one uses the MySQL extension, which was deprecated as of PHP 5.5 and fully removed in PHP 7. The mysql() function no longer works in PHP 7.

How can I tell if MySQLi is enabled?

Check if MySQLi is Installed You can do that by visiting a phpinfo() page that you made, or by running this command: php -m | grep mysqli.


2 Answers

Finally, I've recompiled apache using EasyApache in WHM, selecting the option MySQLi in "exhaustive options list"

like image 140
user1532587 Avatar answered Oct 14 '22 07:10

user1532587


CentOS 6.5 64 bit

1- locate mysqli

/usr/lib64/php/modules/mysqli.so

2- edit php.ini add

extension=pathroyourfile

3- restart apache

like image 5
Tharange Avatar answered Oct 14 '22 06:10

Tharange