David Thomas
David Thomas

Reputation: 253358

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.

Upvotes: 5

Views: 18771

Answers (4)

Praveen Dewangan
Praveen Dewangan

Reputation: 1

With PHP5 php5-mysqli package is not available, but it is replaced by another package. May be package is obsolete.

It can be downloaded by the following command

sudo apt-get install php5-mysqlnd

Upvotes: 0

MrHus
MrHus

Reputation: 33388

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

Upvotes: 3

muffinresearch
muffinresearch

Reputation: 380

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

Upvotes: 9

Ólafur Waage
Ólafur Waage

Reputation: 70001

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

Upvotes: 2

Related Questions