(Transfer) Windows under Apache2.2.15 and Php5.3.2 installation and configuration

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, 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.
3) Find

Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all

Amended as follows:

Options FollowSymLinks
AllowOverride None
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:
phpinfo ();
In the browser address bar enter 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.

分类:PHP 时间:2010-04-26 人气:620
blog comments powered by Disqus


  • Tomcat server in the address bar do not want to port number 8080 2011-04-06

    Tomcat server in the address bar do not want to port number 8080 Directly to the port number changed to 80 after the line Because the address bar does not enter the port number, default is 80 Premise is to first stop ... because IIS IIS port number i

  • [Transfer] of HTTP and HTTPS protocol 2010-11-28

    On the HTTP protocol What is the HTTP protocol? Simply put, is a communication specification based on application layer: the two sides to communicate, we all have to comply with a specification, this specification is the HTTP protocol. HTTP protocol

  • tomcat default path and set the default start page 2010-07-06

    First of all, tell us about tomcat default path of configuration methods: I use tomcat 6.0 version of the estimate is almost the other For example: 1 in D drive with the directory to create a new D:\MyJsp 2 modified server.xml file Found <Host>..<

  • win32 for network mapping, copying files 2010-11-09

    win32 for network mapping, this information is too small. Want to help to others. And there are two difficulties: 1. NETRESOURCE the construction of data structures, API, there is a PyNETRESOURCE data structure. First thought is to construct this, it

  • Repository ubuntu to change the default path for maven 2010-11-09

    Repository maven default path is in the main directory / ~ m2 folder. After successful installation, so maven would like to change the default path, then enter the terminal :-$ ls -a The command is to check all files, including hidden files. Found. M

  • Replacement of expired certificates WAS DM + NodeAgent + WAS Server network topology operating version of the text 2010-12-31

    Replacement of expired certificates WAS DM + NodeAgent + WAS Server network topology operating version of the text First, the backup configuration file 1, the DM run backupConfig.bat (sh) script to back up and save Second, stop NodeAgent and AppServe

  • ubuntu change the default path to the maven Repository 2010-11-09

    Repository maven default path is in the main directory / ~ m2 folder. After a successful installation so maven would like to change the default path, enter the terminal :-$ ls -a The command is to check all files, including hidden files. Found. M2 fo

  • PB to connect Access database, change the default path to the solution error 2010-03-17

    PB Internet connection Access Database in many not repeat A friend had encountered a problem, call getOpenFileName () and getSaveFileName () after Question 1: The database will be abnormal, suggesting that the database path is incorrect. Or Question

  • Modify the default path cmd 2010-04-06

    Usually open cmd, command prompt is the default "C: \ Documents and Settings \ Slyar>", now I want it to turn into "D: \ CmdTools>", simple as that. 1, "Start" - "Settings" - "Control Panel" - "

  • CMD change the default path 2011-08-26

    Method one: first find the file copy cmd.exe cmd.exe file (C: \ WINDOWS \ system32 \), copy it to the path below you need, double-click opens the default path is the path of the now. I personally think that this method for the java programming is the

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.825 (s). 12 q(s)