Establish a web server [php-mysql-apache] on Windows XP

Download software from web sites ( www.apache.org, www.mysql.com, www.php.net), make sure you downloaded the windows version and unpacking all software in separate folders. install apache 2.0.54.

install apache
double click the downloaded file and begin to install. Make sure to fill in the right information and select the proper path for installation. Also you must unblocking apache in order to provide web service. I use the following information.
domain name: wamp.
server name: wamp.
email: smart-li@163.net
path: C:/.  (APACHE will install under the C:/Apache2)
you can visit http://localhost to see whether you have apache properly installed. The default web pages are in the folder (C:/Apache2/htdocs), maybe you need to change to your newly designed web sites’ folder such as (D:/www/mysite) by editing httpd.conf (C:/Apache2/conf/httpd.conf). Opening the file using Wordpad or Notepad. Seaching DocumentRoot “C:/Apache2/htdocs” and change to DocumentRoot “D:/www/mysite”; Save the file and restart apache by double clicking apache running icon.

install PHP 5.0.4
create a folder named php under C: and copy all unpacked files to this folder. Editing httpd.conf (C:/Apache2/conf/httpd.conf) using the file using Wordpad or Notepad.
Searching DirectoryIndex index.html index.html.var and add index.htm index.php at the end of the line.
Searching AddType application/x-gzip and add a new line below.
AddType application/ x-httpd-php .php
Seaching LoadModule ssl_module and add a new line below.
LoadModule php5_module “c:/php/php5apache2.dll”
Save the file and restart apache by double clicking apache running icon.
create a simple php file in the folder (D:/www/mysite) wamptest.php to test whether php successfully installed by navigating ( http://localhost/wamptest.php).
<?php
echo phpinfo();
?>

install Mysql 4.1.11
select custom install and change the path to C:/mysql
skip the account signing up at mysql.com
select configure now
select detailed configuration
in select server type. select “Developer Machine”, click Next.
in select the database engine. Select multifunctional database. Click next.
in select the drive for the InnoDB datafiles, use the default settings. Click next.
in select number of concurrent connections to the server. Select decision support (DSS)/OLAP. CLICK NEXT.
In select the networking options, enable TCP/IP Networking and the port number is 3306.
In select the default character set. Choose standard character set. Click next.
In setting windows option. Enabling lauch the Mysql Server automatically. Click next.
In setting the security options. typing your mysql root password. Click next.
In ready to execute, click Execute to begin configuration.
click finish to end the installation.
from start menu,run MySql>Mysql command line client. Typing the root password you set during Mysql configuration. You can see Mysql> prompt.
Mysql> SHOW DATABASES;
You can see two databases mysql and test available. Which is save in the folder C:/mysql/data. In order to make Mysql work with PHP, do the following.
opening c:/windows/php.ini and searching extension=php_mysql.dll, delete “;” in the front of the line.
copy c:/php/libmysql.dll to c:/WINDOWS
restart apache.
editing D:/www/mysite/wamptest.php to the following.
<?php
mysql_connect(‘localhost’,’root’,’root password’) or die(“fail to connect to host”);
echo “connect to host successfully!<br>”;
echo phpinfo();
?>
navigating http://localhost/wamptest.php to know whether Mysql works well or not.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值