Sk8erPeter
Sk8erPeter

Reputation: 6997

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

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 AppServ, 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!

Upvotes: 0

Views: 4842

Answers (3)

cutsoy
cutsoy

Reputation: 10251

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.

Upvotes: 1

vstm
vstm

Reputation: 12537

Tomcat supports CGI so why not install php5-cgi?

Upvotes: 1

BalusC
BalusC

Reputation: 1109172

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.

Upvotes: 2

Related Questions