From: <php...@li...> - 2006-11-15 16:51:32
|
Hi Verena, > > /opt/jdk1.6/bin/jrunscript -l php-intractive There are two ScriptEngines available, one is php-interactive and the other one is the "normal" php evaluator, which requires the "<?php" prefix. In any case, the log and error output appears in a file JavaBridge.log in the current directory. One can change this with the -Dphp.java.bridge.default_log_file="" option (empty string means log to stderr). The difference between "php-interactive" and php is that the former starts a Lisp/Scheme style repl, which in turn needs the java_closure() primitive to function properly. -- PHP was not designed for Lisp style evaluation, so "php-interactive" is pretty much experimental at the moment. > Now I got a php-interactive> command prompt. > Now I tried things like > echo "test"; > with and without the ;, with <? or <?php and so on, > but always I got: > php-interactive> echo "2"; > script error: Could not evaluate script You should find the reason in the JavaBridge.log. Most likely the java_closure() syntax is not available. It is exported from both, the pure PHP implementation "java/Java.php" and from the java.so extension. However, jrunscript -l php testfile.php should work as it doesn't need java_closure(). Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |