I recently installed PHP on IIS/Windows 7, but it isn’t working. I am getting the entire source file in the browser window.
FastCGI Settings shows c:\Program Files (x86)\PHP\php-cgi.exe
Handler Mappings has
- Request Path: *.php
- Modue: FastCgiModule
- Executable: C:\Program Files (x86)\PHP\php-cgi.exe
- Request Restrictions: File or Folder, All verbs, Script Access
To answer the answer you gave one hour ago, which said (quoting) :
That’s not a setting of IIS ; that’s a configuration option of PHP, which is called
short_open_tag: if that configuration option is enabled, short tags (i.e.<?) will be accepted.Using short open tags is often not considered as a good pratice, as they can be disabled — and they are, by default, with recent versions of PHP — but, if you are admin of your server, you should be able to re-enable them.
And, for information, they are also considered as “bad” because they can cause problem with XML files, which start with
<?xml— ifshort_open_tagis enabled, this will cause troubles, as it starts with<?Enabling
short_open_tagis just a matter of editing yourphp.inifile, and usingInstead of
No need to edit/path all your PHP files 😉
(Well, if you are admin of your server, that is…)