0

I have followed some videos and seen some questions on here to no avail.

I have installed IIS (using windows 10) and downloaded PHP 7 along with Microsoft visual as stated to do so on a few tutorials. Also I installed the CGI which is a visible Icon on my IIS. I then went into Handler Mapping and created a new module and entered the request path as '*.php' and selected FastCgiModule, to which I choose entered the Executable to the folder where the Php files I download are located and selected the PHP CGI(C:\PHP\php-cgi.exe). I have a file named index.php and inside the file I have "Hello" and phpinfo() function in the file.

However, when I view the page it shows the text "Hello "but its not executing the PHP Code (<?php phpinfo(); ?>).

Any advice as to what I'm doing wrong here?

Dharman
  • 30,962
  • 25
  • 85
  • 135
scarlet
  • 15
  • 1
  • 5
  • How are you viewing the `index.php`? – chris85 Sep 28 '16 at 22:01
  • Possible duplicate of [PHP code is not being executed, instead code shows on the page](http://stackoverflow.com/questions/5121495/php-code-is-not-being-executed-instead-code-shows-on-the-page) – chris85 Sep 28 '16 at 22:03
  • Hi, I'm viewing via WIndows Edge browser via Browse Website in IIS – scarlet Sep 28 '16 at 22:04
  • As `http://localhost/index.php`? (I think it'd be localhost). – chris85 Sep 28 '16 at 22:07
  • Sorry I just realised that I have 2 files one is called index.php and one is called index.html. Both contain the same information "Hello" and the phpinfo(); function. So the index.html display only 'Hello' and the index.php shows the HTTP 404 error. I just want to be able to execute Php And Yes its http://localhost/index.php and http://localhost/index.html – scarlet Sep 28 '16 at 22:09
  • You should update the question with that information. The `.html` not executing the PHP code is expected behavior. This also is sounding more like a server issue then a coding issue; might wanna try serverfault. – chris85 Sep 28 '16 at 22:14
  • @chris85 Please don't send people to post questions on off-topic sites. [SF] does not accept questions about personal workstations and development environments. – Michael Hampton Sep 28 '16 at 22:54
  • @MichaelHampton `managing the hardware or software of servers` sounds exactly what this user is asking -http://serverfault.com/help/on-topic – chris85 Sep 28 '16 at 23:01
  • @chris85 That's not what's going on here. – Michael Hampton Sep 28 '16 at 23:06
  • All I'm trying to do is Install and Configure PHP on my IIS. And as I said i followed tutorials such as https://www.youtube.com/watch?v=YAHZKR7ULjI And for some reason does not work? – scarlet Sep 29 '16 at 08:53

0 Answers0