From: <php...@li...> - 2007-04-30 17:44:41
|
Hi there -- Yes, I read and understand the function below and changed my script in an attempt to utilize the JavaClass option as a test, but received the same exception as a few days ago, which was that update() didn't exist: function java($clazz) { static $cache; if(isset($cache)) return $cache; return $cache=3Dnew JavaClass($clazz); } $algorithm =3D java("java.security.MessageDigest"); $algorithm->getInstance("md5"); $algorithm->reset(); $algorithm->update($password->getBytes());=20 In other various tests it would toss a "reset() doesn't exist" exception, etc etc.=20 But rather than this as an issue, I think it's looking more like a problem with my Bridge install. I've removed the java.so from /etc/php.d/java.ini and now I'm receiving the error that sent me in many different directions to get this to work :) "PHP 5.0.4 too old. For PHP versions < 5.1.4 install the java.so or php_java.dll from the php-java-bridge-legacy download. Or set the path to the PHP executable, see php_exec in the WEB-INF/web.xml" I have set the path to my php executable in /usr/java/tomcat-5.5/webapps/JavaBridge/WEB-INF/web.xml as follows: <!-- Your php binary. Default is /usr/bin/php-cgi or --> <!-- c:/php/php-cgi.exe --> <!-- <init-param> <param-name>php_exec</param-name> <param-value>/usr/bin/php</param-value> </init-param> --> I also tried /usr/bin/php-cgi as suggested in the file, though when I read "php binary" I think of /usr/bin/php, not php-cgi. Please correct me if I'm wrong. Both binaries exist and both paths toss the same error. When I run 'which php' I get '/usr/bin/php' I cannot upgrade the php install. >> When I try to run this on the command line:=20 >> java -jar JavaBridge.war --help > In which documentation have you found the above > command? The .war file is a web archive, not an > executable jar file. We could change that in the > future, though. Sorry, was a typo on my part on the command line, though using .jar affects the same response. The command doesn't even get far enough to toss an error relative to the file type. > The java.so contains code which could make the > communication faster. But it is quite difficult to > handle, especially for beginners. And a beginner with Java I am, indeed. =20 Thanks for your help! K |