Download PHP from the official website (I am under the php7.2.3 version), I would like to do a MySQL connection, but no matter how to configure the mysqli extension, found mysqli can not be used.
Baidu from the search of those methods can not be used, found to be some in the php.ini configuration Extension=php_mysqli.dll, in fact, this sentence is useless.
So I took a closer look at the php.ini configuration file and found a passage
; Note:the syntax used in previous PHP versions (' Extension=<ext>. so ' and; ' extension= ' php_<ext>. dll ') is supported for legacy reasons and May; Deprecated in a future PHP major version. So, when it was possible, please; Move to the new (' extension=<ext>) syntax.
The main idea is that the previous version of the extension=<ext>.so or Extension=<ext>.dll, the current PHP version is recommended to use directly extension=<ext>
Do not need to add unwinnable extension=php_mysqli.dll this sentence, and php.ini configuration file is not originally Extension=php_mysqli.dll,
; Extension=ldap;extension=mbstring;extension=exif ; Must is after mbstring as it depends on itextension=mysqli;extension=oci8_12c ; Use with Oracle Database 12c Instant client;extension=openssl;extension=pdo_firebird;extension=pdo_mysql;extension= Pdo_oci;extension=pdo_odbc
These do not have dii suffix, directly, extension=mysqli the front of the semicolon is removed.
After the configuration I found that still can not use, and later found that extension_dir= "ext" This sentence must be changed to absolute path:
; Directory in which the loadable Extensions (modules) reside.; Http://php.net/extension-dir;extension_dir = "./"; on windows:extension_dir = "E:\PHP\php7.2\ext"
Relative paths do not seem to be available.
And then to the Apache configuration file modification, you can use, this aspect is not changed, a lot of online search,
In conclusion, there are two points that need to be changed than before:
1, directly remove; Extension=mysqli's notes;
2, Extension_dir path should be absolute path, such as Extension_dir = "E:\PHP\php7.2\ext"
End With Phpinfo () to see the result:
It means the configuration is successful!
PHP Latest Version Configuration Mysqli