Simple installation and configuration _php techniques for apache+php5+mysql4+phpmyadmin under Win2003

Source: Internet
Author: User
Tags win32 phpmyadmin
First from the official website under the APACHE2.050, PHP5, MYSQL4.0.20, PHPMYADMIN2.57

Apache_2.0.50-win32-x86-no_ssl.msi
Php-5.0.0-win32.zip
Mysql-4.0.20d-win.zip
Phpmyadmin-2.5.7.zip

OS win2003 system disk is: D disk

First step: Install Apache and configure support for PHP

Click the installation file Apache_2.0.50-win32-x86-no_ssl.msi
Install Apache in the D:\apache2 directory (as you prefer)
Extract the contents of the Php-5.0.0-win32.zip into the D:\php.
Locate the php.ini-dist in the PHP directory and rename it to php.ini and copy it to the Windows directory (Win2K Winnt)
Like my php.ini is a copy to the D:\windows directory
Then copy the Php5ts.dll,libmysql.dll in the PHP directory to the System directory (SYSTEM/SYSTEM32) as mine is D:\windows\system.

Configure the httpd.conf in Apache
Open D:\Apache2\conf\httpd.conf This file
Locate Adddefaultcharset iso-8859-1 change it to Adddefaultcharset GB2312 (let the default language be encoded in Simplified Chinese)
Find DocumentRoot "D:/apache2/htdocs" to change it to your Web directory (do not change) as my DocumentRoot "D:/website"
Find DirectoryIndex index.html Index.html.var in the back and add index.htm index.php

Select installation mode: Modular installation or CGI mode Setup (optional)

--------------Modular Installation Configuration------------------------------------
Find #LoadModule Ssl_module modules/mod_ssl.so This line, add a line after this row
LoadModule Php5_module D:/php/php5apache2.dll
Where D:/php/php5apache2.dll is the location of the Php5apache2.dll in your PHP directory
Find AddType application/x-gzip gz. tgz, join a line after this row
AddType application/x-httpd-php. php
---------------------------------------------------------------

--------------CGI installation configuration--------------------------------------
Find AddType application/x-gzip gz tgz This line, add the following
scriptalias/php/"d:/php/"
AddType application/x-httpd-php. php
Action application/x-httpd-php "/php/php-cgi.exe"
---------------------------------------------------------------

The PHP environment is basically configured successfully at this time
In the Web root directory (such as my D:\website), build a file named test.php that reads as follows
? Echo Phpinfo ();?>
Restart the Apache service
Open http://localhost/test.php in Browser
OK if you can see the PHP configuration output information

The second step is to install MySQL

Install MySQL to the specified directory, such as mine is d:/mysql the following is not installed MySQL compression package, directly extract to the specified directory on it
Then click D:\mysql\bin\winmysqladmin.exe This file where D:\mysql is your MySQL installation directory
Enter winmysqladmin initial user, password (note: This is not the user in MySQL, password) just fill it out.
After you determine the task in the lower right corner of the launch bar will appear a traffic light icon, red light on behalf of the service stop, green light on behalf of the service normal, left-click this icon->winnt->install the service installation of this services
And then left-click this icon->winnt->start the service to start MySQL services

Modify the MySQL database root password
Use CMD to enter life this line mode enter the following command: (note: d:\mysql for MySQL installation directory)
CD D:\mysql\bin
Mysqladmin-u root-p Password 123456
Carriage return appears
Enter Password: (Note: This is to ask you to enter the original password. The password is empty when you install it, so direct return can be made)
At this time the MySQL account root password was changed to 123456 installation completed

Third, configure php.ini and test MySQL (php.ini under D:\Windows php.ini)

Find Extension_dir = "./" Change to Extension_dir = "D:/php/ext"
Found it
; Extension=php_mysql.dll
Will '; ' Remove Change to
Extension=php_mysql.dll
Found it
; Session.save_path = "/tmp"
Will '; ' Remove the directory where you saved the session, such as
Session.save_path = "D:/php/session_temp";

Restart the Apache service
The contents of the testdb.php file in the Web root directory (such as D:\website) are as follows:
<?php
$link =mysql_connect (' localhost ', ' root ', ' 123456 ');
if (! $link) echo "fail";
else echo "Success";
Mysql_close ();
?>
Open http://localhost/testdb.php in the browser if the output success is OK

Iv. installation and configuration of phpMyAdmin

Unzip the phpmyadmin-2.5.7.zip to the Web root directory, rename the folder to phpMyAdmin or other
Open the config.inc.php in the phpMyAdmin directory
Found it
$cfg [' Servers '] [$i] [' user '] = ' root ';
$cfg [' Servers '] [$i] [' password '] = ' 123456 ';
Fill in your MySQL user and password separately

If not used locally, it is best to add validation

I don't know if I wrote it right! But that's basically how I fit in! Should be about the same as learning?

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.