I have seen the following suggested for web.config but when I try it it crashes the whole website,
I think it fails because it does not find php-cgi.exe at that location.
<handlers accessPolicy="Read, Script"> <add name="PHP via FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\PHP\php-cgi.exe" resourceType="Unspecified" requireAccess="Script" /> </handlers>
I need to execute some PHP in order to update some <meta .... > tags based parameters on the URL submitted. eg. http://example.com/?v=abcdef
More likely, I will have embedded php only inside index.html or at most the root *.html files.
Your help is greatly appreciated.
In the meantime, I going to hunt down how to process URL parameters from PHP.
Hi @Raweew. Thanks for being part of GoDaddy Community! I'm not sure if what you're trying to do is possible, but I can help you get the correct path to php-cgi.exe. It depends on the type of hosting you have:
Hope that helps!
Both paths you provided fail with the following errors:
HTTP Error 500.0 - Internal Server Error
<handler> scriptProcessor could not be found in <fastCGI> application configuration
Requested URL: http://mumti.org:80/mumti/date_php.html
Physical Path file:///D:/Hosting/2584489/html/mumti/date_php.html
Error Code 0x80070585
Can you please confirm the following is the correct entry in web.config to allow php to run inside .html files
<system.webServer> ... <handlers accessPolicy="Read, Script"> <add name="PHP via FastCGI" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP54\php-cgi.exe" resourceType="Unspecified" requireAccess="Script" /> </handlers> </system.webServer>
The "Hosting Details" page shows the following:
IIS version 7.0 and PHP 5.3
FYI, php runs from files with extension .php
NOTE: if you know a different trick in web.config, whereby the requested index.html causes a matching index.php to execute and then index.php in turns returns index.html to the requestor. That will do as well.
I have talked with support but all they can say is that php is correctly configured. And enabling PHP inside .HTML falls into the hand of the CUSTOMERS 😞
Please could you provide the full entry that you suggest your customers to use in order to support PHP inside .HTML files. I believe this should be enabled by default. Thank you.