Windows下用mysql+apache+php实现论坛的基本过程

实验所需环境我的环境是windows enterprise 2003 sp1

Windows下用mysql+apache+php实现论坛的基本过程_mysql

所用到的软件包

下面我就粗略的为大家介绍一下,文中难免有不到之处,还望大家多多批评指正

首先确保已经安装了IIS的机器没有占用80端口

Windows下用mysql+apache+php实现论坛的基本过程_apache_02

一.安装mysql

Windows下用mysql+apache+php实现论坛的基本过程_论坛_03Windows下用mysql+apache+php实现论坛的基本过程_apache_04Windows下用mysql+apache+php实现论坛的基本过程_php_05Windows下用mysql+apache+php实现论坛的基本过程_论坛_06Windows下用mysql+apache+php实现论坛的基本过程_论坛_07Windows下用mysql+apache+php实现论坛的基本过程_mysql_08Windows下用mysql+apache+php实现论坛的基本过程_mysql_09

记住你输入的口令

Windows下用mysql+apache+php实现论坛的基本过程_mysql_10Windows下用mysql+apache+php实现论坛的基本过程_mysql_11

二 。安装apache

Windows下用mysql+apache+php实现论坛的基本过程_apache_12Windows下用mysql+apache+php实现论坛的基本过程_论坛_13

假设为www.abc.com 管理员的邮箱随你填了 但要记住

Windows下用mysql+apache+php实现论坛的基本过程_php_14Windows下用mysql+apache+php实现论坛的基本过程_php_15

三.Php的安装

Windows下用mysql+apache+php实现论坛的基本过程_apache_16

Windows下用mysql+apache+php实现论坛的基本过程_Windows_17

解压文件

修改文件名

Windows下用mysql+apache+php实现论坛的基本过程_apache_18

把php.ini-dist改为php.ini

双击打开

Windows下用mysql+apache+php实现论坛的基本过程_Windows_19Windows下用mysql+apache+php实现论坛的基本过程_php_20

找到mysql去分号,实现php与mysql的结合.

Windows下用mysql+apache+php实现论坛的基本过程_论坛_21

保存文件

修改环境变量

Windows下用mysql+apache+php实现论坛的基本过程_apache_22Windows下用mysql+apache+php实现论坛的基本过程_apache_23

找到path 编辑

Windows下用mysql+apache+php实现论坛的基本过程_php_24

在后面添加

;C:\php;C:\php\ext

依次确定

修改apache配置文件

实现php与apache的结合

找到路径

C:\Program Files\Apache Group\Apache2\conf

Windows下用mysql+apache+php实现论坛的基本过程_mysql_25Windows下用mysql+apache+php实现论坛的基本过程_apache_26

适当位置

添加

LoadModule php5_module C:/php/php5apache2.dll

Windows下用mysql+apache+php实现论坛的基本过程_apache_27

该段结尾

添加

PHPIniDir "C:/php"

Windows下用mysql+apache+php实现论坛的基本过程_php_28

合适位置

添加如下两句

AddType application/x-httpd-php .php

AddType application/x-httpd-php .html

注意空格

保存退出

下一小步

利用网页编辑软件编辑index.php测试文件

C:\Program Files\Apache Group\Apache2\htdocs

Windows下用mysql+apache+php实现论坛的基本过程_apache_29 Windows下用mysql+apache+php实现论坛的基本过程_论坛_30

新建文本文档输入

<? phpinfo(); ?>

改名为index.php

重启apache服务

Windows下用mysql+apache+php实现论坛的基本过程_php_31

打开右下角的 apache 选择restart 重启apache服务,对于警告 确定即可

Windows下用mysql+apache+php实现论坛的基本过程_php_32

浏览器里面输入http://ip/index.php

进行网页测试

Windows下用mysql+apache+php实现论坛的基本过程_mysql_33

将phpMyAdmin-2.6.2.zip 解压至根目录下phpMyAdmin文件夹

找到apache 的配置文件添加

alias /phpmyadmin/ "c:/phpmyadmin/"Windows下用mysql+apache+php实现论坛的基本过程_论坛_34

还有phpmyadmin下的config.inc.php
Windows下用mysql+apache+php实现论坛的基本过程_Windows_35

用写字板打开文件

Windows下用mysql+apache+php实现论坛的基本过程_Windows_36

定位至如下关键字

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

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

分别填上你mysql的用户和密码即可,这里注意安装时设置的密码,一样即可

Windows下用mysql+apache+php实现论坛的基本过程_apache_37

密码与这个一致即可

Windows下用mysql+apache+php实现论坛的基本过程_论坛_38

定位至

$cfg['PmaAbsoluteUri'] =http://localhost/phpMyAdmin/

添加参数

或者把localhost写成ip

或者回环地址127.0.0.1

php.ini文件中";extension=php_mbstring.dll"前面的";"一定要去掉,

Windows下用mysql+apache+php实现论坛的基本过程_php_39

找到php文件夹下的php.ini

;extension=php_mbstring.dll

把这一句前面的;去掉

Windows下用mysql+apache+php实现论坛的基本过程_apache_40

将php/etx目录下的php_mbstring.dll php_mysql.dll文件复制到c:/window/system32目录下!

Windows下用mysql+apache+php实现论坛的基本过程_apache_41

Windows下用mysql+apache+php实现论坛的基本过程_apache_42

将php下的libmysql.dll拷贝至windows/system32下

测试一下

地址栏输入http://localhost/phpmysql.index.php

Windows下用mysql+apache+php实现论坛的基本过程_Windows_43

安装PHPBB

Windows下用mysql+apache+php实现论坛的基本过程_apache_44

将论坛phpBBcn拷贝解压至C:\Program Files\Apache Group\Apache2\htdocs目录下

安装

Windows下用mysql+apache+php实现论坛的基本过程_论坛_45Windows下用mysql+apache+php实现论坛的基本过程_apache_46

登陆mysql数据库

输入以下命令

mysql&gt; create database bbs character set utf8;

创建数据库bbs,同时规定字符的编码格式

quit

退出数据库

Exit

退出命令窗口

因为mysql一般选用gb2312,而phpbb2一般为utf8,所以在建立BBS专用数据库时应注意字符格式

按下列路径找到install.php

http://localhost/php/phpBBcn/phpBB2020cn/install/install.php

Windows下用mysql+apache+php实现论坛的基本过程_论坛_47

至此又回到一个熟悉的论坛安装界面了

Windows下用mysql+apache+php实现论坛的基本过程_apache_48

填写相关数据,注意的是数据库用户的名称,账户,密码,管理员电子邮箱,账号密码等

Windows下用mysql+apache+php实现论坛的基本过程_apache_49

完成安装

Windows下用mysql+apache+php实现论坛的基本过程_Windows_50

Windows下用mysql+apache+php实现论坛的基本过程_apache_51

知道到路径C:\Program Files\Apache Group\Apache2\htdocs\php\phpBBcn\phpBB2020cn下删除 contrib和install这两个文件夹

Windows下用mysql+apache+php实现论坛的基本过程_Windows_52

输入管理员密码登陆

Windows下用mysql+apache+php实现论坛的基本过程_mysql_53

至于后面的添加论坛的步骤就不在此详述了

进入管理控制面板

Windows下用mysql+apache+php实现论坛的基本过程_论坛_54

添加的话和linux是一样的

至此 我们已经简单的实现了linux和windows下用mysql+apache+php实现论坛的基本过程

这两篇文章均没有对原理性的东西进行描述,只是简单的实现了一个环境。对搭建只是有一个简单的了解罢了,

http://localhost/php/phpBBcn/phpBB2020cn/index.php