Home php教程 php手册 十步!轻松搞定IIS+PHP环境

十步!轻松搞定IIS+PHP环境

Jun 06, 2016 pm 07:46 PM
environment Sudden easy

突然心血来潮想着自己一直使用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 目录下产生了五个文件。如下图”

    十步!轻松搞定IIS+PHP环境

  实在是郁闷,更有趣的是,我根据一个博主的详细指导去下载“web平台安装程序”,网址:http://www.iis.net/downloads/microsoft/fastcgi-for-iis

  安装时竟然提示我:

  十步!轻松搞定IIS+PHP环境

  我擦、重复不下五遍,而且还在虚拟机上面测试,相同结果。最后我试着搜索了一下:FastCGI,出来了一下结果,就这样成功了,下面就贴出这十步:

1、微软提供的‘web平台安装程序地址:http://www.iis.net/downloads/microsoft/fastcgi-for-iis

十步!轻松搞定IIS+PHP环境

2、我这里是IIS7,点击Web PI 进入下面页面

十步!轻松搞定IIS+PHP环境

 

3、点击下载下的 FastCGIIIS6.exe

十步!轻松搞定IIS+PHP环境

 

4、此时会弹出,我们尝试下载的产品不存在,

十步!轻松搞定IIS+PHP环境

 

5、没关系,我们搜索一下 FastCGI

十步!轻松搞定IIS+PHP环境

 

6、然后测序会自动下载并安装,完成后我们 : 右键:我的电脑->管理->Internet信息服务(IIS)管理器

十步!轻松搞定IIS+PHP环境

 

7、点击FastCGI设置

十步!轻松搞定IIS+PHP环境

 

8、我们去目录地下查看

十步!轻松搞定IIS+PHP环境

 

 

9、新建一个phpinfo.php 文件,里面写上

   

        phpinfo();

    ?>

十步!轻松搞定IIS+PHP环境

 

10、访问 http://localhost/phpinfo.php或者http://127.0.0.1/phpinfo.php

 

十步!轻松搞定IIS+PHP环境

 

好了,大功告成!

  写这篇可能没有太多的技术含量,但是对于可能和我犯一样错误的同学会有帮助,因为随着php的发展,IIS也开始重视起来了,原来IIS可能只是支持,现在微软有意想把它做成像很多集成环境一样的赶脚。所以,网上的一些原来的IIS+PHP的教程有时候可能会弄的我们这些新手一头雾水,这里我把自己的经历贴出来,希望可以帮到和我一样的同学。

后续:

  早上起来看到下面三位园友的评论,自己马上去试了试,结果就是:的确是我走了弯路,他们的这种做法更加简洁。好了,也把我更具他们的提示测试的过程简单的贴出来

  1、首先确认IIS中启用了CGI功能:

  十步!轻松搞定IIS+PHP环境

  2、IIS 中为了易于PHP程序的安装,增设了PHP Manager模块,下载地址:http://phpmanager.codeplex.com/releases/view/62183,

  十步!轻松搞定IIS+PHP环境

  3、安装过程就不贴图了,直接下一步就好。完成后就会在IIS 中会发现里面多了一个PHP Manager图标项了。双击PHP Manager后,点击“Register new PHP Version”,然后选择好c:\php5.6\php-cgi.exe,就OK了

  十步!轻松搞定IIS+PHP环境

  4、继续写一个phpinfo.php的文件测试,成功!

  十步!轻松搞定IIS+PHP环境

  5、至于mysql.dll 等什么extension扩展,根据实际需要修改php.ini文件就好了。

感谢下面的三位园友:vibbow、傻子有人用了 、codepat

  

  

 

 

 

 

 

 

 

 

 

 

 

  

Statement of this Website
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

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Unable to boot into Windows recovery environment Unable to boot into Windows recovery environment Feb 19, 2024 pm 11:12 PM

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

What are the differences between Python and Anaconda? What are the differences between Python and Anaconda? Sep 06, 2023 pm 08:37 PM

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

Beginners can easily master it: Detailed analysis of PyQT installation guide Beginners can easily master it: Detailed analysis of PyQT installation guide Feb 18, 2024 pm 06:06 PM

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

11 Ways to Set Environment Variables on Windows 3 11 Ways to Set Environment Variables on Windows 3 Sep 15, 2023 pm 12:21 PM

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

What are the PHP integrated environment packages? What are the PHP integrated environment packages? Jul 24, 2023 am 09:36 AM

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 Common problems and solutions for Laravel environment configuration file .env Mar 10, 2024 pm 12:51 PM

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 web development environment setup tutorial Python web development environment setup tutorial Jun 17, 2023 pm 02:10 PM

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

How to configure the go language environment How to configure the go language environment Jan 06, 2021 am 11:37 AM

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.

See all articles