Install apache2+php5+mysql5+phpmyadmin under Windows Vista

Source: Internet
Author: User
Tags install php phpmyadmin root directory

In order to reinstall the system later, it is recommended not to install in the system disk, which is installed in D disk. It can be a root directory, or it can be a different directory, but the best directory name should not have spaces, so that some errors can be avoided.

Install Apache 2.2.4

After the start, agree to the agreement, all the way next. To fill in the server information This step, in Network Domain, Server name to fill in the localhost, of course, you fill in the other does not have any effect; the option below selects the default first, Next. Installation type, select Custom,next. Install the function default; Install the address, I choose here is D:\\apache2.2,next. After confirming the error, press install to start the installation.

Hint: Install Apache installation complete under xp/2000, Win2003sp2,vista still need step.

In Vista, when installed to the last, there will be two errors, mainly unable to register the service. In fact, does not affect (next solves this problem), ignores the error, completes installs. Locate the command prompt in the Start menu > All Programs > Attachments, or search for cmd at the beginning, and right-click to run as Administrator. Under the bin subdirectory of the Apache installation directory, execute the httpd-k install command to install Apache as a Windows service. Next, Httpd-k start, start Apache.

Install PHP 5.2.3

PHP does not need to install the program to extract the compressed package directly to the selected folder, for example, I D:\PHP5.2.3 here.

Configure Apache and PHP

Open the Apache configuration file httpd.conf (in the Apache folder under Conf subfolder) to find DocumentRoot "X:/xxx/htdocs" and <directory "X:/xxx/htdocs" > ( Quotation marks are different for individual installation addresses, and the quotation marks are changed to the folder where the Web site resides. For example, I change here to DocumentRoot "D:/apache2.2/httpdocs" and <directory "D:/apache2.2/httpdocs", just native debugging, So my basically is the default configuration of Apache.

Tip: In Windows, the address is written in D:\Apache2.2\httpdocs, httpd.conf in the D:/apache2.2/httpdocs, and the backslash "\" will be changed to slash "/"

Find LoadModule, add below

LoadModule php5_module "D:/PHP5.2.3/php5apache2_2.dll"
PHPIniDir "D:/PHP5.2.3"

Two lines of code, change the address within quotation marks according to the location of your PHP installation.

Find DirectoryIndex index.html, modify to DirectoryIndex index.php index.html

Find AddType application/x-gzip gz. tgz, add the following separately

AddType application/x-httpd-php .php
AddType application/x-httpd-php .html

Save httpd.conf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.