Running php pages

K

King Coffee

Hi,

I have PHP installed on my workstation. I create a parent website in
ASP.NET. However, I want to link to a php script page. What can I put in my
web.config file to process php script files. Right now, when I try to run
the php page, with the default web.config file, I get error:

Server Error in '/kcwebapps.com' Application.
--------------------------------------------------------------------------------

The HTTP verb POST used to access path
'/kcwebapps.com/Samples/KingCorp/submit.php' is not allowed.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The HTTP verb POST used to
access path '/kcwebapps.com/Samples/KingCorp/submit.php' is not allowed.

Thanks,

King
 
G

Gregory A. Beamer

Hi,

I have PHP installed on my workstation. I create a parent website in
ASP.NET. However, I want to link to a php script page. What can I put
in my web.config file to process php script files. Right now, when I
try to run the php page, with the default web.config file, I get
error:

Before whacking the config file, make sure you have PHP properly
installed and registered in IIS. If this is not done correctly, you are
going nowhere. Then ensure the .php extension is being handled in your
web application. This can be done using the IIS management tools and
ensuring the mapping is set up correctly.

Pull the docs for installing PHP on IIS. You have to follow them to the
letter to have any hope of getting this to work.

Now, I personally have not tried the two together, so I am shooting in
the dark here. In theory, however, it should work fine, especially if
you are running Windows 7 (LOL). ;-)

Peace and Grace,
 
K

King Coffee

Hi,

Thanks for your reply.

I have php insatall property, I can access a php file that contains the line
"<?php phpinfo(); ?>" via localhost OK. But the problem may lie in the fact
that I'm trying to run php through the VS 2008 IDE. Nevertheless, how do you
setup php extension for ASP.NET applications via the IIS 7.0 management tool
?

King
 
G

Gregory A. Beamer

Hi,

Thanks for your reply.

I have php insatall property, I can access a php file that contains
the line "<?php phpinfo(); ?>" via localhost OK. But the problem may
lie in the fact that I'm trying to run php through the VS 2008 IDE.
Nevertheless, how do you setup php extension for ASP.NET applications
via the IIS 7.0 management tool ?

For IIS 7, the current recommendation is FastCGI (I have even seen some
Microsoft Peeps demoing it). You can download from here
(http://snurl.com/qdrf1). There are lots of demos on using FastCGI on
IIS7. And it is supposed to significantly speed up PHP on IIS without a
difficult setup.

I have not done extensive PHP setups, so I would examine the sites, as
anything I might post is from limited experience.

What I would do is set up a very simple page that attempts to use a PHP
page that only logs it was hit and the form elements sent. Once you have
a log on this page, you can go through the harder part of setting up
your page(s). This will eliminate the transfer to PHP problem if it
works the first time. Once that problem is eliminated, you can focus on
any other issues without fear it is an ASP.NET to PHP problem.

Peace and Grace,
 
K

King Coffee

Hi Gregory,

A php file contain "<?php phpinfo(); ?>" is the standard php test. I have
have FastCgiModule setup in the Handler Mapping Feature of IIS. Php works
fine outside of the ASP.NET IDE environment.

ASP.NET is not mapping the php files to the proper modules.

Thanks,
King
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top