Last post Oct 19, 2011 10:31 AM by adharbert
Oct 14, 2011 11:55 AM|adharbert|LINK
I'm having an issue with running a PHP page on a .NET site. I've followed every blog out there touching on this subject, but every example uses Azure 1.3. With 1.4 and 1.5 they removed the web role CGI. I was told that the regular web role will support
a PHP if I did the follwing items.
1. Be sure I update my Windows features to CGI to run in IIS.
2. Download the Azure PHP SDK and pull the php directory into the root of my site.
3. create a web.roleConfig file that defines the fastCGI to point to this php directory I loaded into my application
4. in my web.config file I added a handler for fastCGI that will also point to the php directory I loaded into my application
My application so far is very simple. I have a default.aspx page that has a link to a test.php file. When I run this I keep getting now is the following:
- If I run the application as is, I get a 500 error.
- If I remove the handler section in my web.config page, it will run, but only locally now. If I push to cloud I get an error again.
I'm starting to get really pissed off over this, EVERY example I look at says the same thing, but nothing works. I've spoken with Azure gurus who tell me this is a simple process to get PHP to run, but nothing works.
Has anyone ran into this issue? I would provide my code for anyone willing to look at this so I can get some answers. I'm starting to guess that the Azure people never tried this simple senario when they removed the CGI role.
*** One thing, do I need to mark the "php-cgi.exe" file in the build Action under properties to something other than "Content" I notice the Copy to Output directory is set to "Do not copy." Just a thought.
Oct 15, 2011 09:45 PM|atconway|LINK
You might want to re-post this question on the Azure MSDN forums, where you might get some more exposure since this is an ASP.NET forum:
Windows Azure Platform Forums:
Oct 19, 2011 10:31 AM|adharbert|LINK
Thanks, I was looking for an Azure forum.
I reposted this question out there. If anyone want to see if there are any answers. Here's the link