Home  >  Article  >  Backend Development  >  Install Apache+MySQL+PHP environment under Windows XP, apachemysql_PHP tutorial

Install Apache+MySQL+PHP environment under Windows XP, apachemysql_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:06:25702browse

Install Apache+MySQL+PHP environment under Windows XP, apachemysql

In the entire wamp environment construction, the essential work is as follows:

1. The configuration system can call the dll file in php by default.

Under Windows, the dll file system is in the calling state by default. There are two ways to use it.
The first is: Copy the dll file that needs to be called to the directory C:windowssystem32 (if it is a Windows 2000 operating system, it is C:WINNTsystem32).
The second is to append the address of the folder where the .dll suffix file is located to the system's path variable. In this case, when the system starts, the dll file will be automatically loaded into the memory by default.
The third method is: change php.ini; extension_dir = "./" to extension_dir = "D:/php5/ext"

Note that you need to restart the Apache server to take effect.

2. Apache configuration essentially allows the apache server software to parse .php files.

Configure in httpd.conf and php.ini respectively.

Modify in httpd.conf:
2-1, configure the root directory

Copy code The code is as follows:

DocumentRoot D:/wwwroot-----This is the first place. Change the red part to the main folder of the local apache website code, which is the main folder where the project code is stored.
-------This is the second location, same as above.

2-2, configure directory index

Copy code The code is as follows:

DirectoryIndex index.html index.html.var index.php index.html

2-3, combining php and Apache2

Copy code The code is as follows:

LoadModule php5_module D:/php5/php5apache2.dll----------Load php in module mode
PHPIniDir "D:/php"--------------------Specify the location of php configuration file php.ini
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html--------------Add a file type that can execute php
DirectoryIndex index.php index.html index.html.var-----Configure the index directory default file

php.ini modification:

1. Set the way PHP passes parameters

Copy code The code is as follows:

register_globals=Off/On

Set to Off, which means you can only use $_post['variable name'] and $_GET['variable name'] to pass parameters
Set to On, you can directly use the $ variable name to get the passed parameter value

2. Set the dll module that needs to be loaded. The following must be configured.

Copy code The code is as follows:

;extension=php_gd2.dll---------GD library extension file, users can process images, such as generating images, cropping and compressing images, watermarking images, etc.
;extension=php_mbstring.dll--------Large character set, supports conversion between multiple character sets
;extension=php_mcrypt.dll
;extension=php_mysql.dll
;extension=php_mysqli.dll

Remove the semicolon and set the dll module that needs to be loaded. The above ones are basically to be removed.

The difference between wamp and lamp environment construction lies in the way the system loads dll files in php,
The combination of apahce and php is basically the same under window and linux/unix, and is achieved by modifying httpd.conf and php.ini.

Therefore, in the actual work process, the fastest way to manually configure the server is:
1. Manually install the apache server and manually install and configure php.
2. Based on the previously configured php.ini and httpd.conf files, copy the two files directly to the relevant directories.
The key directories in httpd.conf need to be modified, mainly:
Configure root directory

Copy code The code is as follows:

DocumentRoot D:/wwwroot-----This is the first place. Change the red part to the main folder of the local apache website code, which is the main folder where the project code is stored.
-------This is the second location, same as above.

Just make these two changes and you’re basically done.

After the above configuration is completed, the environment is basically set up. I hope your friends will like it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/959109.htmlTechArticleInstall the Apache+MySQL+PHP environment under Windows XP, apachemysql In the entire wamp environment construction, the essential work is as follows : 1. The configuration system can call the dll file in php by default. In...
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