PHP Latest Version Configuration Mysqli

Source: Internet
Author: User
Tags php latest version

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.