Install the 64-bit php development environment. Recently I heard that PHP5.4 is fast, so I want to build a local environment for testing. I plan to install PHP5.4.8, Apache2.4.3, and mysql5.28 in Windows XP SP3. First Download PHP. recently I heard that PHP5.4 is very fast, so I want to build a local environment for testing. I plan to install PHP5.4.8, Apache2.4.3, and mysql5.28 in windows xp sp3.
First download the latest versions of PHP, Apache, and Mysql.
PHP5.4.8 version: http://windows.php.net/download/
Mysql5.5.28 version: http://www.mysql.com/downloads/mysql/
Apache2.4.3 version: http://www.apachelounge.com/download/
Download Apache note in this page also download a DLL file: php5apache2_4.dll-php-5.4-win32.zip (with PHP version must correspond)
Preparations have been completed.
The following describes how to install APache, which is the most troublesome and simple.
Part 1: install Apache2.4.3
1. download the decompressed file and decompress it to the desired location. (Here I will use D: \ Acpache24 as an example)
2. open the httpd. conf file under Apache24 \ conf and use notepad to open it.
(1) replace ServerRoot "c:/Apache24" with ServerRoot "D:/Apache24"; // The location of the Apache program.
(2) it doesn't matter if the ServerAdmin of row 3 is changed;
(3) remove the "#" sign before the ServerName in line 3;
(4) Change "c:/Apache24/htdocs" to DocumentRoot "D:/www"; // the root directory of the website.
238th rows Change ;
Note: the WWW folder should be created by yourself. if it is not created, an error will be reported.
(5) change 271st rows of DirectoryIndex index.html to DirectoryIndex index.html index. php index.htm // support more metrics pages.
(6) 354th lines of ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" changed to ScriptAlias/cgi-bin/"d:/Apache24/cgi-bin /"
(7) rows 370th Change 3. start Apache. Start --- run, enter cmd, and open the command prompt. Enter d: Press enter cd Apache24 \ bin, press enter httpd, and press enter.
If httpd. conf is correctly configured, enter httpd and press enter.
5. test. You can put the index.html under the Apache24 \ htdocsdirectory under the D: \ www Directory. "It works" appears when you access It through a browser, which means that apache has been correctly installed.
Note: You cannot close this command window, otherwise apache will close it.
6. add a windows system service to enable Apache to start itself.
(1) close the httpd command window in step 3. Otherwise, an error will be reported.
(2) start --- run, enter cmd, and then open a command prompt. Enter d: Press enter cd Apache24 \ bin and press enter.
The command to add the service here is: httpd.exe-k install-n "servicename"
Servicename is the name of Apache in the windows service. Example: httpd.exe-k install-n "Apache24"
After you enter httpd.exe-k install-n "Apache24", a prompt is displayed, indicating that the "service" contains the Apache24 service item. At this time, you can choose to start the Apache service.
If you want to uninstall the service, stop the service first. Then, enter httpd.exe-k uninstall-n "Apache24" to uninstall the service.
In the future, you can use apachemonitor.exe under the Apache24 \ binfile to control this Apache. The taskbar also displays the software to easily manage Apache running.
Appendix: you can place Apache24 in the C root directory, that is, C: \ Apache24
In above 2, as long as you change (3) (5), run the cmd command to directly enter cd c: \ apache24 \ bin and press enter httpd to press Enter. this is much easier.
The basic installation of Apache has been completed.
The following describes how to install PHP.
Part 2: install PHP5.4.8
1. download the decompressed file and decompress it to the desired location. (Here I will use D: \ PHP as an example)
Decompress php5apache2_4.dll-php-5.4-win32.zip and select php5apache2_4.dll from PHP 5.4.7 to the PHP directory.
Note: php5apache2_4.dll of PHP5.4.8 is not available, so I chose the latest version.
2. copy php. ini-development and change it to PHP. ini.
3. open httpd. conf under Apache24 \ conf and add
# php5 supportLoadModule php5_module "d:/php/php5apache2_4.dll"AddHandler application/x-httpd-php .php# configure the path to php.iniPHPIniDir "d:/php"
Used to support PHP, where d:/php is the PHP root directory. Because Apache2.4.3 is used, php5_module is php5apache2_4.dll.
4. restart the Apache server.
5. test. Delete other files in WWW and create an index. php file. the content is Save. accessing the php information indicates that php has been successfully installed.
The basic installation of PHP has been completed.
The following describes how to install mysql.
Part 3: install Mysql5.5.28
1. run the installation file directly, which is not described here.
2. php supports MYSQL settings
(1) row 730th; extension_dir = "ext", remove the previous ";" and change it to extension_dir = "d: \ PHP \ ext"
(2) remove the preceding ";" in rows 880th and 881.
Extension = php_mysql.dll
Extension = php_mysqli.dll
Note: There are a lot of DLL in lines 838th to 908th. if you want to use it, remove the previous.
(3) restart Apache.
Mysql installation is complete.
The rest is some Apache, php, and Mysql settings. There are many things. this is a wise thing. I am not going to be ugly here.
Bytes. I plan to install PHP5.4.8, Apache2.4.3, and mysql5.28 in windows xp sp3. First Download PHP ,...