Your location:Tech News>OS>Window 2003>Simple configuration method of APACHE+PHP5+MYSQL4+PHPMYADMIN under Win2003

Latest News

Simple configuration method of APACHE+PHP5+MYSQL4+PHPMYADMIN under Win2003



First download APACHE2.050 PHP5 MYSQL4.0.20 PHPMYADMIN2.57 from official websites

apache_2 .0.50-win32-x86-no_ssl.msi

The operating system win2003 system disk is: Disk D

The first step: Install apache and configure to support PHP

Click the installation file apache_2.0.50-win32-x86-no_ssl.msi

Install apache in the D:\\apache2 directory (as you like)

Change php- Unzip the content in to D:\\php

Find the php.ini-dist in the php directory rename it to php.ini and copy it to the windows directory (win2k is winnt)

For example my php.ini is copied to the D:\\windows directory

Then copy php5ts.dll and libmysql.dll in the php directory to the system directory ( system/system32) If mine is in D:\\windows\\system

Configure d.conf in apache

Open D:\\Apache2\\conf\\d.conf this File

Find AddDefaultCharset ISO-8859-1 and change it to AddDefaultCharset GB2312 (let the default language encoding be simplified Chinese)

Find DocumentRoot \u0026quot;D:/Apache2/htdocs\u0026quot; Change it to your WEB directory (do not change). For example mine is DocumentRoot \u0026quot;D:/website\u0026quot;

Find DirectoryIndex index.html index.html .var Add index.htm index.php at the back

Choose the installation mode: Modular mode installation or CGI mode installation (choose the same)

----- ---------Modular installation and configuration------------------------------------< br/>
Find the line #LoadModule ssl_module modules/ and add a line after this line

LoadModule php5_module d:/php/php5apache2.dll

where d:/php/php5apache2.dll is the location of php5apache2.dll in your php directory

Find the line AddType application/x-gzip .gz .tgz and add a line after this line< br/>
AddType application/x-d-php .php

------------------------- --------------------------------------

---- ----------CGI installation and configuration------------------------------------- -

Find the line AddType application/x-gzip .gz .tgz and add the following

ScriptAlias ??/php/ \u0026quot;d:/php/\u0026quot;

AddType application/x-d-php .php

Action application/x-d-php \u0026quot;/php/php-cgi.exe\u0026quot;

------------------------------------------------- --------------

At this point the PHP environment has basically been configured successfully

In the web root directory (such as my D:\\website ) To create a file named test.php as follows

\u0026lt;? echo p hpinfo(); ?\u0026gt;

Restart the apache service

Open ://localhost/test.php with a browser

If possible It’s OK to 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 If the download is non-installation Mysql compressed package you can directly unzip it to the specified directory

Then click on the file D:\\mysql\\bin\\winmysqladmin.exe where D:\\mysql is your mysql installation directory

Enter the initial user and password of winmysqladmin (note: this is not the user and password in mysql) just fill it out and don’t care about it.

After confirming a traffic light will appear in the start bar of your task in the lower right corner. Icon red light on means the service is stopped green light on means the service is normal left click on this icon -\u0026gt;winnt-\u0026gt;install the service to install this service

and then left click on this icon ->winnt- \u0026gt;start the service Start the mysql service

Modify the root password of the mysql database

Use cmd to enter the command line mode and enter the following command: (Note: d:\\mysql is mysql Installation directory)

cd d:\\mysql\\bin

mysqladmin -u root -p password 123456

The carriage return appears
< br/>Enter password: (Note: This is to ask you to enter the original password. The password was empty when you first installed it so just press Enter)

At this time the password of the account root in mysql is changed to 123456 Installation is complete

Three configure php.ini and test mysql (php.ini is php.ini under d:\\windows)

Find extension_dir = \u0026quot;./ \u0026quot; Change to extension_dir = \u0026quot;d:/php/ext\u0026quot;



Remove the ';' and change to



;session.save_path = \u0026quot;/tmp\u0026quot ;

Remove ';' and set the directory where you save the session such as

session.save_path = \u0026quot;D:/php/session_temp\u0026quot;;

Restart the apache service

Create the testdb.php file in the Web root directory (such as D:\\website) as follows:

< br/>$link=mysql_connect('localhost''root''123456');

if(!$link) echo \u0026quot;fail\u0026quot;;

else echo \u0026quot;success\u0026quot;;



Open ://localhost/testdb.php with a browser If you output success it will be OK.

Four phpmyadmin installation configuration

Unzip into the WEB root directory and rename the folder to phpmyadmin Or other

Open in the phpmyadmin directory


$cfg['Servers'][$i][' user'] = 'root';

$cfg['Servers'][$i]['password'] = '123456';

Fill in your mysql separately

If it is not used locally it’s best to add authentication

?Can't install MDAC2.8 SP1 under win2003

Recommend article

Relate article