Under Apache2.2.15 and Php5.3.2 Windows installation and configuration
Apache installation and configuration
Open the apache website http://archive.apache.org/dist/httpd/binaries/win32/ or mirror sites http://apache.mirror.phpchina.com/httpd/binaries/win32/,
Download inside apache_2.2.15-win32-x86-no_ssl.msi installation files.
Among them, there are two types of the same version: no_ssl and openssl, openssl ssl security certification to more a model, it is the HTTPS protocol instead of HTTP, this is a server with SSL web servers in general the difference.
In general, we downloaded no_ssl version ok.
Download a good apache installation file, click install, 3 times in a row next, will enter the server information configuration interface for the importation of network domain, server domain and website administrator email address, ordinary users can easily fill in accordance with the format on the line. Press Next again, after the interface appears select the installation path, the default path to a longer, pharmar the installation path was revised to: "D: / Program Files / Apache /", continue with the installation until complete.
Installed, apache to start automatically, you can test the success of start apache. Enter in the browser address bar: http://localhost/ or http://127.0.0.1/, if "It works.", Then congratulate you, apache has been successfully installed; the same time the task bar at the bottom right corner of the computer There is a green icon apache server is running.
apache there is a configuration file:
httpd: conf need to configure to run php. Location: D: / Program Files / Apache / conf directory. Open the httpd: conf:
1), find the "DocumentRoot", here is the place designated home directory. The default is: "D: / Program Files / Apache / htdocs", you can use the default directory, you can define yourself one, such as: "D: / PHP". Note: The directory at the end do not add "/."
2) Find "DirectoryIndex", here is the default home page file name, you can join in the index.html index.php and so on the back. Each type must leave a space between.
Order deny, allow
Deny from all
Amended as follows:
Order deny, allow
allow from all
If you do not change here, it may appear You don't have permission to access / on this server. This error message, especially changing the default home page after the path.
Note: Each modification httpd: conf file, should restart the apache server. Also, if you run win32 system also iis server, then we must first stop the iis server is running, then restart apache, otherwise the apache server does not start.
Php installation and configuration
First, from the official website of http://www.php.net/downloads.php php download windows version, there are two versions: PHP 5.3.2 zip package and the PHP 5.3.2 installer, the latest version is 5.3.2, pharmar using 5.3.2 version. PHP 5.3.2 installer for automatic installation is relatively automatic, but is limited in many ways, so pharmar not recommend this approach, here PHP 5.3.2zip package archive mode of the manually installed.
1), the PHP zip extracting compressed package into a directory, recommended: "C: / PHP", pharmar is D: / Program Files / Php.
2), the PHP directory (D: / Program Files / Php) under the php.ini-dist file to php.ini, PHP's configuration file is that it, modify the following places, well after the changes to php.ini files to C: / WINDOWS / directory:
extension_dir = "D: / Program Files / Php / ext", pointing to php folder to place "php_ *. dll" file. PHP4 and PHP5 path to differ here.
doc_root = "D: / PHP", point to set the home position in front of apache;
default_charset = "gb2312", modify the default character set, here, if preceded by a semicolon ";", remove the semicolon;
register_globals = Off to register_globals = On, so that an effective global variable transmission;
extension = php_dba.dll if there is a semicolon in front of the abolition of the semicolon, the following is the same;
extension = php_dbase.dll
extension = php_gd2.dll GD library to do maps, are generally used for graphical verification code;
extension = php_mysql.dll to connect MYSQL database;
3), the PHP directory php5ts.dll files are copied to C: / WINDOWS/system32 directory.
4) Finally, modify the Apache httpd.conf file. At the end of the file add the following two lines, that in order to install the PHP module into Apache:
LoadModule php5_module D: / Program Files/Php/php5apache2_2.dll
AddType application / x-httpd-php. Php
Note: The first line of the directory path to update the current version of apache for the dynamic link library, for example here I use the apache2.2.15 version and php5.3.2, then this file must be php5apache2_2.dll, but can not be php5apache.dll, php5apache2 . dll and so on. The second step of the suffix php behavior.
php4 version, need to add the line AddType mod_php4.c, while in php5 in, you do not need this line AddType mod_php5.c a, php5 has been integrated, otherwise apache will not start.
Completed the above process of configuring apache and php, and restart apache. In the server's default directory "D: / Program Files / Apache / htdocs" in the new file index.php, write the following code:
In the browser address bar enter http://127.0.0.1/ or http://localhost/, you'll see the php version of the information. Stop here, php and apache already successfully installed.
Here is the details: apache configuration file httpd.conf in the directory partition symbol is "/", and PHP configuration file php.ini in the directory requires a backslash "/" Do not confuse oh.
MYSQL Installation is easy. To the official website http://dev.mysql.com/downloads/mysql/5.0.html, download the windows platform for mysql, select the Windows ZIP / Setup.EXE (x86) the latest version is 5.1.45, download. Direct installation, the installation is complete, you can enter the configuration wizard, set the mysql database password. All OK.
Installation and configuration of mysql See: phpMyAdmin installation configuration and problem solving
pharmar encountered an error during installation:
After installing PHP on Windows, Apache appears LoadModule takes two arguments of the error, the main reason is the httpd.conf in the sentence:
LoadModule php5_module D: / Program Files/PHP/php5apache2_2.dll
Explain the procedure to Program Files in the space as a separator of two parameters, so the statement can not appear spaces. On the Internet for a long time did not find a solution, and finally with a directory sign before solving the problem, change the following:
LoadModule php5_module ../php/php5apache2_2.dll
Because apache installed in D: / Program Files / Apache / directory, PHP installed in D: / Program Files / php /, so .. / on that D: / Program Files / directories, this finally buttoned, I hope you install configuration process with more than ponder always a way.