Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure PHP with my Tomcat

Tags:

php

apache

tomcat

I have installed tomcat succesfully but if I want to use some php code. So where should I put this php code in my tomcat directory and how I can configure php with tomcat. Any suggestions or link will be appreciated..

like image 375
arsenal Avatar asked Jun 28 '11 00:06

arsenal


2 Answers

PHP/Java bridge as mentioned in the other answer is one option. The other would be to use the PHP runtime built in Java called Quercus

like image 95
datasage Avatar answered Oct 08 '22 09:10

datasage


Tomcat is a Java Servlet Container first - it wasn't built to run PHP natively. There are however adapters, which allow you to run PHP on Tomcat, e.g.

  • http://php-java-bridge.sourceforge.net/doc/tomcat6.php

If you only need to run PHP, you might be better off using a LAMP like setup.

like image 31
miku Avatar answered Oct 08 '22 08:10

miku