Instalacja

By zainstalować rozszerzenie mysqli dla PHP należy użyć opcji konfiguracyjnej --with-mysqli=mysql_config_path/mysql_config , gdzie mysql_config_path wskazuje na ścieżkę dostępu do programu mysql_config, który występuje w wersjach MySQL powyżej 4.1.

Jeśli chcesz zainstalować rozszerzenie mysql razem z rozszerzeniem mysqli musisz użyć tej samej biblioteki klienckiej w celu uniknięcia konfliktów.

add a note add a note

User Contributed Notes 4 notes

up
-13
David dot Kit dot Friedman at gmail dot com
14 years ago
>On Windows, PHP is most commonly installed using the binary installer. Once PHP has been installed, some >configuration is required to enable mysqli and specify the client library you want it to use.

Basically, if you want to add extensions you can double-click again on the installer file. The installer will find the already installed PHP and will ask if you want to change the installation.

When you go through the prompts it will take you back to the list of extensions and you can pick which extensions you want to add.

For the mysqli extension the installer also edited php.ini so that the extension was enabled:

[PHP_MYSQLI]
extension=php_mysqli.dll

the installer added those lines to the end of the file.
up
-19
Mark F
13 years ago
Just to note with regards to SSL and compression. MySQLnd and thus extensions using mysqlnd such as mysqli... now supports SSL and compression. Both have been supported inside mysqlnd since PHP 5.3.3 - http://www.php.net/manual/en/mysqlnd.overview.php
up
-27
bansi
4 years ago
In Windows 10 if mysqli is not working in PHP 7.3 you should add PHP directory to the PATH and restart your web server. This behavior was not there in PHP 7.0.27.
up
-56
josh dot ribakoff at gmail dot com
14 years ago
I kept getting configure errors:

/tmp/cc4f2PKd.o: In function `main':
/usr/src/php-5.3.0/configure:14287: undefined reference to `yp_get_default_domain'
collect2: ld returned 1 exit status
configure: failed program was:
#line 14270 "configure"
#include "confdefs.h"

The solution was to configure with mysql native driver as outlined on this page.
To Top