|
From: <php...@li...> - 2008-09-08 20:30:26
|
Hi, On Mon, Sep 8, 2008 at 11:53 AM, <php...@li...> wrote: > Do you get a valid JSR223 script engine manager from the factory? > > Do you receive a javax.script.ScriptEngine? And is the script engine > indeed the php.java.bridge.PhpScriptEngine or is it some other > implementation? I'm not sure how to check these things. I added a toString() call on the script engine and got the following: "php.java.script.PhpServletScriptEngine@2b7bd9". Based on what I see there, I'm guessing that the correct implementation is being used. > Can you please start log4j (e.g. with: "java -jar log4j.jar" -- > please use the log4j contained in the bridge binary download) and > restart tomcat with the log level set to 4 (e.g. with: > JAVA_OPTS="-Dphp.java.bridge.default_log_level=4" sh catalina.sh > run) and check the log? Okay, I got logging working. The first thing I saw was an exception: "java.io.IOException: Permission denied". The stack trace is fairly lengthy, so I've attached it as a separate file (exception.txt). I think I'm getting this exception because the PHP/Java Bridge is attempting to create a temp file in my web directory, but the Tomcat user does not have write access to that directory. I remember seeing a system call to attempt to create a file in this directory when I was using strace to try and track down this problem yesterday. For now, I have made my web directory writable by tomcat (using chmod 777). When I ran the JSP again, I no longer see the exception in my log, but I still am not getting any output from PHP. This is the only other log entry I see related to the PHP/Java Bridge: Time: 8:18:05 PM Priority: DEBUG Thread: http-8180-Processor23 NDC: null Category: php.java.bridge.JavaBridge Location: null Message: created new bridge: php.java.bridge.JavaBridge@d0005e Throwable: null -- Jeff Weston PGP public key available from http://pgp.mit.edu/ PGP Key ID: 0x14B456ED |