php教程|php手册
Win7,FastCGI,配置,IIS7,执行,php
php教程-php手册
互动网源码,Ubuntu更换桌面管理,在tomcat部署服务区,爬虫聊群,php诚信论坛的需求分析,郑州外包seolzw
Name: PHP via FastCGI 3. Modify the Resuest Restrictions configuration: 4. Click OK . and 4. In the Add Module Mapping confirmation dialog box that asks if you want to create a FastCGI application for this executable, click Yes .\ 5. Test t
病历系统系统源码,vscode的开发语言,ubuntu_core,tomcat隐藏管理页面,sqlite查询包含字符串,爬虫抓抖音数据联系方式,php过狗大马,贵阳seo引擎怎么优化,php电影网站源码,手机模板网站模板下载工具lzw
php源码加密原理,vscode控制台怎么操作,ubuntu运行卡死,基于Tomcat博客系统,舆情爬虫服务,ecshop php框架,北京抖音seo优化怎么收费lzw
Name: PHP via FastCGI
3. Modify the Resuest Restrictions configuration:
4. Click OK. and 4. In the Add Module Mapping confirmation dialog box that asks if you want to create a FastCGI application for this executable, clickYes.\
5. Test that the handler mapping works correctly by creating a phpinfo.php file in the C:\inetpub\wwwroot folder that contains the following code:
6. Open a browser and navigate to http://localhost/phpinfo.php. If everything was setup correctly, you will see the standard PHP information page.
在这一步中,为了更加方便地检测Php是否安装成功,可以在cmd中,cd到c:\php目录下执行:php-cgi.exe D:\phpTest\test.php来验证。
NOTE: If you do not see FastCgiModule in theModules: list, the module is either not registered or not enabled. To check if the FastCGI module is registered, open the IIS configuration file that is located
at %windir%\windows\system32\config\applicationHost.config and check that the following line is present in the div:
In the same file, also check that the FastCGI module is added to the div:
Configure IIS 7 to handle PHP requests by using the command line
Alternatively, you can complete the steps above by using the command line tool AppCmd.
1. Create the FastCGI application process pool by running the following command:
C:\>%windir%\system32\inetsrv\appcmd set config /div:system.webServer/fastCGI /+[fullPath=’c:\{php_folder}\php-cgi.exe’]
2. Create the handler mapping by running the following command:
C:\>%windir%\system32\inetsrv\appcmd set config /div:system.webServer/handlers /+[name=’PHP_via_FastCGI’,path=’*.php’,verb=’*’,modules=’FastCgiModule’,scriptProcessor=’c:\{php_folder}\php-cgi.exe’,resourceType=’Unspecified’]
Note: If you are using PHP version 4.X, you can use php.exe instead of php-cgi.exe.
BTW, 在这个过程中,可能会遇到500错误:
Error info:
HTTP Error 500.0 – Internal Server Error
C:\PHP\php-cgi.exe – The FastCGI process exited unexpectedly
Detailed Error Information
Module: FastCgiModule
Notification: ExecuteRequestHandler
Handler: PHP via FastCGI
Error Code: 0x000000ff
Requested URL: localhost/test.php
Physical Path: C:\inetpub\wwwroot\test.php
Logon Method: Negotiate
Logon User: Domain\user
引起这个问题的关键还是php.ini文件的设置有问题,可以通过排除法来解决:直接到 c:\php目录下,双击PHP-CGI.EXE, 在弹出的命令行窗口下看具体是什么错误,然后相应地修改php.ini文件,清除掉(用;注释掉)无效的或者提示找不到的extensions,就可以使用了。
Try to execute PHP-CGI.EXE (BY DOUBLECLICKING ON IT). See if you get any error messages/ pop-ups. I got a ton of them and it all boiled down on having a bunch of extensions turned on, but not being available in my ext folder. Clear the PHP.INI of those invalid
extensions and the problem should go away.
如果觉得《Win7下通过FastCGI配置IIS7以执行php脚本》对你有帮助,请点赞、收藏,并留下你的观点哦!