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: <php...@li...> - 2010-06-10 15:03:13
|
Hey guys, I'm very new to Tomcat and PHP development, however, I'm currently working on a Java Web App. It however requires a Contact/Feedback Form, and so I'm looking into using PHP to provide the backend work for the form. Anyways, I followed all the steps. (the only thing that I questioned was putting the + sign or not..but Im pretty sure you aren't supposed to). So I added the lines to web.xml and moved the three jar files JavaBridge, php-servlet and php-script over to "tomcat/lib" Then I created a new script called test.php and put it in "tomcat/webapps/ROOT/" however, everytime I call the script through my HTML Form via 'action="test.php"' the browser waits forever to load it and nothing happens. As well, if I try going directly "http://localhost:8100/test.php" I get a Http 404 Not found. All in all it seems as though my php form isn't being properly recognized. Any solutions? Sincerely, Sravan Suryadevara University of Illinois | Urbana-Champaign B.S Computer Science | Class of 2013 E-mail | sur...@il... Phone | (908) 432-5330 |
From: <php...@li...> - 2010-06-11 10:11:09
|
Hi Sravan, thank you very much for this bug report. This is a regression. We have added security checks to JavaProxy.php, see NEWS file and http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/buildJavaProxy.php?view=markup Since version 6.x the java/JavaProxy.php cannot read your .php file anymore. Please change the php_include_java option to "Off" - <init-param><param-name>php_include_java</param-name><param-value>On</param-value></init-param> + <init-param><param-name>php_include_java</param-name><param-value>Off</param-value></init-param> and include Java.inc in each of your PHP scripts. I will fix this in the CVS head and change the install instructions. Thanks again for reporting this issue. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-06-11 10:27:02
|
The "hanging" is a separate issue. Since version 6 we use chunked connections everywhere. HTTP/1.1 Transfer-Encoding: chunked requires 0\r\n as a shutdown sequence. If PHP crashes early, both, the front-end and the back-end side will wait for each other's 0\r\n to appear. Similar to this bug already fixed in the standalone component. 2010-05-23 <jostb@intern> * server/php/java/bridge/http/ChunkedInputStream.java (read): PR#3005379: Return the buffer contents before reading from the network, in order to avoid deadlock. Thanks to Oliver Billmann. * server/php/java/bridge/http/ChunkedInputStream.java (eof): New method * server/php/java/bridge/http/ChunkedOutputStream.java (eof): New method * server/php/java/bridge/JavaBridgeRunner.java (doPut): do not read/write 0\r\n chunk after an exception (e.g.: OutOfMemoryError or RequestAbortException) occured I think the new 6.x versions still aren't ready for prime time ... :( On 6/11/10, Jost Boekemeier <jos...@go...> wrote: > Hi Sravan, > > thank you very much for this bug report. This is a regression. We have > added security checks to JavaProxy.php, see NEWS file and > http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/buildJavaProxy.php?view=markup > > Since version 6.x the java/JavaProxy.php cannot read your .php file > anymore. > > Please change the php_include_java option to "Off" > > - > <init-param><param-name>php_include_java</param-name><param-value>On</param-value></init-param> > + > <init-param><param-name>php_include_java</param-name><param-value>Off</param-value></init-param> > > and include Java.inc in each of your PHP scripts. I will fix this in > the CVS head and change the install instructions. > > Thanks again for reporting this issue. > > > Regards, > Jost Bökemeier > |
From: <php...@li...> - 2010-06-11 11:55:31
|
It actually doesn't hang anymore, it just takes a few seconds and gives me an error page with this: java.io.IOException: No suitable php fastcgi sapi found. Install PHP as either "/usr/bin/php-cgi" or "c:/Program Files/PHP/php-cgi.exe" or "/home/Sravan/Desktop/tomcat/webapps/ROOT/WEB-INF/cgi/php-cgi-i386-linux". See also "php_exec" in your WEB-INF/web.xml. Reason follows: php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:1002) php.java.servlet.fastcgi.FastCGIServlet.doPost(FastCGIServlet.java:1028) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I'm guessing I have to install PHP? I thought the php-servlet.jar took care of all of that? If not, how do I install? Sincerely, Sravan Suryadevara University of Illinois | Urbana-Champaign B.S Computer Science | Class of 2013 E-mail | sur...@il... Phone | (908) 432-5330 On Fri, Jun 11, 2010 at 3:56 PM, <php...@li...> wrote: > The "hanging" is a separate issue. Since version 6 we use chunked > connections everywhere. HTTP/1.1 Transfer-Encoding: chunked requires > 0\r\n as a shutdown sequence. If PHP crashes early, both, the > front-end and the back-end side will wait for each other's 0\r\n to > appear. Similar to this bug already fixed in the standalone component. > > 2010-05-23 <jostb@intern> > > * server/php/java/bridge/http/ChunkedInputStream.java > (read): PR#3005379: Return the buffer contents before reading from > the network, in order to avoid deadlock. > Thanks to Oliver Billmann. > > * server/php/java/bridge/http/ChunkedInputStream.java > (eof): New method > > * server/php/java/bridge/http/ChunkedOutputStream.java > (eof): New method > > * server/php/java/bridge/JavaBridgeRunner.java > (doPut): do not read/write 0\r\n chunk after an exception (e.g.: > OutOfMemoryError or RequestAbortException) occured > > > I think the new 6.x versions still aren't ready for prime time ... :( > > > > > On 6/11/10, Jost Boekemeier <jos...@go...> wrote: >> Hi Sravan, >> >> thank you very much for this bug report. This is a regression. We have >> added security checks to JavaProxy.php, see NEWS file and >> http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/buildJavaProxy.php?view=markup >> >> Since version 6.x the java/JavaProxy.php cannot read your .php file >> anymore. >> >> Please change the php_include_java option to "Off" >> >> - >> <init-param><param-name>php_include_java</param-name><param-value>On</param-value></init-param> >> + >> <init-param><param-name>php_include_java</param-name><param-value>Off</param-value></init-param> >> >> and include Java.inc in each of your PHP scripts. I will fix this in >> the CVS head and change the install instructions. >> >> Thanks again for reporting this issue. >> >> >> Regards, >> Jost Bökemeier >> > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-06-11 12:07:26
|
> It actually doesn't hang anymore, it just takes a few seconds and > gives me an error page with this Aha. Well, but I will take a look at this anyway. :) > java.io.IOException: No suitable php fastcgi sapi found. Install PHP > as either "/usr/bin/php-cgi" or "c:/Program Files/PHP/php-cgi.exe" or > "/home/Sravan/Desktop/tomcat/webapps/ROOT/WEB-INF/cgi/php-cgi-i386-linux". > See also "php_exec" in your WEB-INF/web.xml. > I'm guessing I have to install PHP? I thought the php-servlet.jar took > care of all of that? You can copy php-cgi binaries into your web application, yes. But since you have installed PHP for *all* of your web applications, you must install a system php binary, yes. > If not, how do I install? Simply download PHP and copy it to c:\Program Files\PHP\ (Windows) or type yum install php (Linux) Regards, Jost Bökemeier > > Sincerely, > Sravan Suryadevara > University of Illinois | Urbana-Champaign > B.S Computer Science | Class of 2013 > E-mail | sur...@il... > Phone | (908) 432-5330 > > > > On Fri, Jun 11, 2010 at 3:56 PM, > <php...@li...> wrote: >> The "hanging" is a separate issue. Since version 6 we use chunked >> connections everywhere. HTTP/1.1 Transfer-Encoding: chunked requires >> 0\r\n as a shutdown sequence. If PHP crashes early, both, the >> front-end and the back-end side will wait for each other's 0\r\n to >> appear. Similar to this bug already fixed in the standalone component. >> >> 2010-05-23 <jostb@intern> >> >> * server/php/java/bridge/http/ChunkedInputStream.java >> (read): PR#3005379: Return the buffer contents before reading from >> the network, in order to avoid deadlock. >> Thanks to Oliver Billmann. >> >> * server/php/java/bridge/http/ChunkedInputStream.java >> (eof): New method >> >> * server/php/java/bridge/http/ChunkedOutputStream.java >> (eof): New method >> >> * server/php/java/bridge/JavaBridgeRunner.java >> (doPut): do not read/write 0\r\n chunk after an exception (e.g.: >> OutOfMemoryError or RequestAbortException) occured >> >> >> I think the new 6.x versions still aren't ready for prime time ... :( >> >> >> >> >> On 6/11/10, Jost Boekemeier <jos...@go...> wrote: >>> Hi Sravan, >>> >>> thank you very much for this bug report. This is a regression. We have >>> added security checks to JavaProxy.php, see NEWS file and >>> http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/buildJavaProxy.php?view=markup >>> >>> Since version 6.x the java/JavaProxy.php cannot read your .php file >>> anymore. >>> >>> Please change the php_include_java option to "Off" >>> >>> - >>> <init-param><param-name>php_include_java</param-name><param-value>On</param-value></init-param> >>> + >>> <init-param><param-name>php_include_java</param-name><param-value>Off</param-value></init-param> >>> >>> and include Java.inc in each of your PHP scripts. I will fix this in >>> the CVS head and change the install instructions. >>> >>> Thanks again for reporting this issue. >>> >>> >>> Regards, >>> Jost Bökemeier >>> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-06-13 11:51:50
|
>> It actually doesn't hang anymore, it just takes a few seconds and >> gives me an error page with this > > Aha. Well, but I will take a look at this anyway. :) Fixed in CVS head. I forgot to remove the old code which used to delegate to a JavaBridge context. > You can copy php-cgi binaries into your web application, yes. But > since you have installed PHP[/Java Bridge] for *all* of your web applications, you > must install a system php binary [...] In previous versions it was possible to install a "system" php-cgi binary into a "JavaBridge" web context. But this "feature" wasn't documented. It is no longer supported as of PHP/Java Bridge version 6. Regards, Jost Bökemeier |
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: 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-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-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 |