十步!轻松搞定IIS+PHP环境
突然心血来潮想着自己一直使用Apache+php的模式,想要了解一下IIS+php的模式。说起来也算是九曲十八弯吧! 第一部分:以ISAPI.dll 扩展的形式 结果按照资料上面说的我就是找不到一个isapi.dll这个东西,只有nsapi.dll,最后一查才知道:php5.3以后就不支持这
突然心血来潮想着自己一直使用Apache+php的模式,想要了解一下IIS+php的模式。说起来也算是九曲十八弯吧!
第一部分:以ISAPI.dll 扩展的形式
结果按照资料上面说的我就是找不到一个isapi.dll这个东西,只有nsapi.dll,最后一查才知道:php5.3以后就不支持这种形式的搭建了。
php5.3是不能在IIS6上面通过ISAPI扩展运行的,而且在php5.3文件里面也没有php5.3isapi.dll,取而代之的是php5.3nsapi.dll,换句话说php5.3以后的版本就不再用ISAPI进行扩展在IIS里运行了,只能通过FastCGI的方式执行
第二部分:继续网上搜索了一堆的FastCGI 按照php的教程,可是我又找不到人家说的
“安装后在 C:\WINDOWS\system32\inetsrv 目录下产生了五个文件。如下图”
实在是郁闷,更有趣的是,我根据一个博主的详细指导去下载“web平台安装程序”,网址:http://www.iis.net/downloads/microsoft/fastcgi-for-iis
安装时竟然提示我:
我擦、重复不下五遍,而且还在虚拟机上面测试,相同结果。最后我试着搜索了一下:FastCGI,出来了一下结果,就这样成功了,下面就贴出这十步:
1、微软提供的‘web平台安装程序’地址:http://www.iis.net/downloads/microsoft/fastcgi-for-iis
2、我这里是IIS7,点击Web PI 进入下面页面
3、点击下载下的 FastCGIIIS6.exe
4、此时会弹出,我们尝试下载的产品不存在,
5、没关系,我们搜索一下 FastCGI
6、然后测序会自动下载并安装,完成后我们 : 右键:我的电脑->管理->Internet信息服务(IIS)管理器
7、点击FastCGI设置
8、我们去目录地下查看
9、新建一个phpinfo.php 文件,里面写上
phpinfo();
?>
10、访问 http://localhost/phpinfo.php或者http://127.0.0.1/phpinfo.php
好了,大功告成!
写这篇可能没有太多的技术含量,但是对于可能和我犯一样错误的同学会有帮助,因为随着php的发展,IIS也开始重视起来了,原来IIS可能只是支持,现在微软有意想把它做成像很多集成环境一样的赶脚。所以,网上的一些原来的IIS+PHP的教程有时候可能会弄的我们这些新手一头雾水,这里我把自己的经历贴出来,希望可以帮到和我一样的同学。
后续:
早上起来看到下面三位园友的评论,自己马上去试了试,结果就是:的确是我走了弯路,他们的这种做法更加简洁。好了,也把我更具他们的提示测试的过程简单的贴出来
1、首先确认IIS中启用了CGI功能:
2、IIS 中为了易于PHP程序的安装,增设了PHP Manager模块,下载地址:http://phpmanager.codeplex.com/releases/view/62183,
3、安装过程就不贴图了,直接下一步就好。完成后就会在IIS 中会发现里面多了一个PHP Manager图标项了。双击PHP Manager后,点击“Register new PHP Version”,然后选择好c:\php5.6\php-cgi.exe,就OK了
4、继续写一个phpinfo.php的文件测试,成功!
5、至于mysql.dll 等什么extension扩展,根据实际需要修改php.ini文件就好了。
感谢下面的三位园友:vibbow、傻子有人用了 、codepat

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Windows Recovery Environment (WinRE) is an environment used to repair Windows operating system errors. After entering WinRE, you can perform system restore, factory reset, uninstall updates, etc. If you are unable to boot into WinRE, this article will guide you through fixes to resolve the issue. Unable to boot into the Windows Recovery Environment If you cannot boot into the Windows Recovery Environment, use the fixes provided below: Check the status of the Windows Recovery Environment Use other methods to enter the Windows Recovery Environment Did you accidentally delete the Windows Recovery Partition? Perform an in-place upgrade or clean installation of Windows below, we have explained all these fixes in detail. 1] Check Wi

In this article, we will learn about the differences between Python and Anaconda. What is Python? Python is an open source language that places great emphasis on making the code easy to read and understand by indenting lines and providing whitespace. Python's flexibility and ease of use make it ideal for a variety of applications, including but not limited to scientific computing, artificial intelligence, and data science, as well as creating and developing online applications. When Python is tested, it is immediately translated into machine language because it is an interpreted language. Some languages, such as C++, require compilation to be understood. Proficiency in Python is an important advantage because it is very easy to understand, develop, execute and read. This makes Python

Even beginners can get started easily: Detailed PyQT installation tutorial PyQT is a GUI development toolkit based on the Python language. It can help developers quickly and easily create various beautiful graphical user interfaces. For beginners who want to learn PyQT from scratch, installing PyQT may be a difficult first step. This article will introduce the installation steps of PyQT in detail and provide specific code examples to help beginners get started easily. Step 1: Install Python Before installing PyQT, you first need to make sure

Setting environment variables on Windows 11 can help you customize your system, run scripts, and configure applications. In this guide, we'll discuss three methods along with step-by-step instructions so you can configure your system to your liking. There are three types of environment variables System environment variables – Global variables are the lowest priority and are accessible to all users and applications on Windows and are typically used to define system-wide settings. User Environment Variables – Higher priority, these variables only apply to the current user and process running under that account, and are set by the user or application running under that account. Process environment variables – have the highest priority, they are temporary and apply to the current process and its sub-processes, providing the program

PHP integrated environment packages include: 1. PhpStorm, a powerful PHP integrated environment; 2. Eclipse, an open source integrated development environment; 3. Visual Studio Code, a lightweight open source code editor; 4. Sublime Text, a A popular text editor, widely used in various programming languages; 5. NetBeans, an integrated development environment developed by the Apache Software Foundation; 6. Zend Studio, an integrated development environment designed for PHP developers.

Common problems and solutions for Laravel environment configuration file .env When using the Laravel framework to develop projects, the environment configuration file .env is very important. It contains key configuration information of the project, such as database connection information, application keys, etc. However, sometimes there are some common problems when configuring the .env file. This article will introduce these problems and provide solutions, and attach specific code examples for reference. Problem 1: Unable to read the .env file when we have configured the .env file

Python is a high-level programming language. Because of its cross-platform, easy-to-learn, and powerful features, some large companies, such as Google and Dropbox, choose to use Python for development. As Web applications have gradually become mainstream applications in recent years, Python has gradually become the preferred development language for Web applications. This article will introduce how to build a Python Web development environment on Windows systems, including Pyth

Go language environment configuration method: 1. Download the go language compiler and double-click to run the installation program; 2. Accept the license agreement and click next; 3. Set the installation directory and click OK; 4. After the installation is completed, change the go installation directory Just add the bin directory to the environment variable.
