IIS 7 and Above
Known Issues and Workarounds
IIS EXPRESS will not display a .php page
Last post Sep 13, 2017 08:18 AM by Yuk Ding
Sep 09, 2017 04:58 AM|frustratedjohn|LINK
I am trying to set up a login page using PHP to query a sql database to validate a user id and password. If I name the file index.php iis express
will find it but not display it. If I change the extension to html the html formatted user id and password entry boxes and the login button are displayed but the php code is not executed.
Sep 09, 2017 12:54 PM|lextm|LINK
PHP requires manual setup,
Though the steps apply to IIS only, you can use Jexus Manager to apply the same to IIS Express,
Sep 09, 2017 07:43 PM|frustratedjohn|LINK
I downloaded Jexusmanager and used it to do the handler mapping. I opened the PHP.ini file and made all the changes as described. I am still getting the same error.
Sep 09, 2017 08:42 PM|lextm|LINK
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Failed request tracing is needed in this case to learn which module on IIS gives you the 500 error page. The message does not seem to come from IIS default modules though, as IIS modules usually return a more detailed page.
You will have to manually edit applicationHost.config to set failed request tracing rules, as I am still working on FRT page of Jexus Manager.
Sep 10, 2017 12:23 AM|frustratedjohn|LINK
I have the tracing log for the last time I attempted to open my web site and open the page which will not display the page.
How do I determine which module caused the error. Below is the section where I can see HTTP status 500
Sep 10, 2017 08:05 PM|lextm|LINK
You should not read raw XML. Microsoft has the transformation file aside,
Sep 11, 2017 12:30 AM|frustratedjohn|LINK
I opened the trace log in internet explorer and looked at all the data available there but saw nothing that stood out as an error other than the htttp code of 500. What sort if indication should I look for.
Sep 11, 2017 06:08 AM|Yuk Ding|LINK
What operation have done for IIS express applicationhost.config?
If you need to enable .php for IIS express, you may need to add a handler for your PHP. It could just looks like this:
<handlers accessPolicy="Read, Script">
<add name="PHP54_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\iis express\PHP\v5.4\php-cgi.exe" resourceType="Either" />
Just modify the path and fastcgi section like this:
<application fullPath="C:\Program Files (x86)\iis express\PHP\v5.4\php-cgi.exe" monitorChangesTo="php.ini" activityTimeout="600" requestTimeout="600" instanceMaxRequests="10000">
<environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
<environmentVariable name="PHPRC" value="C:\Program Files (x86)\iis express\PHP\v5.4" />
Sep 11, 2017 02:49 PM|frustratedjohn|LINK
I have all the above set up as describes except that my version of PHP is 7.1
Sep 11, 2017 03:41 PM|frustratedjohn|LINK
My problem. I did not realize that error display was turned off in PHP. Once I turned it on I found out where my problem was. Syntax error. I corrected that and the page displays now. I thank all of you for your help. You helped me learn a lot about setting
up PHP and IIS Express. I am marking this problem as resolved. Again thanks.
Sep 13, 2017 08:18 AM|Yuk Ding|LINK
It will be appreciated if you could mark this thread as answer.