PHP ignored


I’m a PHP newbie and I have what is probably a trivial problem, but it seems to have stumped me.

A few days back I installed PHP on Windows 10 and I’m using IIS and Chrome to learn how to drive it. All was well and over several days I wrote a bunch of simple test web pages that successfully processed embedded PHP. I then found that after a laptop reboot the test pages no longer worked - the HTML was executed OK but the embedded PHP scripts were ignored. There are no IIS or PHP error messages. I’ve checked the configuration of the environment variables, IIS and PHP and all seem fine as far as I can tell.

I’ve no idea whether the PHP pre-processor is running or even being called. I don’t know whether PHP runs as a background process listening for calls or whether IIS spawns it when it encounters PHP, but I can’t see any background processes in Windows Task Manager that look like they’re related to PHP. Does a PHP listener have to be started as a background process and if so how?

If I invoke any of the test pages from the command line using “php.exe filename.php” then the PHP code executes as expected (of course the HTML does not).

Any suggestions appreciated.



Using PHP on IIS is always a headache. I would suspect that FastCGI is no longer running, presuming you used something like this to do so in the first place, IIS setup PHP. However, PHP is best left in Linux stacks, which is why most people use setups like XAMPP to run them.


Hi astonecipher & thx. Yes, that was my guess - php-cgi.exe is the FastCGI handler for IIS and I expected to see it running in the background in Task Manager, but I can’t see it or anything similar. I used a very similar installation process for Windows 10 described by James McCaffrey (I’d post the link but it seems that as a newbie the system won’t let me). I could understand if it never worked as that would imply that I got the installation wrong, but to work and then stop working when there have no changes is somewhat strange. I’ll wait for a while and see whether anyone can suggest a solution with IIS before I try switching to XAMPP.


Don’t waste your time with IIS. Just install XAMPP and be done with it.


I agree, if you aren’t going to run IIS in production (don’t) then don’t waste time configuring it locally


Problem solved. It was not related to the IIS or PHP configurations. For some reason (temporary madness?) I’d switched to referring to my test pages by their filename C:…\filename.php rather than their url localhost…\filename.php and didn’t spot it for days. Unsurprisingly the PHP was ignored as it wasn’t even being processed by IIS. The joys of being a newbie! :-[


Tends to happen! Glad you figured it out.