Pregunta

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.

¿Fue útil?

Solución

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

Otros consejos

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

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

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top