Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqli for php on Ubuntu 8.04 LAMP stack

Does anyone know how, on Ubuntu 8.04, with PHP 5 and MySQL 5.0, to enable/install the mysqli package/extensions?

Preferably I'd like to preserve the existing installations, but, if necessary, I'll reinstall from scratch.

I realise it's not, technically, programming-related but, I think (at a stretch, maybe) it's programming-enabling? hopes

Thanks for any help you're able to provide.

like image 571
David Thomas Avatar asked Apr 03 '09 13:04

David Thomas


3 Answers

In Ubuntu Hardy (8.04) mysqli is part of the php5-mysql package along with the standard mysql library and pdo - see http://packages.ubuntu.com/hardy/php5-mysql for more info.

sudo apt-get install php5-mysql
like image 111
muffinresearch Avatar answered Oct 21 '22 18:10

muffinresearch


You might have to install php with the mysqli option: apt-get install php5-mysqli

like image 3
MrHus Avatar answered Oct 21 '22 18:10

MrHus


From the PHP documentation.

To ensure that the mysqli extension for PHP is enabled, you will need to configure the PHP source code to use mysqli. This is achieved by running the configure script with the option --with-mysqli=mysql_config_path/mysql_config, prior to building PHP. This will enable mysqli and it will use the MySQL Client Library (libmysql) to communicate with the MySQL Server.

But since you are on ubuntu. You can just install the mysqli package. Details about it here.

sudo apt-get install php5-mysqli
like image 2
Ólafur Waage Avatar answered Oct 21 '22 20:10

Ólafur Waage