Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003529 [Quercus] minor always 05-22-09 08:07 05-22-09 08:07
Reporter krovid View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.2.1
Summary 0003529: Using the QuercusScriptEngine on command line throws a fatal error.
Description I was trying to run a PHP script from command line using the QuercusScriptEngine as follows:

QuercusScriptEngineFactory factory = new QuercusScriptEngineFactory();
ScriptEngine engine = factory.getScriptEngine();
String paramValue = "";
engine.put("param_name", paramValue);
String script = "<some php script>";

I get the following error:
Exception in thread "main" com.caucho.quercus.QuercusErrorException: eval::3: Fatal Error: header requires a http context [header]
    at com.caucho.quercus.env.Env.error(
    at com.caucho.quercus.env.Env.error(
    at com.caucho.quercus.env.Env.error(
    at com.caucho.quercus.lib.HttpModule.header(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.caucho.quercus.module.StaticFunction.invoke(
    at com.caucho.quercus.env.JavaInvoker.callMethod(
    at com.caucho.quercus.expr.FunctionExpr.evalImpl(
    at com.caucho.quercus.expr.FunctionExpr.eval(
    at com.caucho.quercus.program.ExprStatement.execute(
    at com.caucho.quercus.program.BlockStatement.execute(
    at com.caucho.quercus.program.QuercusProgram.execute(
    at com.caucho.quercus.script.QuercusScriptEngine.eval(
    at com.caucho.quercus.script.QuercusScriptEngine.eval(
    at javax.script.AbstractScriptEngine.eval(

Could you please help?

Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
05-22-09 08:07 krovid New Issue

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker