Problem getting PHP running on IIS8

Problem getting PHP running on IIS8

by Joseph Edwards -
Number of replies: 7

Just had a Moodle Project added to my list.

Need to create a Moodlesite on our Server (Server 2012) using IIS 8 and then set the Database on our MSSQL Server. I could use some direction here. I have done a setup using Windows 7 and WAMP Server and MySQL.


So I am looking for assistance in getting the Server Project up and running. I have attempted this install but can't get phpinfo.php to display on the new website. I can get it to display on the default website IIS created though. So first step setting up PHP I think I must be missing a setting or step.


And this is probably the first of serveral questions. Thanks in advance.

(Edited by Howard Miller to improve subject - original submission Friday, 6 November 2015, 8:05 PM)

Average of ratings: -
In reply to Joseph Edwards

Re: Problem getting PHP running on IIS8

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Welcome to Moodle... I know nothing about Windows so can't help you much there but just to say, please try to keep your subject lines relevant wink

In reply to Joseph Edwards

Re: Problem getting PHP running on IIS8

by Usman Asar -
Picture of Plugin developers Picture of Testers

Joseph,

What have you done so far to setup PHP?

if you are new to setup php on IIS, then I would recommend easier part, using web platform installer, it will download and install all necessary files for you, add handler mappings and setup environment variables.

if you want to go manual way, then again not an issue, less than 5 mins work.

Make sure when installing IIS, you have selected CGI to be installed as well.

You'll be downloading Non-thread safe version from php.net, and extracting contents into with program files or even root directory. (its upto you weather to download 32-bit or 64-bit)

Secondly, go into Environment variables, and add the lines C:\php (after semi colon) or C:\program files\php --> depending upon where you have extracted the folder

go into IIS manager, you'll find handler mappings  there, you'll be adding information about PHP, so click Module mappings (from right hand menu), and type following

Request path : *.php

Module: FastCGI

executable: C:\php\php-cgi.exe (depending upon where your php folder is)

name: give any that you can come later to, like Php-5 etc

in default files, add index.php as well, and you'll be good to go.

again a reminder, WPI will make your job much easier.

In reply to Usman Asar

Re: Problem getting PHP running on IIS8

by Marijana Despotovic-Zrakic -
Dear Usman,


Everything I did and still does not work:


https://support.microsoft.com/en-us/kb/2819022

https://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/install-and-configure-php

I always get this picture

Php answer

Thank you for answer,

Marijana

In reply to Marijana Despotovic-Zrakic

Re: Problem getting PHP running on IIS8

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

You appear to have an IIS configuration issue rather than a PHP or Moodle issue. Your index.php file does not appear to be in the folder that your IIS has as its root. 

Once you find the folder that your IIS is pulling in files from you will then be able to progress. I don't know much about IIS, but there is a huge amount of documentation on the web for it.

In reply to Marijana Despotovic-Zrakic

Re: Problem getting PHP running on IIS8

by Usman Asar -
Picture of Plugin developers Picture of Testers

Marijana,

MOST likely, your port 80 is occupied, either by Apache, Skype or MS-SQL Server Reporting Services.

is it possible for me to have remote access to your server to have a look inside myself?

Either by RDC or TeamViewer