Many friends want to configure the apache + php + mysql runtime environment in the window. In fact, from such a long experience, iis is still used in win2003, if you are familiar with apache, you can use apache
Preparations
1 download apache http://httpd.apache.org/download.cgi#apache24 httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
Openssl indicates that the openssl module is included. you can use openssl to configure an SSL secure link for Apache.
2 Download php http://windows.php.net/downloads/releases/archives/ php-5.3.5-Win32-VC6-x86.zip
Download vc6
VC6: legacy Visual Studio 6 compiler, which is compiled using this compiler.
VC9: the Visual Studio 2008 compiler is compiled using Microsoft's VS editor.
3. download mysql http://mysql.llarian.net/Downloads/MySQL-5.5/mysql-5.5.23-winx64.msi
Installation 2
1. apache is relatively simple. it can be completed one by one.
Browser verification. The page appears. the verification succeeds.
2 php installation
Download the zip package and decompress it to a directory. rename the directory to php.
3 mysql
Omitted
Three configurations
Php configuration
Rename the php. ini-development file to php. ini.
Specify the Directory of the PHP extension package to call the corresponding DLL file
; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "./" ; On windows: ; extension_dir = "ext"
Change
; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "./" ; On windows: extension_dir = "D:/servers/php/ext"
Remove the following configuration notes to support mysql
extension=php_curl.dll extension=php_gd2.dll extension=php_mysql.dll extension=php_pdo_mysql.dll extension=php_pdo_odbc.dll
Support session
Session. save_path = "e:/temp"
Upload file directory configuration
Upload_tmp_dir = "e:/temp"
Time zone configuration
Date. timezone = Asia/Shanghai
Apache configuration
Under # LoadModule vhost_alias_module modules/mod_vhost_alias.so, add
LoadModule php5_module "e:/servers/php/php5apache2_2.dll" PHPIniDir "e:/servers/php" AddType application/x-httpd-php .php .html .htm
Modify the web home directory
Copy the code as follows:
DocumentRoot "D:/servers/Apache2.2/htdocs"
Change
Copy the code as follows:
DocumentRoot "D:/servers/phpweb"
Copy the code as follows:
Change
Copy the code as follows:
Copy the code as follows:
DirectoryIndex index.html
Change
Copy the code as follows:
DirectoryIndex index. php index.html
Restart apache
Mysql configuration
Omitted
4. test
Create the PHP web directory D: \ servers \ phpweb
Create a test file index. php
Copy the code as follows:
Phpinfo ();
?>
Browse: http: // localhost
The following information is displayed, indicating that the configuration is successful:
Create a mysql connection test file
Copy the code as follows:
$ Connect = mysql_connect ("10.71.196.147", "user ","");
If (! $ Connect) echo "Mysql Connect Error! ";
Else echo "mysql connection successful ";
Mysql_close ();
?>
Browse: http: // localhost/mysqltest. php test mysql connection