PHP 5.0 + MYSQL 5.0 + WIN2003
时间:2005-01-19 来源:dtedu
实现了最新的 PHP 5.0 + MYSQL 5.0 + WIN2003. |
通过一个小时的研究和设置.实现了最新的 PHP 5.0 + MYSQL 5.0 + WIN2003. ========================= 相关软件均可以在 WWW.SKYCN.NET 下载.
MYSQL 5.0 FOR WINDOWS =========================
首先安装 MYSQL .本来以为新版本的安装界面应该会花哨点.
推荐安装在独立的 NTFS 分区上.比如我服务器的 F盘.只放服务器软件.
然后进入 F:MYSQLBIN 鼠标双点 winmysqladmin.exe 到这里.MYSQL就安装完毕了.如果不明白请参看深空同学的相关文章. =========================
下面安装 PHP 5.0 其实没什么安装不安装的.解压缩文件.推荐放到
到这里就应该进入关键步骤了.
COPY F:PHPPhp.ini-dist C:Windows
如果是 WINDOWS 2000 就是: C:WINNT 然后复制 PHP 目录下 DLLS 目录里的所有文件到 SYSTEM32 目录. COPY F:PHPdlls*.* C:WindowsSystem32
如果是 WINDOWS 2000 就是: C:WINNTSystem32 继续.复制PHP目录下 php4ts.dll 文件到 System32 目录里. COPY F:PHPphp4ts.dll C:WindowsSystem32 ========================= 到这里复制工作全部完成.下面修改 C:WindowsPhp.ini 文件. 请注意.5.0的版本修改与4.0并不完全相同.需要注意的如下. 查找 extension_dir 字串.修改为你 PHP 目录里 extensions 的路径.
; Directory in which the loadable extensions (modules) reside. 相关官方技术资料: Edit your php.ini file:
You will need to change the 'extension_dir' setting to
If you are using OmniHTTPd, do not follow the next step.
Choose which extensions you would like to load when PHP
Note that on a new installation it is advisable to first get
On PWS and IIS, you can set the browscap.ini 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
然后与 PHP 4.0 不同的是.需要修改 Php.ini 文件里的如下内容: 即:
; cgi.force_redirect is necessary to provide security running PHP as a CGI under 切记如上修改的地方.否则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' cgi.force_redirect = 0
If it doesn't work immidiately, make sure you have the php.ini file in the 接下来修改 Php.ini 文件关于 MYSQL 5.0 的设置. 查找 [MySQL] 字段内的内容.修改如下.
mysql.default_port = 3306
mysql.default_host = localhost
mysql.default_user = root
mysql.default_password = Wjwsfjn29szjwh~mysql
修改到这里就可以让 Php 与 MYSQL 关联了. 查找 extension=php_mysql.dll 字串.删除掉前面的 ; 号 extension=php_mysql.dll 请注意.如果不启动 PHP 对 MYSQL 模块支持.将无法使 PHPMYADMIN 正常工作.将提示:
cannot load MySQL extension, please check PHP Configuration 相关官方技术资料:
To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". =========================
到这里应该就没有很大问题了.如果有配置基础的朋友应该完全可以理解了. |