浅析iis7.5安装配置php环境_php实例
iis7.5是安装在win7、win8里的web服务器,win2003、win2000的web服务器使用的是iis6.0,由于win7、win8系统相比win2003、win2000有了改新革面的不同,因此对于iis7.5的配置也必需捣鼓一翻才能熟悉。不过这些都是操作性的东西,就如当初第一次接触iis6.0那样,操作过几遍就慢慢熟悉了。
当下我需要web服务器运行php程序,因此要配置一下php环境。一开始以为比较容易,因为在iis6.0里配置了无数次了,星外PHP全自动安装30秒轻松搞定,但是当打开iis7.5后,才发现原先iis6.0的熟悉的东西大部分在iis7.5里找不到了,不得不摸索一翻。本文结合自己的实际经验,介绍一下如何在iis7.5安装配置php。
1.准备文件
首先确保你已经下载并且解压了php程序文件,如果还没有,先下载一个。php程序文件是不需要安装的,把下载的压缩包解压到任何一个文件夹里即可。本案例里使用的是PHP 5.2.13。
官网下载Php执行文件:http://windows.php.net/download/
2.IIS配置2.1 添加ISAPI筛选器
进入“控制面板”-“程序”-“打开或关闭Windows功能”,展开“Internet信息服务”,然后勾选“ISAPI筛选器”,最后点击“确定”按钮,如下图所示:
图1:打开ISAPI筛选器
2.2 设置ISAPI2.2.1 打开IIS管理器
进入IIS管理器(方法:右键点击“计算机”,再点击“管理”,在弹出界面里展开“服务和应用程序”的项目,然后双击“Internet 信息服务(IIS)管理器”),进入IIS管理界面,如下图。
图2:打开IIS管理器
2.2.2 添加PHP的ISAPI路径
在上图2中,双击“ISAPI和CGI限制”的图标,之后进入设置界面,如下图。
图3:添加PHP ISAPI
如上图3所示,点击“添加”,在弹出窗口里输入php的ISAPI路径,也即是php解压包的php5isapi.dll的文件路径,描述文字随意填写,如“php”,勾选“允许执行扩展路径”,然后点击“确定”。
2.2.3 添加PHP的处理程序映射
点击一下计算机名称(更正:应该是点击“网站”下面的需要设置的网站名称,而不是最顶部的计算机名称,这个设置是针对某一个网站的),会看到右侧的“IIS”下面有个“处理程序映射”的图标,如下图。
图4:IIS处理程序映射
双击“处理程序映射”的图标,就进入设置界面,如下图:
图5:添加PHP处理程序映射
在设置界面里点击“添加脚本映射...”,然后在弹出窗口里填写相应的内容,请求路径是“*.php”,可执行文件是php解压包的php5isapi.dll的文件路径,跟图3填写的路径一样。名称随意,可填“php”,请求限制不用设置,点击“确定”添加完毕。
2.2.4 测试Php
用记事本输入以下几行代码:
<?php phpinfo(); ?>
保存为:info.php,放到网站目录下,然后启动浏览器,访问 http://localhost/info.php,如果看到如下画面就证明安装成功了!
图6:php运行成功界面
以上所述就是本文的全部内容了,希望大家能够喜欢。

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

AI Hentai Generator
Generate AI Hentai for free.

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

First, go to the official website to download the software package and unzip it. It is best not to have the path problem with the Chinese nginx configuration. Under Windows, the file path can be separated by "\", "\\", or "/". symbol. But "\" is the most likely to cause problems, so try to avoid using it. Do not add path, otherwise it will cause an error. The config file path cannot be found. For example, I decompressed the cmd command on the e drive to locate the folder where nginx.exe is located, cde:\worksoftware\nginx-1.10.1 and then execute it. First ensure the nginx.conf file There is no problem with the configuration. In fact, the most important and main job of nginx is the configuration file, and there is nothing else.

iis cannot be used on Linux because iis is a basic Internet service provided by Microsoft based on running Microsoft Windows. It was developed under the Windows operating system platform, so it is restricted to run under the Windows operating system.

As we all know, when any file is in use, no other process can access/change it. In this case, when a process attempts to open a file, the operating system locks the file to prevent it from being modified by another process. “The process cannot access the file because it is in use by another process” is such an error message observed by many users on their Windows computers. This error is known to occur in different versions of WindowsOS and WindowsServer. Usually, this error message is observed during using Netsh command on the user’s Windows PC. Another situation where this error occurs is when trying to run the Internet Information Services (IIS) M

When using PHP for website development, you may encounter character encoding issues. Especially when using different web servers, you may find that IIS and Apache handle character encoding differently. When you use IIS, you may find that garbled characters appear when using UTF-8 encoding; but when using Apache, everything works fine without any problems. How should this situation be resolved?

To open an application pool in IIS: 1. Open IIS Manager; 2. Navigate to the "Application Pools" node; 3. Right-click the target application pool and select "Manage"; 4. Click "Advanced Settings" Tab; 5. Application pool configuration can be viewed and modified here.

Solutions to iis failure to start: 1. Check the integrity of the system files; 2. Check the port occupancy; 3. Start related services; 4. Reinstall IIS; 5. Reset the Windows system; 6. Check the metabase file; 7. Check file permissions; 8. Update the operating system and applications; 9. Avoid installing too many unnecessary software; 10. Back up important data regularly. Detailed introduction: 1. Check the integrity of system files, run system file checking tools, check the integrity of system files, etc.

Solution: 1. Check whether the IIS service has been installed; 2. Check dependent services; 3. Check port conflicts; 4. Check configuration files and permissions; 5. Re-register IIS related components; 6. Check log files.

Yes, it is possible to delete IIS log files. Removal methods include selecting the website or application pool through IIS Manager and deleting the log file in the Log Files tab. Use a command prompt to go to the log file storage directory (usually %SystemRoot%\System32\LogFiles\W3SVC1) and use the del command to delete the log file. Use third-party tools such as Log Parser to automatically delete log files.
