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

Source: Internet
Author: User
Tags exit mysql net parent directory version variable phpmyadmin port number
apache|mysql|window| tutorial One, software download 1. To www.apache.org download Apache2 installation file Reference link: http://mirror.apache.or.kr/httpd/binaries/ Win32/apache_2.0.55-win32-x86-no_ssl.exe 2. Download PHP4 Zip package reference link to www.php.net: http://www.php.net/get/ Php-4.4.2-win32.zip/from/a/mirror 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 reference link to www.mysql.com: http://dev.mysql.com/downloads/mysql/5.0.html 4. Download phpMyAdmin for Operation MySQL reference link: http:// Count.skycn.com/softdownload.php?id=10687&url=http://gztt.driversky.com/down/phpmyadmin-2.7.0.zip Two, installation 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 note 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 uninstall service) after installing Apache2, open d:\Apache2\conf\httpd.conf, find LoadModule, and add loadmodule after all #sss statements added (This sentence is a note)
LoadModule php4_module "D:/php4/php4apache2.dll"
AddType application/x-httpd-php. php
Phpinidir "D:/PHP4" and then save the exit.  2. As for php:  (1) Extract zip packets to d:\php4 and then copy the DLLs from 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 system installation), and then renamed PHP.ini.   (3) Copy the Php4ts.dll to the \Windows\System32 directory.   (4) Add d\:p HP4 to the path of the system variable in the environment variable. (added to the tail, separated by semicolons)  3. Extract phpMyAdmin to D:\Apache2\htdocs\phpmyadmin.   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 if there is an incorrect configuration, there will be a pop-up window prompts the error. Otherwise, you will see the APACHE2 server is starting in the lower-left area of the window.   Five, the test effect  1. Open the browser, enter http://localhost, you will see a default home page normally.  2. Enter http://localhost/phpMyAdmin/index.php, and you will see the phpMyAdmin home page normally.   NOTE: If the port number is not the default 80, but 8080, you need to modify the localhost to localhost:8080.   VI, to novice      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.    &nbSp 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.



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.