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
PHP Performance Tuning for High Traffic WebsitesPHP Performance Tuning for High Traffic WebsitesMay 14, 2025 am 12:13 AM

ThesecrettokeepingaPHP-poweredwebsiterunningsmoothlyunderheavyloadinvolvesseveralkeystrategies:1)ImplementopcodecachingwithOPcachetoreducescriptexecutiontime,2)UsedatabasequerycachingwithRedistolessendatabaseload,3)LeverageCDNslikeCloudflareforservin

Dependency Injection in PHP: Code Examples for BeginnersDependency Injection in PHP: Code Examples for BeginnersMay 14, 2025 am 12:08 AM

You should care about DependencyInjection(DI) because it makes your code clearer and easier to maintain. 1) DI makes it more modular by decoupling classes, 2) improves the convenience of testing and code flexibility, 3) Use DI containers to manage complex dependencies, but pay attention to performance impact and circular dependencies, 4) The best practice is to rely on abstract interfaces to achieve loose coupling.

PHP Performance: is it possible to optimize the application?PHP Performance: is it possible to optimize the application?May 14, 2025 am 12:04 AM

Yes,optimizingaPHPapplicationispossibleandessential.1)ImplementcachingusingAPCutoreducedatabaseload.2)Optimizedatabaseswithindexing,efficientqueries,andconnectionpooling.3)Enhancecodewithbuilt-infunctions,avoidingglobalvariables,andusingopcodecaching

PHP Performance Optimization: The Ultimate GuidePHP Performance Optimization: The Ultimate GuideMay 14, 2025 am 12:02 AM

ThekeystrategiestosignificantlyboostPHPapplicationperformanceare:1)UseopcodecachinglikeOPcachetoreduceexecutiontime,2)Optimizedatabaseinteractionswithpreparedstatementsandproperindexing,3)ConfigurewebserverslikeNginxwithPHP-FPMforbetterperformance,4)

PHP Dependency Injection Container: A Quick StartPHP Dependency Injection Container: A Quick StartMay 13, 2025 am 12:11 AM

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Dependency Injection vs. Service Locator in PHPDependency Injection vs. Service Locator in PHPMay 13, 2025 am 12:10 AM

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHP performance optimization strategies.PHP performance optimization strategies.May 13, 2025 am 12:06 AM

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHP Email Validation: Ensuring Emails Are Sent CorrectlyPHP Email Validation: Ensuring Emails Are Sent CorrectlyMay 13, 2025 am 12:06 AM

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

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 Article

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)