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: <php...@li...> - 2010-02-05 09:23:31
|
FWIW, and for anyone else it might help, I'm trying a CURL approach instead: $fp = fopen($temp_file_name, "w"); // Configuration of curl $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $host . $file); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_BUFFERSIZE, 8192); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FILE, $fp); curl_exec($ch); $curl_info = curl_getinfo($ch); // Tests for success later curl_close($ch); fclose($fp); if (is_resource($fp)) { fclose($fp); // CURL bug } Look out for the need to double-close the file resource - bugfix went in Sept 2009 but isn't in PHP 5.2.10 which isn't *that* old. If there is any known conflict with PGP-CGI or JavaBridge, could you let me know? It might save many hours of pain and misery with testing... Cheers, Mark... |
From: <php...@li...> - 2010-02-05 07:42:08
|
I did see your recent email, but the 'Websockets' references threw me. So it should be added in the next release, and I'll just need to add the 'Transfer-Encoding: Chunked' header. Cool - I'll watch the mailing lists for news on the next release. Cheers, and many thanks for the quick reply. Mark... |
From: <php...@li...> - 2010-02-05 07:01:38
|
Hi Mark, On Fri, 2010-02-05 at 13:17 +0700, php...@li... wrote: > while(!feof($fs)) { > $contents = fgets($fs, 4096); // Chunk download HTTP/1.1 chunked encoding is not supported by the CGI spec. CGI expects the CONTENT_LENGTH header. If it is missing, php-cgi will wait forever until it is destroyed. The FastCGI SAPI does support it; and all php-cgi binaries > 5.2.0 are compiled with --enable-fastcgi per default. I will add a new method to the PHPFastCGIServlet in version 5.5.6, which will allow clients to establish a two-way connection with the php script using either "Connection: Upgrade" (WebSockets) or Transfer-Encoding: Chunked (semi-standard HTTP tunnel). Please see my previous mail for details. Regards, Jost Boekemeier |
From: <php...@li...> - 2010-02-05 06:24:18
|
Hi, I'm doing a fairly simple streaming download, looping for a number of different files, and I'm getting sporadic, unrepeatable severe errors in PhpCGIServlet. The code will successfully download some files, or parts of some files, but will sometimes cause a crash. It might download 850MB without a hiccup, or fail partway through a file at 20MB. If I rerun the code, it might download the file it previously failed on, or I might need to run it two or three times to get it to work, then it might download all other files with no problems. The code has been tested using the most up-to-date JavaBridge, php-script and php-servlet jar files and the error still occurs. The PHP has been tested in Apache webserver and there is no evidence of the error there. Tomcat is running on a VMWare instance with PHP-CGI, and Apache is running on the host machine with the Apache PHP server module. Any advice would be welcome. Using: PHP 5.2.10 Tomcat 6.0.20 Apache 2.2.10 Cheers, Mark... Extract of error log: INFO: PHP Warning: unlink(sync.lck) [<a href='function.unlink'>function.unlink</a>]: Permission denied in C:\player.php on line 15 Feb 5, 2010 12:53:19 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() Feb 5, 2010 12:53:19 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() Feb 5, 2010 12:53:19 PM org.apache.catalina.core.ApplicationContext log SEVERE: Servlet PhpCGIServlet threw unload() exception javax.servlet.ServletException: Servlet.destroy() for servlet PhpCGIServlet threw exception at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1413) at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1739) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4563) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1248) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1219) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:316) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:584) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:633) at org.apache.catalina.startup.Catalina.start(Catalina.java:608) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.NullPointerException at php.java.bridge.Util$Process.getOutputStream(Util.java:1071) at php.java.servlet.fastcgi.ChannelFactory.destroy(ChannelFactory.java:149) at php.java.servlet.fastcgi.FastCGIServlet.destroy(FastCGIServlet.java:296) at php.java.servlet.PhpCGIServlet.destroy(PhpCGIServlet.java:195) at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1394) ... 20 more The code extract is here. The error is occuring in the '// Chunk download' loop: $fs = fsockopen($host, 80, $errno, $errstr, 30); if (!$fs) { $this->writeDebugInfo("FAILED: ", $errstr . '(' . $errno . ')'); } else { $out = "GET $file HTTP/1.0\r\n"; $out .= "Host: $host\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fs, $out); $fm = fopen ($temp_file_name, "w"); stream_set_timeout($fs, 30); while(!feof($fs) && ($debug = fgets($fs)) != "\r\n" ); // ignore headers while(!feof($fs)) { $contents = fgets($fs, 4096); // Chunk download fwrite($fm, $contents); } fclose($fm); $info = stream_get_meta_data($fs); fclose($fs); if ($info['timed_out']) { // Delete temp file if fails unlink($temp_file_name); $this->writeDebugInfo("FAILED: Connection timed out: ", $temp_file_name); $this->writeDebugInfo("stream info: ", $info); } else { // Move temp file if succeeds $media_file_name = str_replace('temp/', 'media/', $temp_file_name); rename($temp_file_name, $media_file_name); $this->writeDebugInfo("SUCCESS: ", $media_file_name); $this->writeDebugInfo("stream info: ", $info); } } |
From: <php...@li...> - 2010-02-04 04:54:08
|
Hi, On Wed, 2010-02-03 at 20:37 -0500, php...@li... wrote: > But, where the heck do I put a custom java class You can craete a custom Java library from it, copy it into your zip archive and re-deploy it. Please see the documentation at java.sun.com for details how to create .war and .jar files. Furthermore there's a user-contributed video on our web site which shows how to create a custom .war file. Regards, Jost Boekemeier |
From: <php...@li...> - 2010-02-04 02:36:50
|
Hello, glad to have found this list. I'm trying to use this piece of tech to solve a problem at work, and am having some difficulties. I know my way around PHP and Java as a developer, not a server admin so much, so please be patient; On a mac, I'm running Tomcat 6, and MAMP, running PHP 5. On the installation instructions for the pjb, it says that if you deploy the war in tomcat and see the php-cgi (etc.) not found message, that you should take the JavaBridge directory, and drop it into your web server root. I do this, and everything works fine. I can call the index.php page that shows the examples, and they all run. However, when I try to use a custom class, like "TestHello.class", no matter where I put it, I can't get it to work. I tail the php errors log, and it says that Java is reporting the class can't be found. I've tried putting the class one of the indicated classpaths of the machine, the directory where I find the other java classes used in the examples, etc., but no dice. One other thing, the java.inc file can't be imported by URL, as that's generally shut off in PHP5; I tried to import it in a helloworld.php page, and it thew an error, however, importing it by relative path ( ../../JavaBridge/java/java.inc ) seems to work fine (since there's no error and the java ( ) function seems to be found. So, my question; according to installation instructions and lack of errors, and successfully executing php example pages, it seems I'm set up right. But, where the heck do I put a custom java class, simple (not a bean, this is just TestHello.class, default package, so it's a top-level namespace, no com.this.that) so that I can call it? The examples that come with the pjb don't seem to make this clear at all. Any help appreciated. I'm optimistic about this technology, but need a helping push here. Thanks, Tim. |
From: <php...@li...> - 2010-01-31 21:34:18
|
PHP/Java Bridge version 5.5.5 contains a beta version of a web based PHP debugger called "PHPDebugger.php". At the moment it uses Ajax calls to connect the JavaScript GUI with the PHPDebugger running on the web server. These standard Ajax calls are slow, difficult to program and consume an enormous amount of CPU time, even if the application is idle. We need is a two-way communication channel to connect the JavaScript GUI with the PHPDebugger script on the web server. Google Chrome 4 supports "WebSockets", which allow JavaScript to communicate with a HTTP script instance without any additional overhead. I will add "WebSockets" support to both, the PHP script engine and the PHP/Java Bridge version 5.5.6. Apache/PHP already supports two-way communications using HTTP/1.1 chunked connections. Example: <?php $in = fopen("php//input"); while(!feof($in)) { $data = fread($in, 8192); echo $data; if (ob_get_level()) ob_flush(); flush(); } ?> Only the response headers must be changed according to the WebSocket spec (Connection: Upgrade instead of Transfer-Encoding: chunked, etc.). The JavaBridge/PhpFastCGIServlet currently does not support HTTP/1.1 chunked connections. But changing the PhpFastCGIServlet.java should be easy. All we need is a second parseBody() method, to be called when the Connection: Upgrade request header exists. I will implement it for PHP/Java Bridge 5.5.6. References: WebSocket protocol: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-70 PhpFastCGIServlet: http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/php/java/servlet/fastcgi/FastCGIServlet.java?view=markup Regards, Jost Boekemeier |
From: <php...@li...> - 2010-01-25 20:01:48
|
Hi, You are right about the while loop. Here, the java_values function saved me > again. It's probable that it is not the right way to solve it, so I will > follow your advices. > java_values(...) is the right way. The java_is_null(), java_is_true() and java_is_false() tests exist because I thought they're easier to read than an expression like "if (java_values($jobject) === true) ... ". Regards, Jost Boekemeier |
From: <php...@li...> - 2010-01-22 15:17:18
|
Thank you very much Jost, I solved the problem just last night and you were right. I could catch the two Runtime Exceptions before the execSelect() call using the java_values() function. The problem was in the arguments format I was using. You are right about the while loop. Here, the java_values function saved me again. It's probable that it is not the right way to solve it, so I will follow your advices. Either way I just starting and I think PHP / Java Bridge is a magnificent tool. I hope not to bother too often. Thanks again. > Date: Fri, 22 Jan 2010 11:59:09 +0100 > To: php...@li... > From: php...@li... > Subject: Re: [Php-java-bridge-users] Help > > BTW: Which PHP version and which OS do you use? While testing the above code > against the latest PHP 5.3.1, it appears that PHP 5.3.1 on Windows discards > all error messages(!). > > Please use a stable PHP version instead (PHP 5.2.x). > > > > Is there (with PHP/Java Bridge) any special thing I have to consider when > > I work with Java interfaces rather than classes?. > > Your code is correct. Except for $rs->hasNext(), which returns a Boolean > object. Your loop > > while($rs->hasNext()) > > never returns. Use an explicit boolean cast: > > while((boolean)(string)$rs->hasNext()); > > or > > while(java_is_true($rs->hasNext()); > > I think the reason why your query fails is that ModelD2RQ cannot parse an > UTF-8 file. But that's a d2rq issue, I think. > > > *Warning*: Unchecked exception detected: > [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared > java.lang.RuntimeException detected. java.lang.Exception: CreateInstance > failed: new de.fuberlin.wiwiss.d2rq.ModelD2RQ((o:String)[o:String]). Cause: > de.fuberlin.wiwiss.d2rq.D2RQException: d2rq:uriPattern > 'C:\wamp\www/mapping-iswc.n3#organizations/@@organizations.OrgID@@' contains > characters not allowed in URIs (E50) VM: 1.6.0_16@http://java.sun.com/" at: > #-22 de.fuberlin.wiwiss.d2rq.map.ResourceMap.buildValu[...]esult(false) #2 > C:\wamp\www\java\Java.inc(220): java_Client->getWrappedResult(false) #3 > C:\wamp\www\java\Java.inc(320): java_Client->getInternalResult() #4 > C:\wamp\www\java\Java.inc(1157): > java_Client->createObject('de.fuberlin.wiw...', Array) #5 > C:\wamp\www\java\Java.inc(44) : eval()'d code(1): Java->Java(Array) #6 > C:\wamp\www\index.php(15): > de\fuberlin\wiwiss\d2rq\ModelD2RQ->__construct('C:\wamp\www/map...') #7 > C:\wamp\www\index.php(26): PruebaSPARQL::test() #8 {main}] in * > C:\wamp\www\java\Java.inc* on line *121* > > *Warning*: Unchecked exception detected: > [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared > java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: > [[c:QueryExecutionFactory]]->create((o:Query)[o:Query], > (i:QuerySolution)[o:Response$UndeclaredThrowableErrorMarker]). Cause: > java.lang.IllegalArgumentException: argument type mismatch VM: 1.6.0_16@ > http://java.sun.com/" at: #-9 > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 > sun.reflect.NativeMethodAccessorImpl.invoke(Un[...]\Java.inc(977): > java_Client->invokeMethod(4, 'create', Array) #5 > C:\wamp\www\java\Java.inc(44) : eval()'d code(1): > java_invoke(Object(JavaClass), 'create', Array) #6 [internal function]: > com\hp\hpl\jena\query\QueryExecutionFactory::__callStatic('create', Array) > #7 C:\wamp\www\index.php(18): > com\hp\hpl\jena\query\QueryExecutionFactory::create(Object(java_InternalJava), > Object(de\fuberlin\wiwiss\d2rq\ModelD2RQ)) #8 C:\wamp\www\index.php(26): > PruebaSPARQL::test() #9 {main}] in *C:\wamp\www\java\Java.inc* on line *121* > exception:[[o:Exception]:"java.lang.Exception: Invoke failed: > [[o:Response$UndeclaredThrowableErrorMarker]]->execSelect. Cause: > java.lang.NoSuchMethodException: execSelect(). Candidates: [] VM: 1.6.0_16@ > http://java.sun.com/" at: #-6 > php.java.bridge.JavaBridge.checkM(JavaBridge.java:1091) #-5 > php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1029) #-4 > php.java.bridge.Request.handleRequest(Request.java:415) #-3 > php.java.bridge.Request.handleRequests(Request.java:491) #-2 > php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 > php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 > C:\wamp\www\java\Java.inc(136): java_ThrowExceptionProxyFactory->getProxy(6, > 'com.hp.hpl.jena...', 'T', true) #1 C:\wamp\www\java\Java.inc(219): > java_Arg->getResult(true) #2 C:\wamp\www\java\Java.inc(221): > java_Client->getWrappedResult(true) #3 C:\wamp\www\java\Java.inc(337): > java_Client->getResult() #4 C:\wamp\www\java\Java.inc(1063): > java_Client->invokeMethod(5, 'execSelect', Array) #5 > C:\wamp\www\java\Java.inc(1237): java_JavaProxy->__call('execSelect', Array) > #6 [internal function]: java_exception->__call('execSelect', Array) #7 > C:\wamp\www\index.php(18): java_InternalException->execSelect() #8 > C:\wamp\www\index.php(26): PruebaSPARQL::test() #9 {main}] > *Fatal error*: An unchecked exception occured during script execution. > Please check the server log files for details. in *C:\wamp\www\java\Java.inc > * on line *461* > > > Regards, > Jost Boekemeier > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users _________________________________________________________________ Juega y gana con Samsung y Windows Live http://www.equipatucasa.com.mx |
From: <php...@li...> - 2010-01-22 10:59:25
|
BTW: Which PHP version and which OS do you use? While testing the above code against the latest PHP 5.3.1, it appears that PHP 5.3.1 on Windows discards all error messages(!). Please use a stable PHP version instead (PHP 5.2.x). > Is there (with PHP/Java Bridge) any special thing I have to consider when > I work with Java interfaces rather than classes?. Your code is correct. Except for $rs->hasNext(), which returns a Boolean object. Your loop while($rs->hasNext()) never returns. Use an explicit boolean cast: while((boolean)(string)$rs->hasNext()); or while(java_is_true($rs->hasNext()); I think the reason why your query fails is that ModelD2RQ cannot parse an UTF-8 file. But that's a d2rq issue, I think. *Warning*: Unchecked exception detected: [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared java.lang.RuntimeException detected. java.lang.Exception: CreateInstance failed: new de.fuberlin.wiwiss.d2rq.ModelD2RQ((o:String)[o:String]). Cause: de.fuberlin.wiwiss.d2rq.D2RQException: d2rq:uriPattern 'C:\wamp\www/mapping-iswc.n3#organizations/@@organizations.OrgID@@' contains characters not allowed in URIs (E50) VM: 1.6.0_16@http://java.sun.com/" at: #-22 de.fuberlin.wiwiss.d2rq.map.ResourceMap.buildValu[...]esult(false) #2 C:\wamp\www\java\Java.inc(220): java_Client->getWrappedResult(false) #3 C:\wamp\www\java\Java.inc(320): java_Client->getInternalResult() #4 C:\wamp\www\java\Java.inc(1157): java_Client->createObject('de.fuberlin.wiw...', Array) #5 C:\wamp\www\java\Java.inc(44) : eval()'d code(1): Java->Java(Array) #6 C:\wamp\www\index.php(15): de\fuberlin\wiwiss\d2rq\ModelD2RQ->__construct('C:\wamp\www/map...') #7 C:\wamp\www\index.php(26): PruebaSPARQL::test() #8 {main}] in * C:\wamp\www\java\Java.inc* on line *121* *Warning*: Unchecked exception detected: [[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: [[c:QueryExecutionFactory]]->create((o:Query)[o:Query], (i:QuerySolution)[o:Response$UndeclaredThrowableErrorMarker]). Cause: java.lang.IllegalArgumentException: argument type mismatch VM: 1.6.0_16@ http://java.sun.com/" at: #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke(Un[...]\Java.inc(977): java_Client->invokeMethod(4, 'create', Array) #5 C:\wamp\www\java\Java.inc(44) : eval()'d code(1): java_invoke(Object(JavaClass), 'create', Array) #6 [internal function]: com\hp\hpl\jena\query\QueryExecutionFactory::__callStatic('create', Array) #7 C:\wamp\www\index.php(18): com\hp\hpl\jena\query\QueryExecutionFactory::create(Object(java_InternalJava), Object(de\fuberlin\wiwiss\d2rq\ModelD2RQ)) #8 C:\wamp\www\index.php(26): PruebaSPARQL::test() #9 {main}] in *C:\wamp\www\java\Java.inc* on line *121* exception:[[o:Exception]:"java.lang.Exception: Invoke failed: [[o:Response$UndeclaredThrowableErrorMarker]]->execSelect. Cause: java.lang.NoSuchMethodException: execSelect(). Candidates: [] VM: 1.6.0_16@ http://java.sun.com/" at: #-6 php.java.bridge.JavaBridge.checkM(JavaBridge.java:1091) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1029) #-4 php.java.bridge.Request.handleRequest(Request.java:415) #-3 php.java.bridge.Request.handleRequests(Request.java:491) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\wamp\www\java\Java.inc(136): java_ThrowExceptionProxyFactory->getProxy(6, 'com.hp.hpl.jena...', 'T', true) #1 C:\wamp\www\java\Java.inc(219): java_Arg->getResult(true) #2 C:\wamp\www\java\Java.inc(221): java_Client->getWrappedResult(true) #3 C:\wamp\www\java\Java.inc(337): java_Client->getResult() #4 C:\wamp\www\java\Java.inc(1063): java_Client->invokeMethod(5, 'execSelect', Array) #5 C:\wamp\www\java\Java.inc(1237): java_JavaProxy->__call('execSelect', Array) #6 [internal function]: java_exception->__call('execSelect', Array) #7 C:\wamp\www\index.php(18): java_InternalException->execSelect() #8 C:\wamp\www\index.php(26): PruebaSPARQL::test() #9 {main}] *Fatal error*: An unchecked exception occured during script execution. Please check the server log files for details. in *C:\wamp\www\java\Java.inc * on line *461* Regards, Jost Boekemeier |
From: <php...@li...> - 2010-01-22 10:43:30
|
Hi, > Here is the Java Code I want to transform to PHP code with PHP/Java Bridge: Quick and dirty translation: <?php require_once("java/Java.inc"); $here=getcwd(); java_autoload("$here/d2r-server-0.7/lib;$here/ARQ-2.8.2/lib"); use de\fuberlin\wiwiss\d2rq\ModelD2RQ as ModelD2RQ; use com\hp\hpl\jena\query\QueryFactory as QueryFactory; use com\hp\hpl\jena\query\QueryExecutionFactory as QueryExecutionFactory; try { class PruebaSPARQL { public static function test() { global $here; $m = new ModelD2RQ("$here/mapping-iswc.n3"); $sparql = "SELECT * WHERE {}"; $q = QueryFactory::create($sparql); $rs = QueryExecutionFactory::create($q, $m)->execSelect(); while (java_is_true(rs.hasNext())) { $row = $rs->nextSolution(); echo "Carrera: " . $row->getLiteral("carrera")->getString(); } } } pruebaSPARQL::test(); } catch (Exception $e) { echo "exception:$e"; } ?> Regards, Jost Boekemeier |
From: <php...@li...> - 2010-01-21 01:05:27
|
Hi, As you adviced me, I have tried to catch a RuntimeException before the execSelect call, but I have no success. Here is the Java Code I want to transform to PHP code with PHP/Java Bridge: import de.fuberlin.wiwiss.d2rq.*; import com.hp.hpl.jena.query.*; class pruebaSPARQL{ public pruebaSPARQL() { super(); } public static void main(String argv[]) { // Load mapping file ModelD2RQ m = new ModelD2RQ("D:/DOCUMENTOS/alejandro/Maestria/tesis/egresados/herramientas/d2r-server-0.7/mapvariasLapOnto.n3"); String sparql = "PREFIX onto: <http://localhost/egresados/site/egresado.owl#>" + "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>" + "SELECT DISTINCT ?carrera WHERE {" + " ?egresado onto:Carrera ?carrera . " + "}"; Query q = QueryFactory.create(sparql); ResultSet rs = QueryExecutionFactory.create(q, m).execSelect(); while (rs.hasNext()) { QuerySolution row = rs.nextSolution(); System.out.println("Carrera: " + row.getLiteral("carrera").getString()); } } } According to "http://jena.sourceforge.net/ARQ/javadoc/com/hp/hpl/jena/query/package-summary.html", QueryExecutionFactory.create(q, m) returns a QueryExecution Java interface and the execSelect() call should returns a ResultSet Java interface. Is there (with PHP/Java Bridge) any special thing I have to consider when I work with Java interfaces rather than classes?. Here is what I have tried with PHP/Java Bridge. <?php define ("JAVA_PREFER_VALUES", true); require_once("http://localhost:8080/egresados/java/Java.inc"); class PRUEBA { public function execute() { $java_library_path = "D:\\DOCUMENTOS\\alejandro\\Maestria\\tesis\\egresados\\herramientas\\Jena-2.6.2\\lib\\;D:\\DOCUMENTOS\\alejandro\\Maestria\\tesis\\egresados\\herramientas\\d2r-server-0.7\\lib\\"; try { java_require($java_library_path); $modelD2RQ = new Java("de.fuberlin.wiwiss.d2rq.ModelD2RQ", "D:\\DOCUMENTOS\\alejandro\\Maestria\\tesis\\egresados\\herramientas\\d2r-server-0.7\\mapvariasLapOnto.n3"); $sparqlString = htmlentities("PREFIX onto: <http://localhost/egresados/site/egresado.owl#>" . "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>" . "SELECT DISTINCT ?carrera WHERE {" . " ?egresado onto:Carrera ?carrera . " . "}"); echo $sparqlString; $query = Java("com.hp.hpl.jena.query.QueryFactory")->create($sparqlString); $rs = Java("com.hp.hpl.jena.query.QueryExecutionFactory")->create($query, $modelD2RQ)->execSelect(); /*while($rs.hasNext()){ //$row = new java("com.hp.hpl.jena.query.QuerySolution"); $row = $rs.nextSolution(); echo $row.getLiteral("carrera").getString(); }*/ }catch (JavaException $ex) { $trace = new Java("java.io.ByteArrayOutputStream"); $ex->printStackTrace(new Java("java.io.PrintStream", $trace)); print "java stack trace: $trace\n"; } } } ?> Sincerly, thank you very much. > Date: Sun, 17 Jan 2010 20:18:14 +0100 > To: php...@li... > From: php...@li... > Subject: Re: [Php-java-bridge-users] Help > > Hi, > > like other containers (EJB for example), the PHP/Java Bridge container > terminates the current transaction if a java.lang.RuntimeException or > java.lang.Error crosses the container boundary. However, it does not > terminate it immediately, to give you a chance to clear the error condition > before the PHP script terminates. > > Please see > http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaProxy.inc.html#functionjava_last_exception_clear > for details. > > Please see our FAQ entry "Why doesn't the bridge throw a > java.lang.RuntimeException or Error as a PHP JavaException by default?" > > > > [[o:Response$ > > UndeclaredThrowableErrorMarker]]->execSelect. Cause: > > java.lang.NoSuchMethodException: execSelect(). Candidates: [] VM: > > please take a look at the error message again; your code: > > $query = Java("com.hp.hpl.jena.query.QueryFactory")->create($sparqlString); > //---OK. > > has thrown a java.lang.Error or java.lang.RuntimeException, which is > reported as a PHP warning. In the next step you ignore the warning, take the > RuntimeException and try to invoke execSelect() on it, which fails, of > course. > > If you want java.lang.Error and java.lang.RuntimeException to fail fast, > define("JAVA_PREFER_VALUES", true) before including Java.inc. > > > Regards, > Jost Boekemeier > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users _________________________________________________________________ Juega y gana con Samsung y Windows Live http://www.equipatucasa.com.mx |
From: <php...@li...> - 2010-01-17 19:18:21
|
Hi, like other containers (EJB for example), the PHP/Java Bridge container terminates the current transaction if a java.lang.RuntimeException or java.lang.Error crosses the container boundary. However, it does not terminate it immediately, to give you a chance to clear the error condition before the PHP script terminates. Please see http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaProxy.inc.html#functionjava_last_exception_clear for details. Please see our FAQ entry "Why doesn't the bridge throw a java.lang.RuntimeException or Error as a PHP JavaException by default?" > [[o:Response$ > UndeclaredThrowableErrorMarker]]->execSelect. Cause: > java.lang.NoSuchMethodException: execSelect(). Candidates: [] VM: please take a look at the error message again; your code: $query = Java("com.hp.hpl.jena.query.QueryFactory")->create($sparqlString); //---OK. has thrown a java.lang.Error or java.lang.RuntimeException, which is reported as a PHP warning. In the next step you ignore the warning, take the RuntimeException and try to invoke execSelect() on it, which fails, of course. If you want java.lang.Error and java.lang.RuntimeException to fail fast, define("JAVA_PREFER_VALUES", true) before including Java.inc. Regards, Jost Boekemeier |
From: <php...@li...> - 2010-01-17 17:59:32
|
Hi, I have a question. Can I do something like this: ResultSet rs = QueryExecutionFactory.create(q, m).execSelect(); (where ResultSet rs is a java interface, QueryExecutionFactory.create(q,m) returns a java interface and execSelect() function is declared in this interface). with PHP/Java Bridge? In Java I can. How can I do that? I have tried this: $query = Java("com.hp.hpl.jena.query.QueryFactory")->create($sparqlString); //---OK. $rs = Java("com.hp.hpl.jena.query.QueryExecutionFactory")->create($query, $modelD2RQ)->execSelect(); //---crash here but it replies: java stack trace: java.lang.Exception: Invoke failed: [[o:Response$UndeclaredThrowableErrorMarker]]->execSelect. Cause: java.lang.NoSuchMethodException: execSelect(). Candidates: [] VM: 1.6.0_17@http://java.sun.com/ at php.java.bridge.JavaBridge.checkM(JavaBridge.java:1091) at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1029) at php.java.bridge.Request.handleRequest(Request.java:415) at php.java.bridge.Request.handleRequests(Request.java:491) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Caused by: java.lang.NoSuchMethodException: execSelect(). Candidates: [] ... 6 more Thanks in advance. _________________________________________________________________ Una nueva experiencia de búsqueda está aquí http://www.bing.com/?mkt=es-MX&FORM=M006IR&Publ=WLHMTAG&Crea=TEXT_M006IR_Bing_ES_SaveTimeClicks_1X1 |
From: <php...@li...> - 2009-12-23 07:00:32
|
I will be out of the office starting 12/18/2009 and will not return until 12/30/2009. I will respond to your message when I return. |
From: <php...@li...> - 2009-12-22 14:00:30
|
Hi Peter, > [someone has] started a Java process from PHP. [the bridge] start[s] a background Java daemon from a PHP script. Thank you very much for this problem report. I will remove the java autostart feature in version PHP/Java Bridge 5.5.5. Apache or IIS SAPI users should use a servlet or JEE back end and nothing else. See this blog http://wiki.neo4j.org/content/PHP#Installation_Headaches for example. Instead of fixing his tomcat back end, he is starting a Java daemon from a Apache thread(!) as a workaround. Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-16 11:30:11
|
Hello! I think that the first call it does not send any request to the PHP/Java Bridge Server, nor try to start it I cannot reproduce this problem I guess Dimitar has started a Java process from PHP. This long running Java process has been killed by Apache or IIS. The PHP script still refers to this zombie process because the PHP maintainers have difficulties with the Winsock implementation, which cannot detect broken connections properly, see PHP bug #49447 > This policy doesn't make sense to me. I guess he doesn't have shell access, so he wants to start a background Java daemon from a PHP script. It might be possible through "nohup" or "javaw.exe", but his system admin might not be amused, seeing all those Java processes running on his PHP web server. Peter |
From: <php...@li...> - 2009-12-14 09:55:15
|
Hi, I cannot reproduce this problem. Which operating system are you using? Can you please run JavaBridge.jar as follows: java -jar JavaBridge.jar SERVLET_LOCAL:8080 4 pjb.log and reproduce this bug and post the pjb.log file? However, please use a JEE or servlet engine back end. Since version 5.5.4 the PHP/Java Bridge supports http/1.1 chunked connections. The standalone JavaBridge.jar option SERVLET emulates a servlet engine, so we've added two new classes to it: http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/php/java/bridge/http/ChunkedInputStream.java?revision=1.1&view=markupand http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/server/php/java/bridge/http/ChunkedOutputStream.java?revision=1.1&view=markup It may well be that they contain a bug. > I tried running it in Tomcat and it works, but i too am not allowed > to use it This policy doesn't make sense to me. If you start JavaBridge.jar with the SERVLET option, you *are* using a servlet engine. It contains bugs which have been fixed in Tomcat long ago. Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-14 06:13:30
|
I have similar problem, did you managed to fix it? In my case i'm using FOP to printout a PDF. But i get this error: [13-Dec-2009 13:33:54] php: protocol error: , Invalid document end at col 1. Check the back end log for OutOfMemoryErrors. [13-Dec-2009 13:33:54] PHP Fatal error: Call to a member function read() on a non-object in ....\Java.inc on line 207 And this happens only the first call after I haven't used it for some time. I'm sure i'm using the latest version - 5.5.4.1 and that the Java.inc is the some version (it's from the jar)(definitely wont be allow to include through URL). Am running the PHP/Java Bridge Server, not the war file in a Application Server. I tried running it in Tomcat and it works, but i too am not allowed to use it. I find it hard to debug the Java.inc, I think that the first call it does not send any request to the PHP/Java Bridge Server, nor try to start it and the second one right after this it works fine. Best Regards, Dimitar Stefanov PS: It's my first time posting on mailing list so i may have messed up something :) ---------------------------------------------------------------------------------- > What do you mean by "fetch directly from the backend"? Use the require command I have given. Please fetch Java.inc directly from the back end, use <?php require_once("http://localhost:8080/JavaBridge/java/Java.inc"<http://localhost:8080/JavaBridge/java/Java.inc> ); ... ?> Or make sure that the version of your Java.inc matches the version of your back end. > What's the backend here? The PHP/Java Bridge application. > can configure the path to the > PHPjavaBridge installation in a variable Which seems to be the problem here. You have probably confused the versions. Or the Java daemon you have written crashes immediately. > I'm not allowed to use a tomcat although I'd like to have it. Interesting. I thought you were running the back end as a daemon. Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-11 11:41:23
|
Hi Venkat, please see our FAQ entry "How do I enable the Java extension in my php.ini file?" at http://php-java-bridge.sourceforge.net/pjb/FAQ.html Detailed install instructions can be found at http://php-java-bridge.sourceforge.net/pjb/installation.php and http://php-java-bridge.sourceforge.net/pjb/user-contributed/JavaEchoServer.gif . Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-11 08:25:45
|
Hi All, Description: I am using the following softwares installed in my application. 1. php-5.3.1-Win32-VC6-x86.ZIP 2. apache_2.2.14-win32-x86-no_ssl.msi I have downloaded the file "JavaBridgeTemplate5541.war" from "http://sourceforge.net/projects/php-java-bridge/files/Binary%20package/" site and place the JavaBridge.jar from "JavaBridgeTemplate5541.war" into "c:/php/ext". The file "php_java.dll" not found in the "JavaBridgeTemplate5541.war" to place in the "c:/php/ext". When I tried to restart and run the Apache http Server I unable to see the "Java" option in the "php configuration options" with the following syntax: <?php phpinfo(); ?> when run on the browser with the URL "http://localhost/". Reproduced Code: Configured the file "php.ini" with the foloowing lines: [java] java.java_home = "C:/Program Files/Java/jdk1.5.0_13" java.java = "C:/Program Files/Java/jdk1.5.0_13/bin/javaw.exe" java.class.path = "C:/php/ext/JavaBridge.jar" java.library.path = "C:/php/ext" java.log_level=2 Expected Result: I should see the "Java" option when I run the "index.php" file. "index.php": <?php phpinfo(); ?> Result should be displayed with the phpinfo() in the browser: [Java] Java Enabled: true; Java Bridge: 5.5.4 Java status : running Actual Result: This is the following error I can see in the "error log" file of the apache http server. PHP Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext\\php_java.dll' - The specified module could not be found.\r\n in Unknown on line 0 I would be thanks if I got solution for this problem. Thanks, Venkat |
From: <php...@li...> - 2009-12-10 14:20:28
|
Which exception do you get? On Thu, Dec 10, 2009 at 10:14 AM, < php...@li...> wrote: > > Hi, > > I got a error when I call 'getOCSPURL' with the certificate. > > $url = java("com.lowagie.text.pdf.PdfPKCS7")->getOCSPURL($chain[0]); > > I know $chain[0] contain a valid X509CertificateObject, but I always got > that exception: > #0 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(248): > java_ThrowExceptionProxyFactory->getProxy(102, 'org.bouncycastl...', '', > true) > #1 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(388): > java_Arg->getResult(true) > #2 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(394): > java_Client->getWrappedResult(true) > #3 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(594): > java_Client->getResult() > #4 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(1731): > java_Client->invokeMethod(100, 'getOCSPURL', Array) > #5 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(1839): > java_JavaProxy->__call('getOCSPURL', Array) > #6 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(2007): > java_AbstractJava->__call('getOCSPURL', Array) > #7 [internal function]: Java->__call('getOCSPURL', Array) > #8 C:\Developpement\My Webs\ss_billing\classes\billing.class2.pdf.php(349): > JavaClass->getOCSPURL(Object(java_InternalJava)) > #9 C:\Developpement\My Webs\ss_billing\receive.php(183): > billing_pdf::generation(Object(SimpleXMLElement)) > #10 {main} > > I'm using iText-2.1.7.jar and some other functionality of this library are > working fine... any idea ? > > > Date: Mon, 7 Dec 2009 11:47:44 +0100 > > To: php...@li... > > From: php...@li... > > Subject: Re: [Php-java-bridge-users] messageDigest and byte > manipulation(2) > > > > Hi, > > > > [java-code] > > > > Certificate[] chain = ks.getCertificateChain(alias); > > if (chain.length >= 2) { > > String url = PdfPKCS7.getOCSPURL(( > > > > > > X509Certificate)chain[0]); > > > if (url != null && url.length() > 0) > > > ocsp = new > OcspClientBouncyCastle((X509Certificate)chain[0], > > > (X509Certificate)chain[1], url).getEncoded(); > > > } > > > > > > > > => > > > > $chain = $ks->getCertificateChain($alias); > > if (java_values(chain.length)) >= 2) { > > $url = java("...PdfPKCS7")->getOCSPURL($chain[0]); > > if (java_values($url) != null && java_values($url->length()) > 0) { > > $val = new java("...OcspClientBouncyCastle", $chain[0], $chain[1], > > $url); > > $ocsp = $val->getEncoded(); > > } > > > > > > Where exactly are the problems? > > > > You can always use > > > > echo java_inspect($jobject) > > > > to see if a Java method or procedure invocation has returned the correct > > result. > > > > However, it isn't possible to blindly convert a Java program to PHP. PHP > has > > different type conversion rules for example. > > > > If you have a working java library, just add it to your web context and > call > > it from PHP. > > > > > > Regards, > > Jost Boekemeier > > > ------------------------------------------------------------------------------ > > Join us December 9, 2009 for the Red Hat Virtual Experience, > > a free event focused on virtualization and cloud computing. > > Attend in-depth sessions from your desk. Your couch. Anywhere. > > http://p.sf.net/sfu/redhat-sfdev2dev > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > _________________________________________________________________ > Faites vos achats de Noël en ligne en toute sécurité : avec MSN Internet > Explorer 8 surfez sûr, télécharger maintenant gratuitement ! > http://www.microsoft.ch/msnie8/fr > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2009-12-10 09:14:52
|
Hi, I got a error when I call 'getOCSPURL' with the certificate. $url = java("com.lowagie.text.pdf.PdfPKCS7")->getOCSPURL($chain[0]); I know $chain[0] contain a valid X509CertificateObject, but I always got that exception: #0 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(248): java_ThrowExceptionProxyFactory->getProxy(102, 'org.bouncycastl...', '', true) #1 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(388): java_Arg->getResult(true) #2 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(394): java_Client->getWrappedResult(true) #3 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(594): java_Client->getResult() #4 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(1731): java_Client->invokeMethod(100, 'getOCSPURL', Array) #5 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(1839): java_JavaProxy->__call('getOCSPURL', Array) #6 C:\Developpement\My Webs\ss_billing\JavaBridge\java\Java.inc(2007): java_AbstractJava->__call('getOCSPURL', Array) #7 [internal function]: Java->__call('getOCSPURL', Array) #8 C:\Developpement\My Webs\ss_billing\classes\billing.class2.pdf.php(349): JavaClass->getOCSPURL(Object(java_InternalJava)) #9 C:\Developpement\My Webs\ss_billing\receive.php(183): billing_pdf::generation(Object(SimpleXMLElement)) #10 {main} I'm using iText-2.1.7.jar and some other functionality of this library are working fine... any idea ? > Date: Mon, 7 Dec 2009 11:47:44 +0100 > To: php...@li... > From: php...@li... > Subject: Re: [Php-java-bridge-users] messageDigest and byte manipulation(2) > > Hi, > > [java-code] > > Certificate[] chain = ks.getCertificateChain(alias); > if (chain.length >= 2) { > String url = PdfPKCS7.getOCSPURL(( > > > > X509Certificate)chain[0]); > > if (url != null && url.length() > 0) > > ocsp = new OcspClientBouncyCastle((X509Certificate)chain[0], > > (X509Certificate)chain[1], url).getEncoded(); > > } > > > > => > > $chain = $ks->getCertificateChain($alias); > if (java_values(chain.length)) >= 2) { > $url = java("...PdfPKCS7")->getOCSPURL($chain[0]); > if (java_values($url) != null && java_values($url->length()) > 0) { > $val = new java("...OcspClientBouncyCastle", $chain[0], $chain[1], > $url); > $ocsp = $val->getEncoded(); > } > > > Where exactly are the problems? > > You can always use > > echo java_inspect($jobject) > > to see if a Java method or procedure invocation has returned the correct > result. > > However, it isn't possible to blindly convert a Java program to PHP. PHP has > different type conversion rules for example. > > If you have a working java library, just add it to your web context and call > it from PHP. > > > Regards, > Jost Boekemeier > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users _________________________________________________________________ Faites vos achats de Noël en ligne en toute sécurité : avec MSN Internet Explorer 8 surfez sûr, télécharger maintenant gratuitement ! http://www.microsoft.ch/msnie8/fr |
From: <php...@li...> - 2009-12-08 18:48:27
|
As a workaround you can set define ("JAVA_DISABLE_AUTOLOAD", true); at the beginning of your java/Java.inc file. But you won't be able to autoload Java classes anymore -- the java("class.name...") syntax will work, though. Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-08 18:28:45
|
Hi, > Since version 5.5.4.1 joomla [...] this bug won't be fixed. The PHP/Java Bridge code will stay that way. Please see http://bugs.php.net/bug.php?id=49618 for details. If PHP crashes (on windows), please report this crash to the PHP maintainers, not to us. If PHP (correctly) reports that it cannot load a joomla class, please report this bug to the joomla maintainers, not to us. Regards, Jost Boekemeier |