From: <php...@li...> - 2007-07-13 23:44:44
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I've got troubles getting the bridge running over a local unix socket connection. I've installed the Debian package php-java-bridge_4.0.8a on my Ubunto PC and configured the module in many ways already - including autom. startup of a bridge-jvm with apache and also the standalone using the JavaBridge.jar. My question: * where do I set the classpath? When running the JavaBridge.jar? Or in the java.ini, or in both? * how can I enable local socket-only connections? Thanks! - -------------- Using the standalone JavaBridge.jar started with: java -Dphp.java.bridge.threads=10 - -Dphp.java.bridge.base=/usr/lib/php5/20060613+lfs/ - -Djava.classpath=[my-classpath] -jar JavaBridge.jar LOCAL:/tmp/php_java_sock 3 /var/log/php-java-bridge.log and my java.ini: extension = java.so [java] java.hosts = 127.0.0.1:9267 ;;does not work without this actually unused setting! - I only want to use the local socket! java.socketname = /tmp/php_java_sock the bridge doesn't use the socket. I also have troubles with the classpath. I tried to add the classpath in the java.ini with "java.classpath" and I tried to use -Djava.class.path instead of -Djava.classpath... when running the jvm. If I specify the classpath in the ini, phpinfo() shows it, but nevertheless I'm getting: java.lang.ClassNotFoundException: Could not find net.immofirst.maut.realestates.RealEstatesTest in java_require() path - I'm sure that the standalone JavaBridge.jar also requires the CP but has troubles getting it... Thanks. I would appreciate if you could help. Additionally I would interested in your setup concerning performance. I think sockets should be many times faster. How does persistent connections work? The initialisation is very slow - I measured ~300ms/request, 95% goes into connection init - the first java object instantiation is slow, a 2nd one is much faster... Cheers, Andy - -- - ---------------------------------------------------------------------- Dipl.-Ing.(FH) Andreas Langegger Institute for Applied Knowledge Processing Johannes Kepler University Linz A-4040 Linz, Altenberger Straße 69 > http://www.faw.at > http://www.langegger.at -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGmA5iKk9SuaNc5+IRAtboAJ4k35F0gMKyyMERZMIS5Aa64kEUugCg2DL1 m6TlYizpyhYStOzA0yCHLtE= =DlIT -----END PGP SIGNATURE----- |
From: <php...@li...> - 2007-07-14 16:31:31
|
Hi, > I've got troubles getting the bridge running over a > local unix socket this was default until version 4.1.8. In version 4.1.8 we have temporarily switched it off, since 4.1.8 is only a thin wrapper around the pure PHP PHP/Java Bridge implementation "Java.inc". > php-java-bridge_4.0.8a on > my Ubunto PC and configured the module in many ways Do you have the libnatcJavaBridge.so? This is the library which implements unix domain socket communication. It depends on whether your Java supports JNI and whether or not your JVM can (and is allowed to) load a native library. If not, the bridge reverts to local TCP sockets or named pipes. IMHO unix domain socket communication is obsolete on modern operating systems. The only exception is FreeBSD, due to a bug in FreeBSD's local TCP socket implementation (Nagle's algorithm switched on per default and PHP doesn't have a way to switch it off). Regards, Jost Boekemeier __________________________________ Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever |
From: <php...@li...> - 2007-07-16 08:10:28
|
Hi, thanks for the support. Will there be debian packages for the new 4.1.* versions also and is there support for 64-bit OS? I tried it on a Dual-Opteron with Ubuntu 64-bit and get this error when starting apache/php module: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/java.so' - /usr/lib/php5/20060613/java.so: wrong ELF class: ELFCLASS32 in Unknown on line 0 Thanks & best regards, Andy php...@li... wrote: > Hi, > > >> I've got troubles getting the bridge running over a >> local unix socket > > this was default until version 4.1.8. In version 4.1.8 > we have temporarily switched it off, since 4.1.8 is > only a thin wrapper around the pure PHP PHP/Java > Bridge implementation "Java.inc". > > >> php-java-bridge_4.0.8a on >> my Ubunto PC and configured the module in many ways > > Do you have the libnatcJavaBridge.so? This is the > library which implements unix domain socket > communication. It depends on whether your Java > supports JNI and whether or not your JVM can (and is > allowed to) load a native library. > > If not, the bridge reverts to local TCP sockets or > named pipes. > > IMHO unix domain socket communication is obsolete on > modern operating systems. The only exception is > FreeBSD, due to a bug in FreeBSD's local TCP socket > implementation (Nagle's algorithm switched on per > default and PHP doesn't have a way to switch it off). > > > Regards, > Jost Boekemeier > > > > __________________________________ Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users -- ---------------------------------------------------------------------- Dipl.-Ing.(FH) Andreas Langegger Institute for Applied Knowledge Processing Johannes Kepler University Linz A-4040 Linz, Altenberger Straße 69 > http://www.faw.at > http://www.langegger.at |
From: <php...@li...> - 2007-07-16 15:29:43
|
Hi, > PHP Warning: PHP Startup: Unable to load dynamic library > '/usr/lib/php5/20060613/java.so' - /usr/lib/php5/20060613/java.so: wrong > ELF class: ELFCLASS32 in Unknown on line 0 I'd prefer to remove the C code entirely. The PHP code is currently between 2 to 50 times slower than the old C code. But this will change with 4.2.0, which adds a client-side cache to Java.inc. With this cache the PHP code suddenly becomes 1.2 to 2 times faster than the C code. Regards, Jost Boekemeier __________________________________ Wissenswertes zum Thema PC, Zubehör oder Programme. BE A BETTER INTERNET-GURU! www.yahoo.de/clever |