views:

78

answers:

2

I have my Java site running under IIS 7. I need to install wordpress blog in it. I've installed and configured PHP in IIS. I have tested the PHP handler by creating a separate site, everything works fine, phpinfo() gives the desired output.

However, I'm having problem running the PHP files inside my Java web application. I've put my test PHP file inside a folder called blog. When I access this folder in the browser as /mysite/blog I get a 404 page from my Java application. When I try to invoke the php page directly, http://mysite/blog/index.php, I get an unprocessed php page.

I'm using isapi_handler for the reidrects. How do I tell my isapi_handler to ignore /blog folder? In my IIS handler mapping, *.php is mapped with Fast CGI. I'm not sure how to approach this problem and any help on this would be much appreciated.

Thanks in advance.

A: 

Did you configure FastCGI to process PHP files? To run PHP on FastCGI on IIS:

  1. Create application mapping for .php files to fcgiext.dll. I think you're done this already.
  2. Configure FastCGI to process .php files via php-cgi.exe. This can be configured by editing the \WINDOWS\system32\inetsrv\fcgiext.ini file. The FastCGI configuration file is pretty much self-explanatory.
Salman A
I've configured fast cgi and it's mapped to *.php. It works fine with a standalone site. The problem starts when I'm adding this mapping to my existing Java site. I think all the URLs are going to isap_redirect, the FastCgi handler is not receiving the request for *.php. Thanks.
Silent Walker
Can you turn off jsp mapping/redirection for this particular directory? I think this can be configured `uriworkermap.properties` file.
Salman A
Yes! I just found my solution through uriworkermap.properties! :)
Silent Walker
A: 

Excluding the blog directory from uriworkermap.properties seems to solve my problem. Here is the line I added to uriworkermap.properties -

!/mysite/blog/*=tomcat

This tells the isapi_redirect to ignore /blog folder.

Silent Walker