Created
March 15, 2012 12:43
-
-
Save xenji/2044016 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quercus q; | |
QuercusEngine qce = new QuercusEngine(); | |
qce.getQuercus().init(); | |
FilePath executableFile = new FilePath(cmdLine[7].replace("\"", "")); | |
// Set the ini path | |
qce.getQuercus().setIniFile(new FilePath(cmdLine[3])); | |
ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); | |
WriteStream ws = new WriteStream(StdoutStream.create()); | |
qce.getQuercus().setPwd(new FilePath("/")); | |
QuercusPage p = new PageManager(qce.getQuercus()).parse(executableFile); | |
qce.getQuercus().start(); | |
Env env = qce.getQuercus().createEnv(p, ws, null, null); | |
qce.getQuercus().startEnv(env); | |
env.start(); | |
env.execute(); | |
notifyOutputListener("Received " + byteOutput.size()); | |
notifyOutputListener(new String(byteOutput.toByteArray())); | |
env.close(); | |
ws.flush(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Verstehe... ich habe es erstmal über jar versucht.
java -classpath .:lib/resin.jar:lib/quercus.jar com.caucho.quercus.CliQuercus -d include_path="/usr/share/php:." /usr/bin/phploc /home/dejan/dev/PriceBuilder/src/PriceBuilder/CoreBundle
Dabei ist mir aufgefallen das $_SERVER["argv"] NULL ist! Mal davon abgesehen das ich noch eine PHP Exception von der ezComponent ConsoleTools erhalte.