通过一个小时的研究和设置.实现了最新的 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.
=========================
到这里应该就没有很大问题了.如果有配置基础的朋友应该完全可以理解了.
本人在实际配置的时候也遇到了很多问题.最后都是耐心查询官方文档得到了解决.

PHP仍然流行的原因是其易用性、灵活性和强大的生态系统。1)易用性和简单语法使其成为初学者的首选。2)与web开发紧密结合,处理HTTP请求和数据库交互出色。3)庞大的生态系统提供了丰富的工具和库。4)活跃的社区和开源性质使其适应新需求和技术趋势。

PHP和Python都是高层次的编程语言,广泛应用于Web开发、数据处理和自动化任务。1.PHP常用于构建动态网站和内容管理系统,而Python常用于构建Web框架和数据科学。2.PHP使用echo输出内容,Python使用print。3.两者都支持面向对象编程,但语法和关键字不同。4.PHP支持弱类型转换,Python则更严格。5.PHP性能优化包括使用OPcache和异步编程,Python则使用cProfile和异步编程。

PHP主要是过程式编程,但也支持面向对象编程(OOP);Python支持多种范式,包括OOP、函数式和过程式编程。PHP适合web开发,Python适用于多种应用,如数据分析和机器学习。

PHP起源于1994年,由RasmusLerdorf开发,最初用于跟踪网站访问者,逐渐演变为服务器端脚本语言,广泛应用于网页开发。Python由GuidovanRossum于1980年代末开发,1991年首次发布,强调代码可读性和简洁性,适用于科学计算、数据分析等领域。

PHP适合网页开发和快速原型开发,Python适用于数据科学和机器学习。1.PHP用于动态网页开发,语法简单,适合快速开发。2.Python语法简洁,适用于多领域,库生态系统强大。

PHP在现代化进程中仍然重要,因为它支持大量网站和应用,并通过框架适应开发需求。1.PHP7提升了性能并引入了新功能。2.现代框架如Laravel、Symfony和CodeIgniter简化开发,提高代码质量。3.性能优化和最佳实践进一步提升应用效率。

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP类型提示提升代码质量和可读性。1)标量类型提示:自PHP7.0起,允许在函数参数中指定基本数据类型,如int、float等。2)返回类型提示:确保函数返回值类型的一致性。3)联合类型提示:自PHP8.0起,允许在函数参数或返回值中指定多个类型。4)可空类型提示:允许包含null值,处理可能返回空值的函数。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

SublimeText3汉化版
中文版,非常好用

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

Atom编辑器mac版下载
最流行的的开源编辑器

禅工作室 13.0.1
功能强大的PHP集成开发环境