Apache 的安装 1 点击apahce安装包screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/a1.jpg');}" alt="" src="http://www.phpfans.net/images/a1.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 2 下面3项随便填 apache 监听80 端口。如果iis用了80端口,修改iis端口或者apache端口,以免冲突screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/a2.jpg');}" alt="" src="http://www.phpfans.net/images/a2.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 3 这里默认的是 typical。如果想修改安装路径的话也可以选择custom,注意安装路径不能含中文screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/a3.jpg');}" alt="" src="http://www.phpfans.net/images/a3.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 4 开始安装screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/a4.jpg');}" alt="" src="http://www.phpfans.net/images/a4.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 5 安装完成后在浏览器里打入 http://localhost如果可以看到这个页面,证明apache安装成功,已经可以解释静态页面了screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/a5.jpg');}" alt="" src="http://www.phpfans.net/images/a5.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> MySQL 的安装 1 点击mysql安装包screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my1.jpg');}" alt="" src="http://www.phpfans.net/images/my1.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 2 默认是Typical,如果想修改安装路径的话也可以选择custom.注意:安装mysql的路径中,不能含有中文!screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my2.jpg');}" alt="" src="http://www.phpfans.net/images/my2.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 3 安装开始screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my3.jpg');}" alt="" src="http://www.phpfans.net/images/my3.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 4 跳过注册screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my4.jpg');}" alt="" src="http://www.phpfans.net/images/my4.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 5 是否现在就配置 mysql。也可以之后在开始菜单的configuration wizard 进行配置 这里是现在进行配置screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my5.jpg');}" alt="" src="http://www.phpfans.net/images/my5.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 6 选择Detailed Configuration,点Next继续screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my6.jpg');}" alt="" src="http://www.phpfans.net/images/my6.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 7 下面这个选项是选择mysql应用于何种类型,第一种是开发服务器,将只用尽量少的内存,第二种是普通WEB服务器,将使用中等数量内存,最后一种是这台服务器上面只跑mysql数据库,将占用全部的内存。用户可根据自己的需求,选择选项。这里只选择开发服务器,点Next继续screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my7.jpg');}" alt="" src="http://www.phpfans.net/images/my7.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 8 下面是选择数据库用途,第一种是多功能用途,将把数据库优化成很好的innodb(事务)存储类型和高效率的myisam(非事务)存储类型,第二种是只用于事务处理类型,最好的优化innodb,但同时也支持myisam,只有myisam才支持全文索引最后一种是非事务处理类型,适合于简单的应用,只有不支持事务的myisam类型是被支持的。一般选择第一种多功能的。screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my8.jpg');}" alt="" src="http://www.phpfans.net/images/my8.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 9 下面是选择InnodDB的数据存放位置,一般默认好了,不需要改动screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my9.jpg');}" alt="" src="http://www.phpfans.net/images/my9.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 10 下面是选择mysql允许的最大连接数,第一种是最大20个连接并发数,第二种是最大500个并发连接数,最后 一种是自定义,你可以根据自己的需要选择。这里选择第一个screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my10.jpg');}" alt="" src="http://www.phpfans.net/images/my10.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 11下面是选择数据库监听的端口,一般默认是3306,如果改成其他端口,以后连接数据库的时候都要记住修改的端口,否则不能连接mysql数据库,比较麻烦,这里不做修改,用mysq的默认端口:3306screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my11.jpg');}" alt="" src="http://www.phpfans.net/images/my11.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 12 这一步设置mysql的默认编码,默认是latin1,也是标准的编码screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my12.jpg');}" alt="" src="http://www.phpfans.net/images/my12.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 13 当然我们可以根据需要,把它改成gb2312或gbk。编码是版本4.1以上引入的。如果要用原来数据库的数据,最好能确定原来数据库用的是什么编码,如果这里设置的编码和原来数据库数据的编码不一致,在使用的时候可能会出现乱码.建议使用latin1标准编码screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my13.jpg');}" alt="" src="http://www.phpfans.net/images/my13.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 14 这一步是是否要把mysql设置成windows的服务,一般选择设成服务,这样以后就可以通过服务中启动和关闭mysql数据库了。推荐:下面的复选框也勾选上,这样,在cmd模式下,不必非到mysql的bin目录下执行命令。在命令行下咨询可以执行文件screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my14.jpg');}" alt="" src="http://www.phpfans.net/images/my14.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 15 这一步是设置mysql的超级用户密码,这个超级用户非常重要,对mysql拥有全部的权限,请设置好并牢记超级用户的密码,下面有个复选框是选择是否允许远程机器用root用户连接到你的mysql服务器上面,如果有这个需求,也请勾选。screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my15.jpg');}" alt="" src="http://www.phpfans.net/images/my15.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 16 点击 Executescreen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my16.jpg');}" alt="" src="http://www.phpfans.net/images/my16.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 17 到这一步 screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my17.jpg');}" alt="" src="http://www.phpfans.net/images/my17.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 18 我们可以开始使用mysql了,打开开始菜单的 mysql Command line Client,输入密码出现这个界面说明mysql已经安装好了screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my18.jpg');}" alt="" src="http://www.phpfans.net/images/my18.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 可能出现的问题: 如果在第15步,你出现的界面是像下面这样screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my19.jpg');}" alt="" src="http://www.phpfans.net/images/my19.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>有三个输入密码的地方,则有可能您是在原来基础上安装的。你在第一个文本框输入原来root的密码,后面两个文本框输入root的新密码,点击Next基础,出现下图screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/my20.jpg');}" alt="" src="http://www.phpfans.net/images/my20.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 给您推荐几种解决办法:1、 点Retry,重试;2、 再运行一次设置,看到有关“移除原设置”的选项,选择移除,然后在重新设置。3、 重装。重装注意事项:最好删除原来的所有文件,必要的话,可以清一下注册表,如果你机器上没有其它mysql相关的程序。而且一定记得不要保留原有的my.ini文件。还有就是删除原来安装路径下的文件,并删除数据目录下面的ibdata1文件. 更多文章 php爱好者站 http://www.phpfans.netPHP 的安装 由于php是一个zip文件(非install版),安装较为简单解压就行。把解压的 php5.1.1-Win32重命名为 php5。并复制到C盘目录下。即安装路径为 c:\php5 1 找到php目录下的 php.ini-dist或 php.ini.recommended文件,重命名为 php.ini并复制到系统盘的windows目录下(以c:\windows为例). 2 再把php目录下的php5ts.dll,libmysql.dll复制到目录 c:\windows\system32下。如果没把libmysql.dll复制到system32下,在重启apache时可能会出现如下警告screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/p1.jpg');}" alt="" src="http://www.phpfans.net/images/p1.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 3 把php5\ext目录下的php_gd2.dll,php_mysql.dll,php_mbstring.dll文件复制到c:\windows\system32下 如果没有加载 php_gd2.dll php将不能处理图像。没有加载php_mysql.dll php将不支持mysql函数库php_mbstring.dll在后面使用phpmyadmin时支持宽字符 所有东西安装完成后我们再进行配置 配置php并关联MySQL 以下内容跟帖回复才能看到==============================打开c:\windows\php.ini文件 1 设置扩展路径查找 extension_dir 有这么一行extension_dir = "./"将此行改成extension_dir = "C:\php5\ext" 其中C:\php5是你安装php的路径。路径不正确将无法加载dll (注意:有些php版本是 ;extension_dir = "./" 要把前面的分号去掉)2 查找 extension extension=php_mbstring.dllextension=php_gd2.dllextension=php_mysql.dl 把上面3项前面的分号去掉,这样apache启动时就可以加载这些dll了当然前面我们也把这些dll复制到system32下了l 3 设置会话保存路径查找session.save_path 有这么一行; session.save_path = "N;/path"在此行后加入一行(注意是加入一行,不是加到后面)session.save_path = "C:\WINDOWS\Temp" 保存到你的临时目录下,这里完全可以保存到windows临时目录Temp下 4 还有比较值得注意的是 short_open_tag 默认是Off的也就是说 php不能使用短标记如 必须使用由于短标记使用方便,并且很多程序也是用短短标记来写,如discuz等如果不把 short_open_tag 改成On将出现的症状将很难判断是上面原因,这里建议修改 查找short_open_tag = Off改为short_open_tag = On 5 是否显示错误 display_errors 出于安全性考虑,display_errors 也默认为 Off就是说在调试时,如果php代码有误,就只出现一个空白页。而不会显示出错原因和出错行数。这样调试起来将非常不便,建议根据自己需要修改查找display_errors = Off (注意不是 ; - display_errors = Off [Security])改成display_errors = On 6 register_globals出于安全性考虑它默认也是Off当register_globals=Off的时候,下一个程序接收的时候应该用$_POST['user_name']和$_POST['user_pass']) 当register_globals=On的时候,下一个程序可以直接使用$user_name和$user_pass来接受值。 更详细的说明请参考http://www.phpfans.net/bbs/archiver/?tid-234.htm 建议根据自己需要修改 7 php5时差问题时间相差八小时为什么呢?PHP5系列版本新增了时区设置,默认为格林威治时间,与中国所在的东8区正好相差8个小时查找date.timezone有这么一行;date.timezone =将;去掉,改成date.timezone = PRC 其中PRC:People's Republic of China 中华人民共和国, 更详细解决方法请参考本论坛的http://www.phpfans.net/bbs/archiver/?tid-60.html 更多文章 php爱好者站 http://www.phpfans.netApache整合PHP 1 从开始菜单打开apache配置文档,如图screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/a6.jpg');}" alt="" src="http://www.phpfans.net/images/a6.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 2 修改网站根目录查找 DocumentRoot有这么一行DocumentRoot"C:/Program Files/Apache Group/Apache2/htdos"这就是你网站的根目录,你可以修改,也可以用默认的.如果改,还要修改下面这项,否则可能会出现 403 错误查找 This should be changed to whatever you set DocumentRoot to在它下面两行有
CODE:
[Copy to clipboard]
在浏览器打开 http://localhost/test.php如果输出成功,则说明大功告成了.安装 phpMyAdmin 下载得到 phpMyAdmin-2.7.0.zip,将其解压到 你网站根目录下并重命名为phpMyAdmin,找到并打开 config.defaut.php (有些版本是config.inc.php或者 libraries/config.default.php)做以下修改: 1 查找 password 有如下两行$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; 把你的mysql密码填到$cfg['Servers'][$i]['password'] = ''; 单引号里边 2 搜索 $cfg['PmaAbsoluteUri'],将其设置为 phpMyAdmin 目录路径,如:http://localhost/phpMyAdmin/ ; 下面这两项项根据自己需要的编码修改(如果对数据库编码不是很熟悉的建议不要修改)3 搜索 $cfg['DefaultLang'],将其设置为 zh-gb2312 ;4 搜索 $cfg['DefaultCharset'],将其设置为 gb2312 ; 打开浏览器,输入:http://localhost/phpMyAdmin/,Apache 和 MySQL 均已启动,如果出现如下页面则phpmyadmin安装完成并可以使用了screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.phpfans.net/images/pa.jpg');}" alt="" src="http://www.phpfans.net/images/pa.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> phpMyAdmin 的具体功能,请慢慢熟悉,这里不再赘述。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1379280
没有评论:
发表评论