LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2016, 02:24 PM   #1
Haniver
LQ Newbie
 
Registered: Dec 2004
Posts: 6

Rep: Reputation: 0
Question Install mysqli


Hello,
I have a VPS with CentOS 7. I have all LAMP installed, but not mysqli (it's not showing under php -m | grep -i mysql). My php version is 5.5.36. If I do
Quote:
#yum install php-mysqli
I get the error:
Quote:
No package php-mysqli available.
Error: Nothing to do
How do I install the extension?
Thanks.
 
Old 06-29-2016, 03:52 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by Haniver View Post
it's not showing under php -m | grep -i mysql
That means it's not loaded but it may be installed in your system

Check in extension directory
php -i | grep extension_dir

Edit: maybe the package is php-mysql, not php-mysqli
Quote:
Originally Posted by Davinken
On CentOS 6 php-mysqli has been already incorporated into the php-mysql RPM package.
http://php.net/manual/en/mysqli.installation.php

Anyway not expert in Centos here, but web search engine is always useful

Last edited by keefaz; 06-29-2016 at 03:56 PM.
 
Old 06-29-2016, 04:20 PM   #3
Haniver
LQ Newbie
 
Registered: Dec 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply.
php -i | grep extension_dir
outputs:
extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20121212 => /usr/local/lib/php/extensions/no-debug-non-zts-20121212
That path is a directory that contains only three files: pdo.so pdo_mysql.so pdo_sqlite.so
What do I do with them?
Maybe I have mysqli installed as you say, but I don't know how to enable it. I can't find a reference that gives clear instructions on it. Can you help me on that?
Thanks.
 
Old 06-29-2016, 05:40 PM   #4
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
mysqli should be included as part of the php-mysql package. There should be a mysqli.ini file in /etc/php.d/ which enables the extension in php.

Make a php page to run phpinfo() which will tell you for sure if php recognizes mysqli.

Also, centos7 installs mariadb as a plug-in replacement for mysql.
 
Old 06-29-2016, 06:02 PM   #5
Haniver
LQ Newbie
 
Registered: Dec 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Doug G, I didn't try your solution because I found one on the web that worked:

To install mysqli using EachApache:

1. Login to WHM as 'root' user.
2. Either search for "EasyApache" or go to Software > EasyApache
3. Scroll down and select a build option (Previously Saved Config)
4. Click Start "Start customizing based on profile"
5. Select the version of Apache and click "Next Step".
6. Select the version of PHP and click "Next Step".
7. Chose additional options within the "Short Options List"
8. Select "Exhaustive Options List" and look for "MySQL Improved extension"
9. Click "Save and Build"
 
  


Reply

Tags
lamp, php5



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't get mysqli to work on Fedora 20 FooIsFood Linux - Server 1 05-28-2014 08:56 PM
Help me to disable mysqli in php kaviajan Linux - Server 1 09-25-2012 04:46 AM
The mysqli extension is missing. DeSouffle Linux - Server 1 08-31-2012 12:58 PM
[SOLVED] CentOS 5.5 mysqli support junust Linux - General 3 03-16-2011 10:09 AM
Trying to install MySQLi puppymagic Linux - Newbie 1 08-19-2010 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration