Home > Article > Backend Development > Key points of manually installing the Apache+MySQL+PHP environment under Windows XP, apachemysql_PHP tutorial
In the entire wamp environment construction, the essential work is as follows:
1, configure the system to 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 method is: copy the dll file that needs to be called to the C:windows system32 (if it is a Windows 2000 operating system, it is C:WINNT system32) directory.
The second method is: 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
DocumentRoot D:/wwwroot-----This is the first place, modify the red part to the local apache website code master folder, which is the main folder where the project code is stored.
2-2, configure directory index
DirectoryIndex index.html index.html.var index.php index.html
2-3, combine php and Apache2
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 index Directory default file
php.ini modification:
1, set the way PHP passes parameters
register_globals=Off/On
Set to Off, that is, you can only use $_post['Variable Name'], $_GET['Variable Name'] to pass parameters
Set to On, you can directly use $Variable Name to get the passed parameter value
2. Set the dll module that needs to be loaded. The following must be configured.
;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 should basically be removed.
The difference between wamp and lamp environment construction lies in the way the system loads dll files in php.
As for the combination of apahce and php, it is basically the same under window and linux/unix. This 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:
Configuration root directory
DocumentRoot D:/wwwroot-----This is the first place, change the red part to the local location The main folder of apache's website code is the main folder where the project code is stored.
Just make these two changes and you’re basically done.