1

Integrating PHP java bridge, facing some issue while restarting Apache server as showing error:

The procedure entry point php set error handling could not be located in dynamic link library C:\xampp\php\ext\php_java.dll

I made the changes outlined below in my php.ini file and copied JavaBridge.jar and php_java.dll in C:\xampp\php\ext.

extension=php_java.dll

[java]
java.java_home = "C:\Program Files\Java\jdk1.8.0_131\bin"
java.java = "C:\Program Files\Java\jdk1.8.0_131\bin\javaw.exe"
java.class.path = "C:\xampp\php\ext\JavaBridge.jar"
java.library.path = "C:\xampp\php\ext"
java.log_level =2
3
  • Do your PHP and java extension versions match? php-java-bridge.sourceforge.net/doc/installation.php says Do not search for a PHP extension, java.so or php_java.dll. These extensions are obsolete. so I would say they don't :-) Commented Apr 28, 2017 at 1:16
  • @Capsule it doesn't work. I have x86 bit xampp and I uninstalled 64 bit java and installed x86. but it shows same error. Commented Apr 28, 2017 at 7:46
  • Well, next time I won't even bother providing a link... Commented Apr 29, 2017 at 12:27

1 Answer 1

0

Specific to your question:

First of all, the javabridge communication is not handled anymore by a php extension (I mean the php_java.dll or java.so).

So you simply don't need it, you can completly remove the "extension=php_java.dll" as this has been replaced by a pure php implementation known as the Java.inc client (or alternatively the soluble-japha client).

I believe you use a very old documentation... So don't spend too much time in this direction because you'll probably won't have support.

But if you want to work with the javabridge, just remember you'll have to install both:

  • a Java server that will expose the Java virtual machine on a network port (standalone or deployed on Tomcat)
  • a PHP client library on the PHP side that will establish communication with the server (Java.inc or soluble-japha)

I suggest you to read the docs on the official php-java-bridge website to get some insights about installation (or alternatively some docs for the unofficial soluble-japha project, they work pretty much the same way).

And first ensure, the php-java-bridge server is sucessfully running. The php-java-bridge files can be downloaded either:

  • Option 1: The war file (tomcat only) is here
  • Option 2: Individual files for cli/standalone server are here

Once it works, try to connect from PHP.

You'll probably face a lot of problems at first run, but from there it will be easier to answer your questions.

Good luck

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you . Java Bridge connection established but facing problems like some security .jar files are missing in tomcat. How to connect tomcat with external java as that .jar files are present there.
Oups haven't seen the comment. Hope you get through the problem. But better to create a separate issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.