This may be answered, but I'm having a hard time finding it, or maybe I misunderstand what I've found.
I have a Java process running on a Resin server, that used to call PHP scripts through a shell out.
I want to move this to Quercus so that we can manage our database connections via JNDI, and hopefully get away from some of the awkward shell calls.
We pass in command line arguments to these PHP files, and I'm not sure how I can accomplish the same task through Quercus.
Here's a SSCE
QuercusEngine engine = new QuercusEngine();
engine.setOutputStream(System.out);
engine.executeFile("src/test.php"); //Normally it'd be test.php 1234 compute
The shell example would be
php -f test.php 1234 compute
//test.php
$orderNumber = $argv[1]; //1234
$process = $argv[2]; //compute
I think my answer lies in the QuercusScriptEngine, and/or QuercusContext but I'm struggling to put it all together.
This is the documentation I'm going by:
http://javadoc4.caucho.com/overview-summary.html
Thank you