From: <php...@li...> - 2008-04-24 11:27:27
|
I am having a strange problem on certain boxes with the JavaBridge. It works fine on others. The following is logged: --------------------------- Apr 24 11:57:00 VMBridge ERROR: An exception occured: java.net.SocketException: Connection reset java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at php.java.bridge.Parser.read(Parser.java:86) at php.java.bridge.Parser.parse(Parser.java:163) at php.java.bridge.Request.handleRequest(Request.java:377) at php.java.bridge.Request.handleRequests(Request.java:485) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Apr 24 11:57:00 VMBridge DEBUG: contextfactory: context destroyed (remove context factory): ContextFactory: Context# 29@, credentials: [no credentials], SimpleContextFactory: class php.java.bridge.http.SimpleContextFactory, current loader: sun.misc.Launcher$AppClassLoader@11b86e7 Apr 24 11:57:00 VMBridge DEBUG: contextfactory: removed context: ContextFactory: Context# 29@, credentials: [no credentials], SimpleContextFactory: class php.java.bridge.http.SimpleContextFactory, current loader: sun.misc.Launcher$AppClassLoader@11b86e7, # of contexts: 0 Apr 24 11:57:00 VMBridge DEBUG: contextfactory: servlet done waiting for ContextFactory 13480046 for 30000 ms Apr 24 11:57:00 VMBridge DEBUG: end (thread returned to pool): Thread[VMBridgeHttpServerThreadPool#1,5,VMBridgeHttpServerThreadPool#1] Apr 24 11:57:00 VMBridge DEBUG: end (thread returned to pool): Thread[JavaBridgeContextRunner#1,5,JavaBridgeContextRunner#1] --------------------------- The PHP code is pretty simple and straightforward. When the line $batchQuery->addStationData( $stationData ); is activated, the bridge (or PHP) crashes (and the http request from the Browser is killed, so it might be PHP/Apache dying). On other machines (even with older JavaBridge), it works fine. <?php $class_path = null; $class_path .= 'jet-upload-shared.jar;'; $class_path .= 'jet-log-loader-client.jar;'; $class_path .= 'mediatel-utils.jar;'; $class_path .= 'jbossall-client.jar;'; $class_path .= 'jboss-aop-jdk50-client.jar;'; $class_path .= 'jboss-aspect-jdk50-client.jar;'; $class_path .= 'jboss-ejb3-client.jar;'; $class_path .= 'jnp-client.jar;'; $class_path .= 'deml-client.jar;'; $class_path .= 'de-client.jar;'; $class_path .= 'mtier-client.jar;'; $class_path .= 'log4j.jar'; require_once('Java.inc'); java_require( $class_path ); $batchList = new Java( "java.util.ArrayList" ); $indexValue = 1; $station['rajar_wave'] = 141; $station['rajar_wavelength'] = 6; $station['audience_id'] = 1149; $station['rsl'] = 95; $batchQuery = new Java( "uk.mediatel.de.wrappers.BatchQuery", $indexValue, 'impacts', (int)$station['rajar_wave'], (int)$station['rajar_wavelength'], (int)$station['audience_id'] ); // Specify the RSL codes for the stations we are dealing with $stationData = new Java( "uk.mediatel.de.wrappers.StationData", (int)$station['rsl'] ); echo 'indexValue = ' . $indexValue.'<hr>'; echo 'rajar_wavelength = '.(int)$station['rajar_wavelength'].'<hr>'; echo 'rajar_wave = '.(int)$station['rajar_wave'].'<hr>'; echo 'audience_id = '.(int)$station['audience_id'].'<hr>'; echo 'rsl = '.$station['rsl'].'<hr>'; //WHEN THE FOLLOWING LINE IS ACTIVATED, THE BRIDGE OR PHP CRASHES //$batchQuery->addStationData( $stationData ); echo "ok"; exit; ?> Any suggestions are welcome! Cheers, Antonio |
From: <php...@li...> - 2013-11-13 11:27:29
|
Hoping to get some help on why php-cgi started giving me these issues after patching by system for security vulnerabilities in php-cgi. I've been using it for 2+ years to grab an image from uploaded video clips via the ffmpeg_movie php api. It stopped working after I was forced to patch php-cgi because of a compromised server due to CVE-2012-2311 Here is the stack trace in my server logs: php.java.bridge.http.FCGIConnectionException at php.java.bridge.http.FCGIConnectionInputStream.read(FCGIConnectionInputStrea m.java:64) at php.java.bridge.http.FCGIInputStream.doRead(FCGIInputStream.java:65) at php.java.bridge.http.FCGIInputStream.read(FCGIInputStream.java:54) at php.java.bridge.http.HeaderParser.parseBody(HeaderParser.java:76) at php.java.script.servlet.HttpFastCGIProxy.doRun(HttpFastCGIProxy.java:75) at php.java.script.Continuation.run(Continuation.java:100) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at php.java.bridge.http.FCGIConnectionInputStream.read(FCGIConnectionInputStrea m.java:58) ... 6 more Not sure if I have the stomach to open up and fix the source code for this. I was using it for the sole purpose of using the ffmpeg_movie php api, but since now there are better alternatives to this (Xuggler) - I am ready to abandon having my code be comprised of 2 different languages, running on 2 different web platforms. Here are my software version details: $ php-cgi -v PHP 5.3.10-1ubuntu3.8 with Suhosin-Patch (cgi-fcgi) (built: Sep 4 2013 20:01:33) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.3 LTS Release: 12.04 Codename: precise I hope there's an easy fix for this. Thanks for any help in advance. Ted |
From: <php...@li...> - 2008-04-24 12:55:46
|
Hi Antonio, [PHP crashes on some installations] > //WHEN THE FOLLOWING LINE IS ACTIVATED, THE BRIDGE OR PHP CRASHES > //$batchQuery->addStationData( $stationData ); please check if those installations have the PHP 4 compatibility flag set (please see http://sourceforge.net/tracker/index.php?func=detail&aid=1942948&group_id=117793&atid=679233) and switch if off at run time, if necessary. Please check if those installations use a PHP version >= 5.1.4. All earlier PHP 5 versions have a bug in the zend engine (in the object overloading code) which may cause random PHP crashes. Regards, Jost Boekemeier __________________________________________________________ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com |
From: <php...@li...> - 2008-04-24 16:19:31
|
Hi Jost, > [PHP crashes on some installations] > > > //WHEN THE FOLLOWING LINE IS ACTIVATED, THE BRIDGE OR PHP CRASHES > > //$batchQuery->addStationData( $stationData ); > > please check if those installations have the PHP 4 compatibility flag set (please see > http://sourceforge.net/tracker/index.php?func=detail&aid=1942948&group_id=117793&atid=679233) and > switch if off at run time, if necessary. It is off, per php.ini: zend.ze1_compatibility_mode = Off > Please check if those installations use a PHP version >= 5.1.4. All earlier PHP 5 versions have a > bug in the zend engine (in the object overloading code) which may cause random PHP crashes. We're using PHP 5.2.5 with Bridge 5.2.0. But we have found a weird hack/fix for the problem. If we do: $batchQuery->addStationData( $stationData ); it crashes. But when we do: $dummy = $batchQuery->addStationData( $stationData ); unset($dummy); It does not crash. Strange! Antonio |
From: <php...@li...> - 2008-04-24 19:07:21
|
Hi, > require_once('Java.inc'); at java.net.SocketInputStream.read(Unknown Source) at php.java.bridge.Parser.read(Parser.java:86) at php.java.bridge.Parser.parse(Parser.java:163) at php.java.bridge.Request.handleRequest(Request.java:377) at php.java.bridge.Request.handleRequests(Request.java:485) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) the above thread dump is missing the trace from Java.inc. Are you sure that you use the PHP/Java Bridge? -- Or do you still use the java.so developed for PHP4? Can you please remove any "[java]" entry from your php.ini file(s) and try again? Regards, Jost Boekemeier __________________________________________________________ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com |
From: <php...@li...> - 2008-04-24 19:10:41
|
> Can you please remove any "[java]" entry from your php.ini file(s) and try again? I meant: please remove all java entries. :) __________________________________________________________ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com |
From: <php...@li...> - 2008-04-27 20:02:15
|
Hi Jost, > at java.net.SocketInputStream.read(Unknown Source) > at php.java.bridge.Parser.read(Parser.java:86) > at php.java.bridge.Parser.parse(Parser.java:163) > at php.java.bridge.Request.handleRequest(Request.java:377) > at php.java.bridge.Request.handleRequests(Request.java:485) > at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) > at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) > > the above thread dump is missing the trace from Java.inc. Are you sure that you use the PHP/Java > Bridge? -- Or do you still use the java.so developed for PHP4? 100% I am using JavaBridge 5.2.0. Never got the old bridge working with PHP 5.2.5 on Win32. The dump was from the command screen, when I start the JavaBridge using: java -Xmx512m -Dphp.java.bridge.default_log_level=1 -Dphp.java.bridge.base=C:\JavaBridge\ -Djava.ext.dirs=C:\ext -jar C:\JavaBridge\JavaBridge.jar SERVLET_LOCAL:8080 There is no screen output to the browser because the http request dies. > Can you please remove any "[java]" entry from your php.ini file(s) and try again? There are no java entries in my php.ini. What is very strange is that it works fine when I do $dummy = $javaObject->javaMethod(); but not when I do: $javaObject->javaMethod(); I am suspecting it is a PHP bug. Cheers, Antonio > > > > > Regards, > Jost Boekemeier > > > > > > > > > __________________________________________________________ > Gesendet von Yahoo! Mail. > Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2008-04-28 08:01:29
|
Hi Antonio, > 100% I am using JavaBridge 5.2.0. Never got the old bridge working > with PHP 5.2.5 on Win32. > but not when I do: > $javaObject->javaMethod(); can you please set the client debug flag and run the script again? Please add the following to the top of your script: define ("JAVA_DEBUG", 1); require_once ("java/Java.inc"); This might give the PHP developers additional information: If you have access to the console, you might also run the script using the PHP cli component as follows: strace -ff -s 1024 php yourScriptCrashingPhp.php 2>error.log Regards, Jost Boekemeier __________________________________________________________ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de.overview.mail.yahoo.com |