Anonymous | Login | Signup for a new account | 11-21-2024 21:39 PST |
Main | My View | View Issues | Change Log | Docs |
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>"; engine.eval(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(Env.java:4492) at com.caucho.quercus.env.Env.error(Env.java:4403) at com.caucho.quercus.env.Env.error(Env.java:4081) at com.caucho.quercus.lib.HttpModule.header(HttpModule.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.caucho.quercus.module.StaticFunction.invoke(StaticFunction.java:129) at com.caucho.quercus.env.JavaInvoker.callMethod(JavaInvoker.java:606) at com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:541) at com.caucho.quercus.expr.FunctionExpr.evalImpl(FunctionExpr.java:182) at com.caucho.quercus.expr.FunctionExpr.eval(FunctionExpr.java:126) at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:64) at com.caucho.quercus.program.BlockStatement.execute(BlockStatement.java:105) at com.caucho.quercus.program.QuercusProgram.execute(QuercusProgram.java:272) at com.caucho.quercus.script.QuercusScriptEngine.eval(QuercusScriptEngine.java:113) at com.caucho.quercus.script.QuercusScriptEngine.eval(QuercusScriptEngine.java:152) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247) Could you please help? thanks. |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed. 24 unique queries executed. |