You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jost B. <jos...@ya...> - 2005-11-05 12:46:04
|
Hi, a number of people have asked how to invoke php scripts from a java servlet or from a java application. Instead of answering these questions individually I have created a demo. The ~4MB linux tar file can be downloaded at -> php-java-bridge.sf.net/php-java-bridge-3.0-demo.tar It contains: * JavaBridge.jar version 3.0 * java.so version 3.0, intel/linux 386 binary * php version 5.0.5, intel/linux 386 binary * php-script.jar (new since version 3.0) * HelloWorld1.java: Allocates a script from the build-in CGI pool using a local FileReader, calls the local (CGI-) php continuation and invokes php script methods. * HelloWorld2.java: Allocates the script from an external HTTP pool using a URLReader, calls the remote php continuation and invokes php methods. For older java versions (<1.6) it also contains: * script-api.jar ((C) by Sanka Samaranayake, distributed under the Apache license) Extract the php-java-bridge-3.0-demo.tar in /tmp, for example with the command: cd /tmp tar xvf php-java-bridge-3.0-demo.tar And run the sample, for example with: sh runHello.sh To run the second demo, move the HelloWorld.php to your web server, make sure that the PHP/Java Bridge is installed on this web server and check that its php.ini contains _only_ the following entry: [java] # enable the http tunnel java.servlet=On After activating the new .ini (re-start the web-server), you can run the second example, which is similar to the first one except that it uses a URLReader to allocate and to call out to a php instance running on a remote http server. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Guillaume D. <gui...@po...> - 2005-11-04 09:57:06
|
Hello, we're having problems passing a string array to a constructor. We construct the array in PHP as follows : $Array = new JavaClass("java.lang.reflect.Array"); $String = new JavaClass("java.lang.String"); $entries = $Array->newInstance($String, 2); $entries[0] = 'hello'; $entries[1] = 'world'; and we call the constructor as follows : try { $req = new javaClass('MyApp'); $req->ProcessFunction($Array); } catch(JavaException $ex) { print "$ex"; } The error message we get is: [o(Exception):"java.lang.Exception: Invoke failed: [c:MyApp]->ProcessFunction2(([Ljava.lang.String;)c:java.lang.reflect.Array). Cause: java.lang.IllegalArgumentException: argument type mismatch"] The constructor expects a String[] parameter. Any clues on how to create a Java String[] from PHP? I can create Integer, Date, Vector or String objects but arrays ... I tried: $String = new JavaClass("java.lang.String[]"); // silly but hey, that's what debugging is all about :) Any help would be much appreciated. Thanks in advance!! --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.733 / Virus Database: 487 - Release Date: 02/08/2004 |
From: Kevin K. <zi...@gm...> - 2005-11-03 19:11:45
|
I'm attempting to set up the php-java-bridge in the "load balancing and failover" approach. What access does Apache need to have to the .php files in my project? Should I expect the following to work unchanged? *install warfile *access http://myhost/JavaBridge/numberguess.php Or do I need to grant apache access to that directory, and map JavaBridge/**.php to the webcontent/JavaBridge directory? -Kevin |
From: Jost B. <jos...@ya...> - 2005-11-01 17:45:01
|
Hi Kevin, > I've configured the mod_jk differently I think we can ignore mod_jk for this discussion, because it is not essential for the PHP/Java Bridge. -- Unless you forward everything to tomcat, which would render Apache, PHP and PHP/Java Bridge useless. > Regardless of that, I'm confused about the request > method. The > request is a Get request, as defined by the browser > makeing the > request. Where and why would it be translated to a > Put? It's an internal operation of the bridge. Essentially you have two pools, the HTTP/PHP pool (usually at :80) and the Tomcat (JavaThread) pool (usually at tcp port :8080). For each php instance request with java code in it, the bridge allocates an instance from each pool. The instances communicate using a cps style (they pass each other's continuation). To make this work, the two pools must be accessible to the bridge, of course. "Accessible" means that they must listen on TCP ports. (The bridge also supports unix domain sockets for the local backend, but this requires that you inject a JNI library called "natcJavaBridge.so" into the java VM). > First: I don't want to run apache on port 80, > surely this port isn't hardcoded anywhere? No, of course not. > Second: What do you mean that "java cannot drop > privileges"? Privilege dropping means that one part of the server runs with suid rights while other parts run with lower privileges. POSIX requires that, when a thread changes its uid, all other threads change their id, too. After that tomcat cannot accept connections on the privileged port 80 anymore. > quite possible to configure Tomcat to answer > requests on port 80, If one wants to expose /etc/passwd and /etc/shadow to everyone on the internet, yes... > Apache is running on port 8080, though, and it leads > me to the problem I'm having. So the apache pool listens on 8080 (I thought that's the tomcat pool). On which TCP port does tomcat listen? Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Kevin K. <zi...@gm...> - 2005-10-31 20:30:15
|
I've configured the mod_jk differently, Apache is the "first handler" for all requests, passing requests in servlet mappings to Tomcat via the AJP connector. Tomcat no longer even runs an HTTP Connector.=20 This appears to be the preferred way to configure mod_jk with Apache2. Regardless of that, I'm confused about the request method. The request is a Get request, as defined by the browser makeing the request. Where and why would it be translated to a Put? I'm also confused about this: "For a production system, however, it is assumed that all requests go through the standard http port and that a native http server listens on this port. -- The reason is that java cannot drop privileges, so it is not possible to connect a java servlet engine to port 80." First: I don't want to run apache on port 80, surely this port isn't hardcoded anywhere? Second: What do you mean that "java cannot drop privileges"? It's quite possible to configure Tomcat to answer requests on port 80, although that's not what I want to do personally. I can't just use the default port--there's nothing running there.=20 Apache is running on port 8080, though, and it leads me to the problem I'm having. What component "should" be changing Get requests from the browser into Put requests for the server? Why is the servlet using CGI for Get? Get is just the method, and is a valid request type for these requests according to the HTTP spec. -Kevin On 10/29/05, Jost Boekemeier <jos...@ya...> wrote: > Hi Kevin, > > > The servlet seems to be calling php on the > > commandline (CGI) instead > > of through Apache. > > CGI is only used when the controller servlet > (PhpJavaServlet) receives a get or post request. > > Usually apache listens on the http standard port :80 > and php instances are allocated from the apache pool. > The php instances in turn connect to the :8080 backend > using put requests. mod_jk becomes obsolete if one > doesn't have .jsp files anymore. > > [request to port 80:] > > and I can see the > > test.php file if I use Apache directly. It > > indicates that Java is > > enabled. > > Okay. > > [development setup] > > I've installed the JavaBridge war (opened it in > > Eclipse, actually), > > and added my php-cgi.exe and associated .dll files > > to the WEB-INF/cgi > > directory. I updated the web.xml to indicate that > > the file is called > > php-cgi.exe > > Okay. > > > [request to :8080] > > My requests to .php files seem to be serviced by the > > PhpJavaServlet, I > > can place debugging breakpoints there. The > > requests, being GET > > requests are serviced by the doGet method. > > The doGet invokes the cgi machinery, yes. It is there > to help during development, where it is difficult to > work with two servers. > > For a production system, however, it is assumed that > all requests go through the standard http port and > that a native http server listens on this port. -- The > reason is that java cannot drop privileges, so it is > not possible to connect a java servlet engine to port > 80. > > > > Is there some configuration I need in my web.xml > > file to tell the > > Servlet how to connect back through the Apache > > service? > > Just use > > http://localhost/JavaBridge/test.php > > instead of > > http://localhost:8080/JavaBridge/test.php > > > Regards, > Jost Boekemeier > > > > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmeld= en: http://mail.yahoo.de > |
From: Jost B. <jos...@ya...> - 2005-10-30 11:30:53
|
Hi again, > > Is there some configuration I need in my web.xml > > file to tell the > > Servlet how to connect back through the Apache > > service? I just noticed that you may want to include the php script, i.e. call out to php from a standard java class or servlet. I think you know about the req.redirect(...), which would redirect the request to the apache port. However, I am currently working on full jsr223 integration: The implementation allocates a php instance from the apache pool by opening a URLconnection passing it the current java continuation (a thread). The allocated php instance in turn connects back to the java continuation passing it the proxy allocated with java_closure(). The allocated script is stored in the javax.script.ScriptEngine when the user calls scriptEngine.eval(<phpScript>). He/she can call out to the php script by using the methods from javax.script.Invocable. I likely have misunderstood your question and the previous answer was sufficient. :) If not, a preview of PHP/Java Bridge version 3.0 will be available next week. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-10-29 12:31:37
|
Hi, > Isn't it possible for Java application to provide > execution > environment and call PHP interpretator for script > processing? Yes. This feature will be available with PHP/Java Bridge 3.0 which will be published in december. The version 2.0.8 already supports everything necessary to fully implement jsr 223 except that some methods are currently private. But if you make the Context class and the getContext() method public, you can already call php scripts from java: * "include" the php instance from the apache pool and pass it the current java continuation * the php instance closes over its environment (see java_closure) and passes it to the passed java continuation * in your java continuation you can call into the closure as often as you want. * when the java continuation (e.g. the service method) terminates all allocated php continuations terminate, too. Regarding the compilation on windows, Steven has posted an excellent article on the list, please see http://sourceforge.net/tracker/index.php?func=detail&aid=1322743&group_id=117793&atid=679233 Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-10-29 12:08:17
|
Hi Kevin, > The servlet seems to be calling php on the > commandline (CGI) instead > of through Apache. CGI is only used when the controller servlet (PhpJavaServlet) receives a get or post request. Usually apache listens on the http standard port :80 and php instances are allocated from the apache pool. The php instances in turn connect to the :8080 backend using put requests. mod_jk becomes obsolete if one doesn't have .jsp files anymore. [request to port 80:] > and I can see the > test.php file if I use Apache directly. It > indicates that Java is > enabled. Okay. [development setup] > I've installed the JavaBridge war (opened it in > Eclipse, actually), > and added my php-cgi.exe and associated .dll files > to the WEB-INF/cgi > directory. I updated the web.xml to indicate that > the file is called > php-cgi.exe Okay. [request to :8080] > My requests to .php files seem to be serviced by the > PhpJavaServlet, I > can place debugging breakpoints there. The > requests, being GET > requests are serviced by the doGet method. The doGet invokes the cgi machinery, yes. It is there to help during development, where it is difficult to work with two servers. For a production system, however, it is assumed that all requests go through the standard http port and that a native http server listens on this port. -- The reason is that java cannot drop privileges, so it is not possible to connect a java servlet engine to port 80. > Is there some configuration I need in my web.xml > file to tell the > Servlet how to connect back through the Apache > service? Just use http://localhost/JavaBridge/test.php instead of http://localhost:8080/JavaBridge/test.php Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: techtonik <tec...@tu...> - 2005-10-29 09:44:00
|
||*()*|| [\..konnichi wa, ogenki desu ka, Jost../] >> I've tried to compile PHP myself from CVS, but failed. JB> Which errors specifically? Something about PCRE, but the problem was in CVS version of PHP4. I downloaded 4.4.0 sources and compiled them successfully, but failed to build bridge. According to INSTALL "Compiling a CGI binary on Windows" > 1. Install the source code of PHP 4.3.x or higher. > > 2. Install RedHat's Cygwin (PHP needs autoconf). > > 3. Delete the java sub-directory from php-4.3.x\ext. Copy the > php-java-bridge directory to the php-x.y.z\ext directory and > rename it to java. Update the "m4_include" paths in > php-x.y.z\ext\java\config.m4 so that they start with "ext/java/": > > m4_include(ext/java/tests.m4/function_checks.m4) > m4_include(ext/java/tests.m4/java_check_broken_stdio_buffering.m4) > ... > m4_include(ext/java/tests.m4/java_check_broken_gcc_installation.m4) > > 4. Invoke autoconf to register our java module within the PHP build > tree: > > buildconf.bat --force > BTW, there is not .bat, but "./buildconf --force" launches ok. > Instead of running "buildconf" you can also use autoconf directly: > > autoconf Also tried this way. > Then configure and compile php as usual: > > .\configure --with-java=%JAVA_HOME% After some time this stops with error. ---cut--- ... checking for Ingres II support... no checking for InterBase support... no checking for IRCG support... no ./configure: line 45991: syntax error near unexpected token `ext/java/tests.m4/function_checks.m4' ./configure: line 45991: `m4_include(ext/java/tests.m4/function_checks.m4)' UIUST@uiust /cygdrive/d/DeveloperSpace/InProjects/php-src/php-src $ ---cut--- Whole java-bridge 2.0.8 src directory content is located at ext/java and function_checks.m4 exists. $ ls -gGa ext/java/tests.m4/ total 28 drwxr-xr-x 2 0 Oct 24 10:46 . drwxr-xr-x 11 0 Oct 24 10:44 .. -rw-r--r-- 1 753 Sep 19 19:52 function_checks.m4 -rw-r--r-- 1 1712 Sep 19 19:52 java_check_abstract_namespace.m4 -rw-r--r-- 1 775 Sep 19 19:52 java_check_broken_gcc_installation.m4 -rw-r--r-- 1 2131 Sep 19 19:52 java_check_broken_stdio_buffering.m4 -rw-r--r-- 1 2286 Sep 19 19:52 java_check_struct_ucred.m4 -rw-r--r-- 1 4747 Sep 19 19:52 threads.m4 > make >> I want to try mix of Java and PHP in >> standalone application. JB> I didn't think this is possible. PHP is missing JB> features which are essential for desktop applications. JB> For example it doesn't have threads; it relies on the JB> web server to provide an "execution environment". Isn't it possible for Java application to provide execution environment and call PHP interpretator for script processing? JB> There are other environments which support the PHP JB> programming language for example a php -> CIL compiler JB> exists for the MONO project. No, thanks, I'd like to find a way how can I use PHP scripting capabilities from Java. =) JB> Okay. I think it is possible to split the zip file JB> into a "documentation" zip and a zip file which JB> contains the php_java.dll, the php.ini and a short JB> readme. Would be nice, but I've already bogged down in compilation. >> README is very long and contains a lot of information. >> Read 25k just to find command line options (especially if >> there are not any) is a waste of time. I thought it should >> be good for an application to react on help/unknown cmd >> parameters to be user-friendly. JB> Sorry, the parameters are documented in the JB> INSTALL.WINDOWS document only. The README is indeed a JB> little bit unix centric; unix users usually start the JB> bridge via the php-java-bridge.service script or via JB> the php-java-bridge command. Well, I just thought it would be nice for javabridge to spill usage info if garbage was passed in command line parameters. This also help to detect errors in launching scripts configuration. WBR.techtonik -- (B)uilding, (A)ntenna, (S)pan and (E)arth * terminal velocity - 54m/s, 305m * |
From: Kevin K. <zi...@gm...> - 2005-10-29 07:08:17
|
The servlet seems to be calling php on the commandline (CGI) instead of through Apache. That also seems to be failing, as requests return the file but no php processing. I'm running under Apache2 with both php and the mod_jk connector installed. My java applications function correctly, and I can see the test.php file if I use Apache directly. It indicates that Java is enabled. I've installed the JavaBridge war (opened it in Eclipse, actually), and added my php-cgi.exe and associated .dll files to the WEB-INF/cgi directory. I updated the web.xml to indicate that the file is called php-cgi.exe My requests to .php files seem to be serviced by the PhpJavaServlet, I can place debugging breakpoints there. The requests, being GET requests are serviced by the doGet method. However, I notice that the javadoc for this method believes that it will only be called in a CGI context. It then ultimately does the System.exec(..) CGI approach. I have this information in my php.ini, though it isn't clear to me how the PhpJavaServlet would know how to find it: [java] java.hosts=3D"127.0.0.1:8080" java.servlet=3D"/JavaBridge/PhpJavaServlet" Is there some configuration I need in my web.xml file to tell the Servlet how to connect back through the Apache service? I tried removing the *.php filter, but that didn't seem to change anything -- still got the file back with no processing. -Kevin |
From: Jost B. <jos...@ya...> - 2005-10-28 17:51:05
|
Hi, [apache craches when running the test.php from the php/java bridge with the following settings: > extension=php_java.dll > [java] > java.class.path = C:\apachefriends\xampp\php\php_java.jar > java.home = C:\Programme\Java\jre1.5.0_02 > java.library = C:\Programme\Java\jre1.5.0_02\bin\client\jvm.dll I could reproduce this problem with XAMPP. But as I said, this has nothing to do with the PHP/Java Bridge. XAMPP contains the predecessor of the PHP/Java Bridge, "ext/java", which has been removed from the official PHP5 distribution a long time ago. Please install the PHP/Java Bridge *instead*, which means that you must take out the ext/java patch which your distributor applied to your PHP5 binary. Please use an official version of PHP 5 instead, for example the download from php.net: http://www.php.net/get/php-5.0.5.tar.bz2/from/a/mirror Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-10-28 17:06:07
|
Hi, > BUT when using PJB in PHP environment, i have no > idea where i should put the WEB-INF folder, Isn't it possible to deploy the backend (the JavaBridge.war) into tomcat or some other j2ee environment? In this setup the httpd handles the php requests and the bridge connects to tomcat (to the "j2ee backend") as necessary, please see the sessionSharing.jsp and sessionSharing.php examples in the j2ee download. > it will be fine while running in J2EE environment >(such as Weblogic), > coz URLs were transformed and run as java classes at > server-side > automatically. > BUT when using PJB in PHP environment, i have > no idea where i should > put the WEB-INF folder, > and how httpd transformed/handle the URLs, and > run the java classes, if web.xml works. The "PHP environment", as you call it, isn't much different than the environment you're familiar with. The PHP/Java Bridge adds a "middle tier" so that php scripts don't have to connect to databases directly anymore. Whether you run the standalone backend (the JavaBridge.jar) or the j2ee backend (JavaBridge.war) doesn't matter: since 2.0.8 the j2ee backend is (nearly) as fast as the standalone backend. When java.servlet=On is set and a client sends a request for a php page with java code in it, the php java bridge internally connects to a controller servlet (default: "/JavaBridge/PhpJavaServlet"), asks for the page and then lets the http/php instance render the content. The standalone backend works simliar except that the standard j2ee services are not available. Binding actions to php/jsp scripts or servlets via a standard web.xml file is just right, ihmo. I don't have plans to add similar functionality to the standalone backend. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: AFeng <da...@21...> - 2005-10-28 14:29:38
|
Hi, recently i have to rewrite the login part of the project, which was build in JSP/Java originally, into PHP/Java. login.html =========== <form method=post action="/gdca/SingleClient_Auth1"> <input type=text name=username> <input type=submit> </form> note that "/gdca/SingleClient_Auth1" is _equal_ to "WEB-INF/classes/gdca/SingleClient_Auth1.class", set in WEB-INF/web.xml with: <servlet> <servlet-name>SingleClient_Auth1</servlet-name> <servlet-class>gdca.SingleClient_Auth1</servlet-class> </servlet> it will be fine while running in J2EE environment (such as Weblogic), coz URLs were transformed and run as java classes at server-side automatically. BUT when using PJB in PHP environment, i have no idea where i should put the WEB-INF folder, and how httpd transformed/handle the URLs, and run the java classes, if web.xml works. Anyone have ideas? Thanks! best regards Zhang |
From: Nicolas G. <nic...@gm...> - 2005-10-28 00:02:35
|
I think I installed PHP-java-bridge... If i'm wrong, please tell me. I follow all the step in the INSTALLATION.WINDOWS File and it used to work On 10/27/05, Jost Boekemeier <jos...@ya...> wrote: > > Hi Nicolas, > > > When I run the test.php Apache crush > [...] > > (installed with XAMPP) > [...] > > extension =3D php_java.dll > > java.class.path =3D [...]\php_java.jar > > java.home =3D [...]\jdk1.5.0_03 > > java.library =3D [...]\jvm.dll > > if I read this correctly the installed ext/java bridge > crashes. > > Isn't it possible to install the PHP/Java Bridge > instead? > > > Regards, > Jost Boekemeier > > > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier > anmelden: http://mail.yahoo.de > |
From: Jost B. <jos...@ya...> - 2005-10-27 16:32:36
|
Hi Nicolas, > When I run the test.php Apache crush [...] > (installed with XAMPP) [...] > extension = php_java.dll > java.class.path = [...]\php_java.jar > java.home = [...]\jdk1.5.0_03 > java.library = [...]\jvm.dll if I read this correctly the installed ext/java bridge crashes. Isn't it possible to install the PHP/Java Bridge instead? Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Nicolas G. <nic...@gm...> - 2005-10-27 11:58:08
|
I'm sending it again coz I think didn't make it the first time ---------- Forwarded message ---------- From: Nicolas Granelli <nic...@gm...> Date: Oct 27, 2005 2:27 AM Subject: Installation Problem To: php-java-bridge <php...@li...> I've installed PJB 2.0.8 and it used to work fine, but not now. I supose I do something that breaks the installation, so I check every step= , but i can't find what's is brong. The Problem: When I run the test.php Apache crush, and I can't get anything in the log (is in level 4) I'm on a Windows XP, with Apache 2 and PHP 5 (installed with XAMPP) This is what I have (only the lines that are relationated with this): PHP.INI: extension_dir =3D c:\apachefriends\xampp\php\ext\ extension =3D php_java.dll java.log_level=3D4 java.socketname=3D9267 ;java.hosts=3D"127.0.0.1:8080 <http://127.0.0.1:8080>" ;java.servlet=3DOn java.class.path =3D C:\apachefriends\xampp\php\php_java.jar java.home =3D C:\Archivos de programa\Java\jdk1.5.0_03 java.library =3D C:\Archivos de programa\Java\jdk1.5.0_03\jre\bin\client\jvm.dll In C:\apachefriends\xampp\php\ext I have: JavaBridge.jar JavaBridge.log JavaBridge.war php_java.dll php_java.jar I'm no sure if JavaBridge.jar must be in the php directory, or in the php\ext directory, so I've one in each. I start the jar with the contextual menu. The only thing that gets to log is: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at php.java.bridge.TCPServerSocket.newServerSocket(TCPServerSocket.java:40) at php.java.bridge.TCPServerSocket.<init>(TCPServerSocket.java:59) at php.java.bridge.TCPServerSocket.create(TCPServerSocket.java:31) at php.java.bridge.JavaBridge.bind(JavaBridge.java:314) at php.java.bridge.JavaBridge.init(JavaBridge.java:372) at php.java.bridge.JavaBridge.main(JavaBridge.java:427) but this happen when I start 2 times the jar I hope anybody can enlightme :) Thanks |
From: Nicolas G. <nic...@gm...> - 2005-10-27 05:27:48
|
I've installed PJB 2.0.8 and it used to work fine, but not now. I supose I do something that breaks the installation, so I check every step= , but i can't find what's is brong. The Problem: When I run the test.php Apache crush, and I can't get anything in the log (is in level 4) I'm on a Windows XP, with Apache 2 and PHP 5 (installed with XAMPP) This is what I have (only the lines that are relationated with this): PHP.INI: extension_dir =3D c:\apachefriends\xampp\php\ext\ extension =3D php_java.dll java.log_level=3D4 java.socketname=3D9267 ;java.hosts=3D"127.0.0.1:8080 <http://127.0.0.1:8080>" ;java.servlet=3DOn java.class.path =3D C:\apachefriends\xampp\php\php_java.jar java.home =3D C:\Archivos de programa\Java\jdk1.5.0_03 java.library =3D C:\Archivos de programa\Java\jdk1.5.0_03\jre\bin\client\jvm.dll In C:\apachefriends\xampp\php\ext I have: JavaBridge.jar JavaBridge.log JavaBridge.war php_java.dll php_java.jar I'm no sure if JavaBridge.jar must be in the php directory, or in the php\ext directory, so I've one in each. I start the jar with the contextual menu. The only thing that gets to log is: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at php.java.bridge.TCPServerSocket.newServerSocket(TCPServerSocket.java:40) at php.java.bridge.TCPServerSocket.<init>(TCPServerSocket.java:59) at php.java.bridge.TCPServerSocket.create(TCPServerSocket.java:31) at php.java.bridge.JavaBridge.bind(JavaBridge.java:314) at php.java.bridge.JavaBridge.init(JavaBridge.java:372) at php.java.bridge.JavaBridge.main(JavaBridge.java:427) but this happen when I start 2 times the jar I hope anybody can enlightme :) Thanks |
From: Mikael G. <mi...@oe...> - 2005-10-24 19:50:01
|
Jost Boekemeier wrote: >java_require("myClasses.jar;jpos-p.x.y.jar"); > >solve the problem? > > Yes it solved the problem! Sometimes it's so hard to see obvious things....sigh... Thanks a million for pointing this out. The bridge is really a cool tool. Regards /Mikael |
From: Jost B. <jos...@ya...> - 2005-10-21 16:57:10
|
Hi Mikael, > Actually I do require jpos for my classes - in > ServerRemote the import import != java_require. the import is only syntactic shugar for the java compiler. The NoClassDefFoundError means that you have used import at compile-time but you have failed to add the classes at run-time. > The server side also requires jpos ISOMsg java_require("jpos.jar") doesn't magically make the classes within jpos available to your own classes. It makes them available to the PHP/Java Bridge, but not to the classes within myClasses.jar. The noClassDefFound2.php test checks this pattern, please see http://cvs.sourceforge.net/viewcvs.py/php-java-bridge/php-java-bridge/tests.php4/noClassDefFound1.php?rev=1.2&view=markup The pattern java_reset(); java_require("foo.jar"); java_require("my.jar"); must fail because foo is not available to my, but java_reset(); java_require("foo.jar;my.jar"); must succeed. > Nope, sorry made no difference Can you please set java.log_level=4, re-start the bridge, run the test and attach the log to a ticket? Please see http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233 Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Mikael G. <mi...@oe...> - 2005-10-21 08:05:52
|
Hello Jost. Thanks for quick reply. The bridge is really good stuff, hopefully I can get i working for this app as well... Jost Boekemeier wrote: >Hi Mikael, > > > >>java_require("$here/jpos-1.4.6.jar"); >>java_require("$here/myClasses.jar"); >> >> >[...] > > >>The myServerRemote java looks like: >>sendTransaction(ISOMsg msg) >> >> >[...] > > >>The rmi call passes an ISOMsg object that is part of >>the jpos-1.4.6.jar >> >> >[...] > > >>Unresolved external reference: >> >> >java.lang.NoClassDefFoundError: org/jpos/iso/ISOMsg >[...] happens when the lookup method in the php-file >is run > >as I understand the above problem ISOMsg is not >available to your classes because you haven't required >it (you have required it for the bridge, but not for >your classes). > >This behaviour is intentional, please see the >tests.php4/NoClassDefFound tests. For example the >server part could easily require a different version >of jpos or it could only require the stub classes. > >Isn't it possible to require jpos for your classes, >too? > > Actually I do require jpos for my classes - in ServerRemote the import where hidden by eclipse - they actually look like: package se.certitrade; import java.rmi.Remote; import java.rmi.RemoteException; import org.jpos.iso.ISOMsg; public interface ServerRemote extends Remote { . . Sorry about that. The server side also requires jpos ISOMsg and all other used jpos classes (all from the same version of jpos). >Does > ># reset the classloader once >echo '<?php java_reset(); ?>' |/usr/bin/php > ><?php >[...] >java_require("jpos-1.4.6.jar"); >java_require("myClasses.jar;jpos-p.x.y.jar"); >[...] >?> > >solve the problem? > > Nope, sorry made no difference, maybe something I've missed or don't understand here?........... Regards /Mikael |
From: Jost B. <jos...@ya...> - 2005-10-20 17:20:52
|
Hi Mikael, > java_require("$here/jpos-1.4.6.jar"); > java_require("$here/myClasses.jar"); [...] > The myServerRemote java looks like: > sendTransaction(ISOMsg msg) [...] > The rmi call passes an ISOMsg object that is part of > the jpos-1.4.6.jar [...] > Unresolved external reference: java.lang.NoClassDefFoundError: org/jpos/iso/ISOMsg [...] happens when the lookup method in the php-file is run as I understand the above problem ISOMsg is not available to your classes because you haven't required it (you have required it for the bridge, but not for your classes). This behaviour is intentional, please see the tests.php4/NoClassDefFound tests. For example the server part could easily require a different version of jpos or it could only require the stub classes. Isn't it possible to require jpos for your classes, too? Does # reset the classloader once echo '<?php java_reset(); ?>' |/usr/bin/php <?php [...] java_require("jpos-1.4.6.jar"); java_require("myClasses.jar;jpos-p.x.y.jar"); [...] ?> solve the problem? If so, this means that the PHP/Java Bridge documentation is broken. I think I need a hint how to reformulate the sentence "all interconnected classes must be loaded by the same classloader". Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Mikael G. <mi...@oe...> - 2005-10-20 14:23:23
|
Hi! Having problem when using rmi with php-java-bridge-2.0.8. Trying the following php code: <?php /* * Load Java Bridge */ if (!extension_loaded('java')) { if (!(PHP_SHLIB_SUFFIX=="so" && dl('java.so'))&&!(PHP_SHLIB_SUFFIX=="dll" && dl('php_java.dll'))) { echo "java extension not installed."; exit(2); } } $here=getcwd(); java_require("$here/jpos-1.4.6.jar"); java_require("$here/myClasses.jar"); // Get an ISOMsg handle and do something with it $ISOMsg = new java("org.jpos.iso.ISOMsg"); $ISOMsg->setMTI ("0260"); $lookup = new java_class("java.rmi.Naming"); $cekrm = new java("se.certitrade.myServerRemote"); $cekrm = $lookup->lookup("//www.somedomain.net/myServer"); ?> The rmi call passes an ISOMsg object that is part of the jpos-1.4.6.jar package. The myServerRemote java looks like: package se.certitrade; import java.rmi.Remote; public interface myServerRemote extends Remote { ISOMsg sendTransaction(ISOMsg msg) throws RemoteException; } When I try to run the php file I get: java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: org/jpos/iso/ISOMsg. -- Unable to call the method because it or one of its parameters refer to the mentioned external class which is not available in the current "java_require(<path>)" url path. Remember that all interconnected classes must be loaded with a single java_require() call and that a class must not appear in more than one java_require() call. Please check the Java Bridge log file for details. at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1150) at php.java.bridge.Request.handleRequest(Request.java:204) at php.java.bridge.Request.handleRequests(Request.java:221) at php.java.bridge.JavaBridge.run(JavaBridge.java:233) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:20) Caused by: java.lang.NoClassDefFoundError: org/jpos/iso/ISOMsg . . This happens when the lookup method in the php-file is run. ISOMsg is (obviously) already instanciated and available. How do I get around this? Best regards /Mikael |
From: Guillaume D. <gui...@po...> - 2005-10-17 15:42:48
|
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.733 / Virus Database: 487 - Release Date: 02/08/2004 |
From: Simon A. <si...@ti...> - 2005-10-14 20:28:18
|
Does anyone know of a web hosting service that supports the PHP-Java Bridge? |
From: Irfan M. <irf...@gm...> - 2005-10-13 17:10:50
|
Thanks a lot. This was really helpful. On 10/13/05, Jost Boekemeier <jos...@ya...> wrote: > Hi Mohammed, > > > knows where the jvm > > gets initialized and started so that i can set some > > env variables that > > when the RunJavaBridge executable exists in the php > extension dir it will be called instead of java, > please see the "java command" from phpinfo() for > details. > > On RedHat Fedora the following could be used: > > # rename RunJavaBridge > mv /usr/lib/php/modules/RunJavaBridge \ > /usr/lib/php/modules/RunJavaBridge.bin > > # create a custom RunJavaBridge script > cat >/usr/lib/php/modules/RunJavaBridge <<\EOF1 > #!/bin/sh > # This is a custom script which calls the JVM > # with additional arguments. > > $java=3D$1; shift > $args=3D"$@"; > $myArgs=3D"-Dphp.java.bridge.threads=3D30"; > > exec /usr/lib/php/modules/RunJavaBridge.bin \ > $java \ > $myArgs \ > $args > EOF1 > > # make our script executable. > chmod +x /usr/lib/php/modules/RunJavaBridge > > (The above example calls the saved RunJavaBridge.bin > because it still carries the javabridge_t security > context. If you don't have Security Enhanced Linux or > if you have tagged your RunJavaBridge script with > javabridge_t, you can remove the old RunJavaBridge.bin > and call java directly.) > > Regards, > Jost Boekemeier > > > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmeld= en: http://mail.yahoo.de > |