Skip to content

Instantly share code, notes, and snippets.

@xenji
Created March 15, 2012 12:43
Show Gist options
  • Save xenji/2044016 to your computer and use it in GitHub Desktop.
Save xenji/2044016 to your computer and use it in GitHub Desktop.
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();
@dspasic
Copy link

dspasic commented Mar 15, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment