进入旧版 | 服务项目 | 成功案例 | 联系方式 | 过客留言 | 友情链接
   
设为首页
加入收藏
联系我们
网站首页 | 新闻资讯 | 操作系统 | 办公软件 | 网络软件 | 工具软件 | 媒体动画 | 网页制作 | 网站开发 | 程序开发 | 平面设计
Photoshop视频教程 | Word入门 | Flash入门 | JScript | VBScript | ASP | PHP | ADO | 网页特效 | 3DS MAX6.0命令 | 系统进程
您当前的位置:GOODSGY电脑学习网 -> 网站开发 -> Web服务器 -> 文章内容  
配置最新的PHP加MYSQL服务器

相信大家通过 GOOGLE.COM 和经典的N多教程应该非常熟悉去架设PHP+MYSQL服务器.
本人最近无聊.所以去 WWW.SKYCN.NET 下载了最新的 MYSQL 5.0 以及 PHP 5.0
通过一个小时的研究和设置.实现了最新的 PHP 5.0 + MYSQL 5.0 + WIN2003.
个人认为还是有必要写个教程出来.因为很多方面和老版本的不尽相同.
说实话自己也是查阅了很多官方文档才解决了很多怪异问题.

=========================

相关软件均可以在 WWW.SKYCN.NET 下载.

MYSQL 5.0 FOR WINDOWS
PHP 5.0 FOR WINDOWS
PHPMYADMIN
WINDOWS SERVER 2003

=========================

首先安装 MYSQL .本来以为新版本的安装界面应该会花哨点.
但是仍然只看到老土的海豚.除了安装时间比 4.0 长.当然咯.因为 5.0 比 4.0 体积大很多.

推荐安装在独立的 NTFS 分区上.比如我服务器的 F盘.只放服务器软件.
路径为: F:\MYSQL\

然后进入 F:\MYSQL\BIN\ 鼠标双点 winmysqladmin.exe
首次运行会提示输入超级用户和密码.就输入 root 密码 root
注意啊.如果是对外服务器请设置超级复杂.比如 Wjwsfjn29szjwh~mysql
翻译过来就是: 我叫魏舒芬.今年29岁至今未婚.

到这里.MYSQL就安装完毕了.如果不明白请参看深空同学的相关文章.

=========================

下面安装 PHP 5.0 其实没什么安装不安装的.解压缩文件.推荐放到
路径为: F:\PHP\

到这里就应该进入关键步骤了.
首先复制 PHP 目录下的 PHP.ini-dist 到 C:\Windows\ 并将文件名修改成为 PHP.ini

COPY F:\PHP\PHP.ini-dist C:\Windows
Ren PHP.ini-dist PHP.ini

如果是 WINDOWS 2000 就是: C:\WINNT\
如果是 WIN9X / 2003 就是: C:\Windows\

然后复制 PHP 目录下 DLLS 目录里的所有文件到 SYSTEM32 目录.

COPY F:\PHP\dlls\*.* C:\Windows\System32\

如果是 WINDOWS 2000 就是: C:\WINNT\System32\
如果是 WIN9X / 2003 就是: C:\Windows\System32\

继续.复制PHP目录下 PHP4ts.dll 文件到 System32 目录里.

COPY F:\PHP\PHP4ts.dll C:\Windows\System32\

=========================

到这里复制工作全部完成.下面修改 C:\Windows\PHP.ini 文件.

请注意.5.0的版本修改与4.0并不完全相同.需要注意的如下.

查找 extension_dir 字串.修改为你 PHP 目录里 extensions 的路径.

; Directory in which the loadable extensions (modules) reside.
extension_dir = F:\PHP\extensions

相关官方技术资料:

Edit your PHP.ini file:

You will need to change the 'extension_dir' setting to
point to your PHP-install-dir, or where you have placed
your 'PHP_*.dll' files. ex: c:\PHP

If you are using OmniHTTPd, do not follow the next step.
Set the 'doc_root' to point to your webservers
document_root. ex: c:\apache\htdocs or c:\webroot

Choose which extensions you would like to load when PHP
starts, noting that several extensions are already built
into the Windows release, see the section about
Windows extensions for details of the built-in extensions.
You can uncomment the: 'extension=PHP_*.dll' lines
in PHP.ini to load these extensions.

Note that on a new installation it is advisable to first get
PHP working and tested without any extensions before enabling
them in PHP.ini.

On PWS and IIS, you can set the browscap.ini
to point to: 'c:\windows\system\inetsrv\browscap.ini' on
Windows 9x/Me and 'c:\winnt\system32\inetsrv\browscap.ini'
on NT/2000/XP Server.

More information on the capabilities of browscap can be found here:

www.php.net/manual/en/function.get-browser.php

Note that the mibs directory supplied with the Windows distribution
contains support files for SNMP. This directory should be moved to
DRIVE:\usr\mibs (DRIVE being the drive where PHP is installed.)

