Write one of the latest and most detailed installation instructions, because I have to reinstall the system after the configuration, and some only need to modify the configuration file on it
First, the use of software:
Apache_2.2.3-win32-x86-no_ssl.msi
Php-5.2.0-win32.zip
Mysql-4.1.18-win32.zip or Mysql-5.0.18-win32.zip
phpMyAdmin-2.9.1.1
Configuration environment: Windows 2003 SP1
Ii. Specific steps
Note: The installation process, any directory and file name do not use spaces,
Do not use D:\Program Files to use D:\ProgramFiles
This installation directory is D:\PHPServer\
1. Apache_2.2.3-win32-x86-no_ssl.msi
Apache Server Software, I downloaded the win version, the 2.0 series configuration are similar.
Double-click the install apache2.2.3, I install it to D:\PHPServer\Apache2\ Note that the directory name does not contain spaces, or the following PHP will be set up error. After the installation, Apache automatically run, in the browser input http://127.0.0.1 is not showing the default page, if you do not want to see this page, you can go to the D:\PHPServer\Apache2\conf directory to find httpd.conf Turn on the edit and look for DocumentRoot "in the 2.0-series version, you'll find only one documentroot," You can change the path within quotes to your own path, such as DocumentRoot "D:/phpserver" now the default root directory is D:/phpserver Note here is the "/".
Note: If it is a zip compression package, simply extract the Apache2.2 to the directory, and then run the cmd
D:\PHPServer\Apache2\bin\httpd-k Install: Installation
D:\PHPServer\Apache2\bin\httpd-k Start: Beginning
It's okay.
2. Installation php5.2
Downloaded Php-5.2-win32 is generally a zip format of the package, extracted into the D:\PHPServer directory, and make files in a folder, change the folder named PhP5, so that the next work. Now we see that there are two folders under D:\PHPServer, one is apache2 (install apache2.2.3 automatically generated a folder) another is php5 my way is a folder for each software, and these files are sandwiched in the same directory, so easy to find. OK, so we're going to start configuring Apache to support PHP5.
First, find the php.ini-dist rename in the D:\PHPSERVER\PHP5 directory to php.ini and copy it to the C:\windows directory.
Then, copy the Php5ts.dll,libmysql.dll to C:\windows\system32 in the D:\PHPSERVER\PHP5 directory
You can also copy the following command to a bat file
@echo off
Copy Libmysql.dll%windir%\system32\
Copy Php5ts.dll%windir%\system32\
Copy Ext/php_gd2.dll%windir%\system32\
Copy Ext/php_mysql.dll%windir%\system32\
Copy php.ini%windir%\
Run in the root directory of PHP5
Next, we start to configure the httpd.conf file under D:\PHPServer\Apache\Apache2\conf, open httpd.conf (available Notepad to open), note that Apache2.2 and previous versions are different, Some of the configuration files are placed in the Conf/extra directory, such as language file httpd-languages.conf, user directory files httpd-userdir.conf
1, the original Apache2 in this step "find Adddefaultcharset iso-8859-1 change it to adddefaultcharset Gb2312″ can not need
2, find DirectoryIndex index.html in the back to join Index.htm index.php Index.html.var
3. Modular Installation Configuration
Find #LoadModule Ssl_module modules/mod_ssl.so This line, add a line after this row
LoadModule php5_module D:/phpserver/php5/php5apache2_2.dll (described below)
where d:/phpserver/php5/for you PHP directory
Find AddType application/x-gzip gz tgz This line, add the following
scriptalias/php/"d:/phpserver/php5/"
AddType application/x-httpd-php. php
Action application/x-httpd-php "/php/php-cgi.exe"
Note that if you install post you don ' t have permission to access/on this server.
Find the httpd.conf in the
Deny from all
To
Allow from all
Apache 2.2.2 + php5.1.* solutions that cannot be run
Download Http://www.apachelounge.com/download/mods/php5apache2.dll-php5.1.x.zip This patch
php5.1.* + Apache 2.2.2 Can not be started after the traditional modular method is installed.
Tips:
"Cannot load D:/phpserver/php5/php5apache2.dll into server:the specified module could not is found."
Reason:
The Php5apache2.dll in the PHP compression package only applies to apache2.0.*
PHP5.2 the Php5apache2_2.dll in the zip bag, there's no problem.
Workaround:
Download the file and unzip it. A total of three files.
Vcredist_x86.exe
Php5apache2.dll
Httpd.exe.manifest
Okay, here we go.
1. Rename Php5apache2.dll to php5apache22.dll copy to PHP5 root directory.
2. Copy the Httpd.exe.manifest file to the Bin folder under your apache2 installation directory.
3. Double-click to run Vcredist_x86.exe installation. (If the. NET Framework 2 is already installed in your system, you can skip this step)
Complete! To restart your apache2.2, now look at your Apache is not already supported PHP, OH, success!
4. Installation Mysql-4.1.18-win
Because Apache is configured in win environment, the MySQL used here is also win version. After decompression, install mysql4.1.18 to the d:/apachegroup/directory, and make MySQL complete installation to the MySQL directory, I install here for the D:\PHPServer\MySQL4, installed MySQL no specific requirements, Click Next to the next step on the line, and finally set the root password is OK. Open Windows Task Manager to see if there are any mysql-nt.exe, if any, it runs normally.
5, the configuration php.ini. Enter C:\WINDOWS Open php.ini Find Extension_dir = "./" Change to Extension_dir = "D:/phpserver/php5/ext"
Found it
; Extension=php_mbstring.dll
; Extension=php_mysql.dll
; Extension=php_gd2.dll
Will '; ' Remove Change to
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_gd2.dll
Found it
; Session.save_path = "/tmp"
Will '; ' Remove the directory where you saved the session, such as
Session.save_path = "D:/phpserver/php5/session";
Add a line to the bottom of the php.ini
Current 1/2 page
12 Next read the full text