开发者

Is it possible to install PHP 5 and MySQL on Apache Tomcat 6.0.32 WITHOUT Apache HTTP Server?

开发者 https://www.devze.com 2023-03-25 08:53 出处:网络
There\'s a webserver which serves dynamic JSP contents, but we would like to serve some PHP contents too.

There's a webserver which serves dynamic JSP contents, but we would like to serve some PHP contents too.

Is it possible to install PHP 5 and MySQL on Apache Tomcat 6.0.32 WITHOUT stopping the service of current contents, uninstalling Tomcat, installing the Apache HTTP Server (via AppSe开发者_开发知识库rv, XAMPP or something similar which installs PHP, MySQL and phpMyAdmin too with just some simple clicks), and after that, configuring the Apache Tomcat Connector?

Currently I don't have the opportunity to configure the mentioned "target" webserver, but I installed Tomcat on my local machine, so with my own webserver I can try doing anything suggested.

I know there are lots of questions related to the topic even on stackoverflow, but none of them answered my question.

Thank you in advance!


You could use Quercus or JSR223 + PHP-bridge to read/parse/run PHP files using Java.

As to MySQL, as being just a simple and standalone DB server, it doesn't require a specific webserver. MySQL totally doesn't care wat webserver you're running. Just install and configure it the usual way.

Oh, please note that the Apache Tomcat Connector requires Apache HTTPD server. So if you don't want to install Apache HTTPD, then the Tomcat Connector is worthless to you.


Tomcat supports CGI so why not install php5-cgi?


I don't know whether it's possible to install Apache Tomcat without HTTPD, but I can answer your question partially:

By default, it's not possible. I don't know why, but package-installers (I used YUM at EC2) require you to install HTTPD too as a dependency of PHP. So if your package-installer requires this too, you need to build PHP from source (which isn't very hard though). Edit: I'm using FastCGI, 'just' PHP might not work, but it would surprise me though. (FastCGI works since, just like MySQL, you can install PHP-FastCGI on a separate server).

MySQL is fully independant. Since you can also install it on a separate server (db-server) without PHP and a HTTP-server, it's possible to install MySQL without HTTPD.

0

精彩评论

暂无评论...
验证码 换一张
取 消