简体   繁体   中英

How to install PHP on a UNIX machine that has Apache Tomcat installed

just looking for some insight and guidance on how I can install PHP on this apache-tomcat web server. So basically I have a Unix box which has 3.14.8-bone5 GNU/Linux and an apache-tomcat-7.0.42 webserver running on it, as far as I know tomcat is used to serve JSP and doesn't use PHP.

From my initial research, it looks like there is a java library that allows tomcat to use PHP? http://php-java-bridge.sourceforge.net/doc/tomcat6.php I tried following this tutorial but I am having troubles:

  1. I downloaded the JavaBridgeTemplate713.war file and placed into the apache-tomcat-7.0.42/webapps directory.
  2. Tried this URL in a web browser http://169.254.1.1/JavaBridgeTemplate713/index.php but the page says "Could not run PHP"

      exception php.java.fastcgi.FCGIProcessException: Could not run PHP root cause java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v] php.java.fastcgi.FCGIProcess.start(FCGIProcess.java:398) php.java.fastcgi.SocketFactory.doBind(SocketFactory.java:140) php.java.fastcgi.FCGIFactory.runFcgi(FCGIFactory.java:146) php.java.fastcgi.FCGIFactory$1.run(FCGIFactory.java:169) 

Can anyone tell me how I can get the PHP-CGI installed on this Unix box?

Thanks in advance!

Your best bet to run PHP on top of Tomcat is probably to download and install the Quercus WAR file. Quercus is a Java-based implementation of PHP 5, and it can be found at http://quercus.caucho.com/ .

(hat tip to @brian-showalter)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM