search

在IIS6上安装PHP5(以PHP5.2.0为例)
1、首先在php.net上下载windows用的zip包。然后解压,如解压在“C:\php5”

2、把根目录下的php5ts.dll复制到系统windows目录下;把php.ini-dist文件改名为php.ini后复制到系统windows目录下。

3、用文本编辑器打开php.ini文件,查找“register_globals”,把后面的Off改为On。该项设置是关于自定义全局变量。

4、查找“extension_dir”,把后面的值改为php解压文件夹的ext子目录下,如“C:\php5\ext”

5、查找“extension”,把需要用到的扩展模块前的;号去掉。如需要用mysql的就是php_mysql.dll,如需要用mysqli的话,就需要自己加一句extension=php_mysqli.dll。有些扩展库可能需要额外的 DLL 才能工作,具体请查看这里,如果列表里的注解中有说明,则需要在解压根目录或者ext子目录找到该文件,然后复制到系统windows目录中。
如php_mysql.dll和php_mysqli.dll就需要把根目录下的libmysql.dll复制到系统windows目录中

6、打开IIS,找到需要使用php的站点,点右键-属性,找到“主目录”选项卡,点击“配置”按钮,在“映射”选项卡中,点“添加”按钮,通过“浏览”,找到php解压目录下的php5isapi.dll文件,确定,“扩展名”填“.php”,其他选项默认即可。

7、找到IIS的web服务扩展,点击“添加一个新的web服务扩展”,扩展名可以为“php”,添加文件同样为php5isapi.dll,并把“设置扩展状态为允许”勾选。

8、在开始-运行里输入iisreset,确定,重启IIS。至此,在IIS6上安装PHP5已经完成。

常见问题:
1、如出现一些“failed to open stream”等提示,一般是因为权限问题,我的解决方法是给everyone对php的解压目录的读取和运行权限,给iis两个用户对网站的web目录读取和运行权限。相关参考文章:[小勤]WIN主机配置PHP的若干问题解决方案总结

PS:关于php.ini里的选项设置,可以查看这里。

在Windows上安装MySQL5(以5.0.24a为例)
在mysql.com上下载windows的安装文件,然后运行,根据提示一步步next,基本上不需要做任何调整。安装完成后会自动打开配置程序,根据需要做一些调整。至最后一步,配置程序可能会提示无法连接数据服务器,这时候,需要点击重试按钮,否则可能会发生程序无法连接服务器的情况。

如果出现如上所述情况,需通过mysql自身的卸载程序卸载mysql,并把安装目录和数据目录清空,重启,然后再安装。否则将会重复之前的问题。我第一次就是在这里卡了好久一段时间。

在IIS6上安装Perl5(以5.8.8.819为例)
1、在ActiveState上下载ActivePerl,运行,根据提示完成安装。

2、打开IIS,找到需要使用perl的站点,点右键-属性,找到“主目录”选项卡,点击“配置”按钮,在“映射”选项卡中,点“添加”按钮,通过“浏览”,找到perl安装目录的bin子目录,把查找文件类型设为CGI(*.exe文件),选择perl.exe文件,确定,“扩展名”填“.pl”,其他选项默认即可。

3、找到IIS的web服务扩展,把“Perl CGI Extension”设为允许状态。

4、对perl的安装目录,给予iis的两个帐户以读取和运行、修改、写入的权限。


在IIS6上安装DevMS的IIS-Tools(以1.1.0.0为例)
1、在DevMS.Com上下载压缩包,解压。

2、打开IIS,找到需要使用IIS-Tools的站点,点右键-属性,找到“ISAPI筛选器”选项卡,点击“添加”按钮,筛选器名称可以为“devms”,浏览文件,找到解压包里的Devms.Com.IISTools.dll文件。确定添加。

3、找到IIS的web服务扩展,点击“添加一个新的web服务扩展”,扩展名可以为“devms”,添加文件同样为Devms.Com.IISTools.dll,并把“设置扩展状态为允许”勾选。

4、对网站的web目录,给予SERVICE帐户的完全权限。

5、重启IIS即可。

PTW:
DevMs的IIS-Tools特性:
1、URL重定向(URL ReWrite)
完全支持各类型的URL重定向.如常见的无后缀名等
通过正则表达式设定重定向匹配项目.最多可达255个项目
支持对文件的访问请求有条件进行监控,如cookie、引用来源等

2、防盗链
实现了文件非法访问监控(防止盗链).允许使用引用来源和COOKIE验证两种方法

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Continued Use of PHP: Reasons for Its EnduranceThe Continued Use of PHP: Reasons for Its EnduranceApr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python: Exploring Their Similarities and DifferencesPHP and Python: Exploring Their Similarities and DifferencesApr 19, 2025 am 12:21 AM

PHP and Python are both high-level programming languages ​​that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

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

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.