|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
应该大致熟悉了一些学习过程,也许我的过程和你的有些出路,但是不管怎么样是殊途同归,我写这么多,也只是给大家一个借鉴的机会,至于好与不好,默默不敢打包票^0^mysql|办事器 经由过程一个小时的研讨和设置.完成了最新的 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:MYSQLBIN 鼠标双点 winmysqladmin.exe
初次运转会提醒输出超等用户和暗码.就输出 root 暗码 root
注重啊.假如是对外办事器请设置超等庞杂.好比 Wjwsfjn29szjwh~mysql
翻译过去就是: 我叫魏舒芬.往年29岁至今未婚.
到这里.MYSQL就装置终了了.假如不分明请参看深空同窗的相干文章.
=========================
上面装置 PHP 5.0 其实没甚么装置不装置的.解紧缩文件.保举放到
途径为: F:PHP
到这里就应当进入关头步调了.
起首复制 PHP 目次下的 Php.ini-dist 到 C:Windows 并将文件名修正成为 Php.ini
COPY F:PHPPhp.ini-dist C:Windows
Ren Php.ini-dist Php.ini
假如是 WINDOWS 2000 就是: C:WINNT
假如是 WIN9X / 2003 就是: C:Windows
然后复制 PHP 目次下 DLLS 目次里的一切文件到 SYSTEM32 目次.
COPY F:PHPdlls*.* C:WindowsSystem32
假如是 WINDOWS 2000 就是: C:WINNTSystem32
假如是 WIN9X / 2003 就是: C:WindowsSystem32
持续.复制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.
extension_dir = F:PHPextensions
相干官方手艺材料:
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:apachehtdocs 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:windowssysteminetsrvrowscap.ini' on
Windows 9x/Me and 'c:winntsystem32inetsrvrowscap.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:usrmibs (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.
=========================
到这里应当就没有很大成绩了.假如有设置装备摆设基本的伴侣应当完整可以了解了.
自己在实践设置装备摆设的时分也碰到了良多成绩.最初都是耐烦查询官方文档失掉懂得决.
学会了PHP,那么学其他的语言,肯定速成,反过来也一样,如果你之前学过其他的语言,那么学PHP肯定快。 |
|