Apache configured with mod_jk - PHP not processed

Alles, was den Apache betrifft, kann hier besprochen werden.

Apache configured with mod_jk - PHP not processed

Postby PalPES » 08. April 2011 12:15

Hello,

mod_jk is succesfully installed and servlets are made to be processed by the tomcat container. (forwarded by Apache). But, the php files are not processed by Apache and it gives errors..

The httpd.conf has :

LoadModule jk_module modules/mod_jk.so
JkWorkersFile "D:/Installations/Apache Software Foundation/Tomcat 6.0/conf/workers.properties"
JkLogFile "D:/Installations/Apache Software Foundation/Apache 2.2/logs/mod_jk.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

<VirtualHost localhost:80>
ServerName localhost:80
JkMount /MyApp/ worker1
</VirtualHost>

MyApp war file is deployed using the tomcat manager. Inside MyApp is a php file. The php file on being called by a html page is not processed by Apache.. What could be the reason?

mod_jk.log file does not show up any error.. Where should be Apache be configured to handle non-jsp, non-servlet PHP requests? Apache handles PHP requests by default, right?

Please, can anyone give some input on this?
Thanks.
PalPES
 
Posts: 4
Joined: 23. March 2011 05:30

Re: Apache configured with mod_jk - PHP not processed

Postby Sharley » 10. April 2011 08:36

Apache may only parse php code if it knows it is php code by the .php file extension.

So if your php code is contained in a file without the php extension then it will not be parsed for, example, in a file with a .html extension.

Change the file extension that contains php code to .php and see if that helps as Apache will still see the html and then also the php code.

Good luck.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests