简体   繁体   中英

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.

在Ubuntu Hardy(8.04)中,mysqli是php5-mysql包的一部分以及标准的mysql库和pdo - 有关详细信息,请参阅http://packages.ubuntu.com/hardy/php5-mysql

sudo apt-get install php5-mysql

您可能必须使用mysqli选项安装php:apt-get install php5-mysqli

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM