Running a PHP webapp from Java

269 views Asked by At

I'm interested in running a PHP web application using Quercus in a way similar to:

java -classpath ... com.example.LaunchPHP {php folder}

All the documentation I could find on Quercus was related to running from Resin, but this is something I want as simple as possible, for running from a CI build.

What possibilities are there?

2

There are 2 answers

0
Jeremy Stein On

Digging through the QuercusServlet source, it appears that you would need to call Quercus.parse to get a QuercusPage on which you could call execute. I suspect there's some more setup you'd have to do first (like initializing php.ini values), but I think reading through the QuercusServlet source should send you in the right direction.

1
Jeremy Stein On

Would it be easier to open a URLConnection and hit the PHP page through the web server?