I'm having the same issue as here: PHP code is not being executed, instead code shows on the page
That thread lists lots of useful tips, all of which I've followed but to no avail. Details:
- Brand new machine running Windows8
- Browsing with Chrome
- Using Apache 2.2 (and therefore selected VC6 for PHP, rather than something more recent) PHP is installed
- I manually edited the config files following this tutorial: http://www.youtube.com/watch?v=JJkAr_xyHWg (found the same advice elsewhere, too, and everything is appropriately (un)commented).
- I'm serving from localhost (and for my purposes, I only ever want to use localhost)
- Not using short tags
- Saved the config file in UTF8 encoding.
- My code executes just fine on my Mac, from which I've been running a local server for a while now.
- Mysterious but probably unrelated error: this machine has intermittent difficulty maintaining a wifi connection, especially when switching back & forth between local and remote servers.
- a simple .php file that calls phpinfo() returns all the appropriate info, nicely formatted
Remaining possibilities:
- My version(s) of Apache and/or PHP are bad or incompatible with each other or with Windows 8. (WAMP and EasyPHP gave me different problems, but that's another story!)
- There's some other random trick out there that no one has mentioned yet, like the text encoding thing. Who knew!?
- I've made some error in editing the config files.
I'm at my wits' end now, and reading all the existing answers here wasn't leading me anywhere new. Does anyone have more ideas?