Home  >  Article  >  Backend Development  >  What should I do if the php system does not support the mysql database?

What should I do if the php system does not support the mysql database?

藏色散人
藏色散人Original
2020-07-27 09:57:316725browse

The solution to the problem that the php system does not support the mysql database: first open the "php.ini" file; then modify the content to "extension_dir = "X:\PHP\ext""; then modify "disable_functions =passthru,exec ..." That's it.

What should I do if the php system does not support the mysql database?

Recommendation: "PHP Tutorial"

Solution to the server not supporting MySql database

The php.ini file has no parameters and is not configured correctly

Solution:

(1) Open the php.ini file and find:

extension_dir = "./"

Replace it Change to;

extension_dir = "X:\PHP\ext"(php扩展程序目录)

(2) Find: Windows Extensions, remove the ; number in front of each line of module configuration

extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_mysql.dll

(3) Find:

disable_functions =

Change to :

disable_functions =
passthru,exec,system,popen,chroot,escapeshellcmd,escapeshellarg,shell_exec,proc_open,proc_get_status

(4) System environment variables

Add system environment variables, variable name: PHPRC Variable value: c:\php (php directory)

Save php.ini file and copy it to C:\Windows\

Note: If there is an error in the php.ini parameters during the first configuration process, although you can modify the parameters of C:\Windows\php.ini directly, But it cannot take effect immediately. Then you need to restart IIS to use the new parameters to take effect!

The above is the detailed content of What should I do if the php system does not support the mysql database?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn