A concise tutorial on APACHE2+PHP4+MYSQL5 integration under Windows

Source: Internet
Author: User
Tags exit ini parent directory reference zip phpmyadmin port number

First, download the relevant software

1. Download Apache2 installation files to www.apache.org

Reference Address: http://www.skycn.com/soft/1218.html

2. Download the PhP4 Zip package to www.php.net

Reference Address: http://www.skycn.com/soft/17178.html

Note: (1) PHP5 has been relatively stable, but because there are many PHP applications and PHP5 compatibility is not good enough, so php4 is a better choice. (2) PHP4 has Windows EXE installation file, but that version is a miniature version, not enough, so we recommend download Zip package, but need to manually install.

3. Download MySql5 to Www.mysql.com

Reference Address: http://www.skycn.com/soft/1262.html

4. Download phpMyAdmin, for operation MySQL

Reference Address: http://www.skycn.com/soft/10687.html

Second, install the configuration

1. Apache and MySQL installation is relatively simple, with the general installation of Windows program is not much different, according to the default options one step down, you need to pay attention to is that the best way to modify the installation path, not too long, also do not have spaces. For example, when you install Apache select D:\, so that after the installation of root is d:\Apache2.

MySQL installation path can be written d:\mysql50, after installation, into the D:\mysql50\bin, run mysqld-nt--install MySQL installed as a system service. (Mysqld-nt--remove is the uninstall service)

After installing the Apache2, open d:\Apache2\conf\httpd.conf, look for LoadModule, and add after all loadmodule statements

#sss added (这句是注释)
LoadModule php4_module "d:/php4/php4apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "d:/php4"

Then save the exit.

2. As for PHP:

(1) Extract the zip packets to the D:\PHP4, and then copy the DLLs from the DLLs and SAPI directories to their parent directory, that is, D:\PHP4.

(2) Copy php.ini-dist (php default settings) or php.ini-recommended (PHP recommended settings) to the \ Windows directory (some Winnt, depending on the installation of the system), and then renamed to PHP.ini.

(3) Copy the Php4ts.dll to the \Windows\System32 directory.

(4) In the environment variable, the D:\PHP4 is added to the path of the system variable. (added to the tail, preceded by a semicolon separated)

3. Extract the phpMyAdmin to the d:\Apache2\htdocs\phpmyadmin.

Four, the Operation service

1. Running MySQL: type net start mysql (net stop MySQL is stop service)

2. Run Apache: Click Start Menu-> program->apache HTTP Server 2.0.55->control Apache server->monitor Apache Servers, A red feather icon appears in the lower-right corner of the taskbar, right-click Open Apache Monitor, then click the Start button, and a pop-up prompts error if there is an incorrect configuration. Otherwise, you will see the APACHE2 server is starting in the lower-left area of the window.

Five, Test effect

1. Open the browser, enter http://localhost, the normal will see a default home page.

2. Enter http://localhost/phpMyAdmin/index.php, you will see phpMyAdmin's homepage normally.

Note: If the port number is not the default 80, but 8080, you need to modify the localhost to localhost:8080.

Vi. Writing to Beginners

Installation and configuration even the use of the steps, often in the software documents have been written in detail, although all are English, but not difficult to understand, grasp the key words can be. I think downloading a good habit is to first read the FAQ, readme, install and other documents, and then proceed to the next step.

If the software document is not detailed enough, you can go to its official website and find the relevant technical forum. There are also many good forums in China, but learn to read English materials, I would like to improve their technical level is very helpful.

Add: Originally installed under Windows SP1 no problem, SP2 in the boot MySQL found a 1067 code error, the solution is as follows:

Establish a My.ini under the C:\Windows. Enter the following content:

[mysqld]
# set basedir to installation path, e.g., c:/mysql
basedir=D:/MySQL50
# set datadir to location of data directory,
datadir=D:/MySQL50/data
[WinMySQLadmin]
Server=D:/MySQL50/bin/mysqld-nt.exe
user=root
password=

Save exit. Then run the service again, there should be no problem.

Related Article

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.