Keywords: Install the latest Apache + PHP + MySQL guide in Windows
Install the latest Apache + PHP + MySQL guide in Windows
1. installation environment
The latest versions of Windows XP, Apache, PHP, and MySQL are available on the official website:
* Apache 2.2.9:
* PHP 5.2
* In MySQL 5.0
2. install Apache 2.2.9 on Windows XP
Installation in Windows XP
1. run Apache 2.2.9 InstallationProgram, Follow the prompts to go all the way to next. Enter a domain name in the network domain and server name fields of server information, such as php.com, and click Next as prompted.
2. At the end of installation, a DOS window will pop up and disappear. This is automatically started by Apache.
3. install PHP 5.2 in Windows XP
1. decompress the downloaded PHP 5 zip package. I directly decompress the PHP 5.2 ZIP file to the D: \ PHP Directory. It is not recommended to use Win32 installer to install PHP (it is difficult to install extension later ).
2. Go to the PHP installation directory in the resource manager and copy PHP. ini-Dist or PHP. ini-recommended and name it PHP. ini. Then open PHP. ini.
3. Find:
; Extension = php_mysql.dll
Remove the previous; number and change it:
Extension = php_mysql.dll
4. Find:
Extension_dir = "./"
Change it to the absolute path of the ext subdirectory in your PHP installation directory. For example, my:
Extension_dir = "D:/PHP/EXT /"
5. Configure Apache and PHP
Open the httpd. conf file in the conf subdirectory of the Apache installation directory.
1. Find:
DocumentRoot "xxxxxxx"
Change to the content directory of your local website. For example, my:
DocumentRoot "E:/Web"
After the change, pull down and find "# This shoshould be changed to whatever you set DocumentRoot to.", and then change the following content.
<Directory "E:/Web">
2. Find the loadmodule and add the following two lines in the blank space according to your PHP installation directory:
Loadmodule php5_module "D:/PHP/php5apache2_2.dll"
Phpinidir "D:/PHP"
3. Find:
Directoryindex index.html
To:
Directoryindex index. php index.html
4. Find:
Addtype application/X-gzip. GZ. tgz
Add these two rows:
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. html
5. Save httpd. conf.
6. Create an index. php file in your website directory (E:/web/For example). The content is as follows:
<? PHP
Phpinfo ();
?>
7. Start the apache service in the DOS window (assuming that Apache is installed in c: \ Program Files \ Apache Software Foundation \ apache2.2 \)
# If it has been started before, stop it first
C: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin \> httpd-K stop
Or: net stop apache2.2
# Start the apahce Service
C: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin \> httpd-K start
Or: Net start apache2.2
8. Open http: // localhost/index. php to view the test output.
6. Install MySQL 5.0 in Windows XP
4. MySQL installation is relatively simple. It provides a Win32 installation package. After the download, follow the prompts to install it all the way. You can also select Custom in the installation type to specify the installation directory, which is directly installed on the C drive by default.
After the installation is complete, you will be asked if you want to register on the official website. skip this step. Then, you will be asked whether to configure the MySQL server now, select and continue, and set the character set and the password of the root administrator as prompted.
OK. Now you can use Apache + MySQL + PHP to develop web programs under XP.