然后与 PHP 4.0 不同的是.需要修改 PHP.ini 文件里的如下内容:
查找 CGI.force_redirect 字串.默认值为1.将其修改为0.并取消前面的;号.

即:

; CGI.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
CGI.force_redirect = 0

切记如上修改的地方.否则PHP 5.0是无法运行的.会有如下提示.

Security Alert! The PHP CGI cannot be accessed directly.

相关官方技术资料:

!NOTE!: Since 4.1.2, the PHP.ini setting CGI.force_redirect defaults to '1'
which effectively prevents the CGI from working within IIS. You need to set
up at least a minimal PHP.ini file with the following directive:

CGI.force_redirect = 0

If it doesn't work immidiately, make sure you have the PHP.ini file in the
right place (%SYSTEMROOT%\PHP.ini).

接下来修改 PHP.ini 文件关于 MYSQL 5.0 的设置.

查找 [MySQL] 字段内的内容.修改如下.

mysql.default_port = 3306
// 这里是MYSQL的端口.

mysql.default_host = localhost
// 这里是本地主机.

mysql.default_user = root
// 这里是用户

mysql.default_password = Wjwsfjn29szjwh~mysql
// 这里是密码

修改到这里就可以让 PHP 与 MYSQL 关联了.
最后启动 PHP 对 MYSQL 模块支持.

查找 extension=PHP_mysql.dll 字串.删除掉前面的 ; 号

extension=PHP_mysql.dll

请注意.如果不启动 PHP 对 MYSQL 模块支持.将无法使 PHPMYADMIN 正常工作.将提示:

cannot load MySQL extension, please check PHP Configuration
无法装入 MySQL 扩展,请检查 PHP 的配置。

相关官方技术资料:

To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension".
This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically.
Its name is probably mysql.so or PHP_mysql.dll. PHPMyAdmin tried to load the extension but failed.

=========================

到这里应该就没有很大问题了.如果有配置基础的朋友应该完全可以理解了.
本人在实际配置的时候也遇到了很多问题.最后都是耐心查询官方文档得到了解决.
在这里要感谢 一個人の天使 [QQ:5579960 ] 的大力支持.因为本人E文不是很好.
希望大家能有克服困难的毅力.最后想说的是.学好E文.占领日本.

在百度中搜索:配置最新的PHP加MYSQL服务器
在Google中搜索:配置最新的PHP加MYSQL服务器
在Yahoo中搜索:配置最新的PHP加MYSQL服务器

收藏到网摘:新浪VIVI 365key 我摘 POCO网摘 博采中心 YouNote 和讯网摘 天天收藏
[] [返回上一页] [打 印] [收 藏]
下一篇文章:关于px与pt

 相关文章    最新文章
· Vista系统电源管理的几个配置方案
· 轻松配置Word的个性化初始属性
· 在Linux系统下Mldonkey的配置和使用方法
· 思科IOS配置五大技巧
· Linux操作系统下的三种Java环境配置方法
· 使用Office语音识别功能的系统配置要求
· Office语音识别用户配置文件的创建及使用..
· Linux下以太网卡的安装及配置
· Linux Samba Server的配置方法详细解析
· Office工具栏的配置管理与重置操作
 
· IIS下ASP程序运行故障的解决
· 修改Hosts文件获取的3个特殊妙用
· 增强IIS安全性的五个简单有效措施
· SQL密码管理的六个危险判断
· 3个步骤结束网站恶梦-SQL注入隐患
· SQL Server与Oracle、DB2三种数据库比较
· 解决SQL Server虚拟内存不足情况
· SQL Server 2005对海量数据处理
· PHP5.2+APACHE2.2+BugFree1.0的安装
· IIS配置高级技巧(附图)_AX

∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论…]
站内搜索

精彩图文
  网站导航  
操作系统 办公软件 网络软件
Vista Windows2003 WindowsXP Windows2000/NT Windows9X/ME Linux 其他 Word Excel Powerpoint Outlook 金山系列 其他 网页浏览 上传下载 联络聊天 邮件工具 服务器软件 网络辅助
工具软件 媒体动画 网页制作
系统工具 媒体工具 压缩工具 图文处理 文件管理 其他 3DMAX Authorware Director Maya 视频处理 其他 Flash Dreamweaver FireWorks FrontPage LiveMotion Golive HTML/CSS 其它
网站开发 平面设计 程序设计
ASP JSP PHP CGI JavaScript VBScript XML/SOAP Web服务器 Photoshop PhotoImpact CorelDraw Illustrator Freehand 设计欣赏 其他 VB VC .NET C/C++ DELPHI JAVA

冀ICP备05019428号
Copyright © 2004-2008 电脑学习网 Inc.All rights reserved.
TEL:13832340607
QQ:39873155
E_Mail:goodsgy(#)hotmail.com   (把(#)替换成@)
MSN:goodsgy(#)hotmail.com   (把(#)替换成@)