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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(2) |
2
|
3
(3) |
4
|
5
|
6
|
7
(3) |
8
(3) |
9
|
10
(2) |
11
(2) |
12
|
13
|
14
(2) |
15
|
16
(1) |
17
|
18
|
19
|
20
|
21
|
22
(1) |
23
(1) |
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
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 |
From: <php...@li...> - 2009-12-08 14:05:52
|
Since version 5.5.4.1 joomla and other PHP libraries crash the PHP executable. JavaBridgeTemplate5442 is okay. I think this is a regression. |
From: <php...@li...> - 2009-12-07 11:21:48
|
>From the NEWS file: Version 5.5.4.1 * The "JBoss" application server abuses the log4j port 4445 for its internal purposes. The bridge now switches off log4j "chainsaw" if getServletContext().getServerInfo().startsWith("JBoss"). * The namespace separator "_" (e.g.: new org_foo_bar_baz(...) syntax), which has been used by some projects, is available again. However, new projects should use the official namespace separator, which defaults to "\". * If the option -Dphp.java.bridge.default_log_file= is set, the bridge switches off log4j chainsaw completely. * The default value of php_include_java has been set to Off. * A configuration option has been added to the JavaBridgeTemplate.war which sets php_include_java to On. * Bugfix: If php_include_java is set, global PHP variables are no longer discarded; the PHP scripts are required from the top-level environment. => http://downloads.sourceforge.net/project/php-java-bridge/Binary%20package/php-java-bridge_5.5.4.1/JavaBridgeTemplate5541.war?use_mirror=switch Regards, Jost Bökemeier |
From: <php...@li...> - 2009-12-07 10:47:56
|
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 |
From: <php...@li...> - 2009-12-07 09:01:46
|
Thanks Jost, This solution seem to work. But I still got a lot of problems for the rest of the script like [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(); } How to create an Array of object when you don't know the size... I can't use : $Certificate = new JavaClass("java.security.cert.Certificate"); $Array = new JavaClass("java.lang.reflect.Array"); $chain = $Array->newInstance($Certificate, 10); Otherwise, do you know someone who can help me to traduce this script (http://itextpdf.sourceforge.net/howtosign.html -> How to sign with a timestamp and OCSP in Java) Best regards > Date: Thu, 3 Dec 2009 19:31:36 +0100 > To: php...@li... > From: php...@li... > Subject: Re: [Php-java-bridge-users] messageDigest and byte manipulation(2) > > Hi, > > > while (($n = $data->read($byteArray)) > 0) { > > I always got a : Maximum execution time of 60 seconds exceeded in ... > > > Yes, this is the correct behaviour. The above statement evaluates to an > endless loop. > > $data->read(...) returns a java Integer object. Any object evaluates to > true, according to the PHP type conversion rules. > > > What you probably want is: > > while (($n = java_values($data->read($byteArray))) > 0) { > ... > > Please see our API documentation at > http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaProxy.inc.html#functionjava_valuesand > JAVA_PREFER_VALUES > http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_Options.inc.htmlfor > details. > > > 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 _________________________________________________________________ Messenger à partir de votre boîte de réception ! Découvrez la foule d'atouts de Hotmail. http://www.microsoft.com/switzerland/windows/fr/windowslive/hotmail_bl1/hotmail_bl1.aspx |
From: <php...@li...> - 2009-12-03 18:31:49
|
Hi, > while (($n = $data->read($byteArray)) > 0) { > I always got a : Maximum execution time of 60 seconds exceeded in ... Yes, this is the correct behaviour. The above statement evaluates to an endless loop. $data->read(...) returns a java Integer object. Any object evaluates to true, according to the PHP type conversion rules. What you probably want is: while (($n = java_values($data->read($byteArray))) > 0) { ... Please see our API documentation at http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaProxy.inc.html#functionjava_valuesand JAVA_PREFER_VALUES http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_Options.inc.htmlfor details. Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-03 14:04:18
|
Well, if you hit the 60seconds, you have no other chance than 1) raise the limit in php.ini 2) optimize your code what do you want to do with your code? It looks like you are trying to generate a md5 hash or something like that... php has build in support for various hashes... also your loop always transfers data back-and-forth between java and php which makes it slow.. so instead of trying to figure out, whats wrong with the code, it maybe would be better if you would tell us, what you like to achieve so we can guide you to a possible better solution. kind regards, dominik On Thu, Dec 3, 2009 at 2:28 PM, <php...@li...> wrote: > > Hi, > > > Thanks for you fast answer. > > I try again to implement the Java Array class like that (from the FAQ): > > $Byte = new JavaClass("java.lang.Byte"); > $byte = $Byte->TYPE; > $Array = new JavaClass("java.lang.reflect.Array"); > $byteArray = $Array->newInstance($byte, 8192); > > $n; > while (($n = $data->read($byteArray)) > 0) { > $messageDigest->update($byteArray, 0, $n); > echo "n= " . $n ; > } > > -> I always got a : Maximum execution time of 60 seconds exceeded in ... > > > When I try with a Php int Array like that: > > $buf = array(); > for ($i=0; $i<8192; $i++){ > $buf[$i] = '0'; > } > $n; > while (($n = $data->read($buf)) > 0) { > $messageDigest->update($buf, 0, $n); > echo "n= " . $n ; > } > > -> I receive that: n= 184n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 6259 Exception... > > Here you can find the original Java code: > > byte buf[] = new byte[8192]; > int n; > while ((n = data.read(buf)) > 0) { > messageDigest.update(buf, 0, n); > System.out.print("n=" + n); > } > > > Do you see where the problem can come from? > > Best regards Antoine > > > _________________________________________________________________ > 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 > ------------------------------------------------------------------------------ > 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 > |
From: <php...@li...> - 2009-12-03 13:28:56
|
Hi, Thanks for you fast answer. I try again to implement the Java Array class like that (from the FAQ): $Byte = new JavaClass("java.lang.Byte"); $byte = $Byte->TYPE; $Array = new JavaClass("java.lang.reflect.Array"); $byteArray = $Array->newInstance($byte, 8192); $n; while (($n = $data->read($byteArray)) > 0) { $messageDigest->update($byteArray, 0, $n); echo "n= " . $n ; } -> I always got a : Maximum execution time of 60 seconds exceeded in ... When I try with a Php int Array like that: $buf = array(); for ($i=0; $i<8192; $i++){ $buf[$i] = '0'; } $n; while (($n = $data->read($buf)) > 0) { $messageDigest->update($buf, 0, $n); echo "n= " . $n ; } -> I receive that: n= 184n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 8192n= 6259 Exception... Here you can find the original Java code: byte buf[] = new byte[8192]; int n; while ((n = data.read(buf)) > 0) { messageDigest.update(buf, 0, n); System.out.print("n=" + n); } Do you see where the problem can come from? Best regards Antoine _________________________________________________________________ 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-01 21:34:27
|
Hi, take a look at the java Array class. It contains the procedures you need. Primitives like int, byte, ... are wrapped by Java classes (Integer, Byte, ...). For arrays there's a separate class which handles it: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Array.html java("java.lang.Byte")->TYPE is the type of a byte, so that java("java.lang.reflect.Array")->newInstance(java("java.lang.Byte")->TYPE, size); creates a byte[] array of type byte with a given size. Please see our FAQ section "How do I create a primitive array?" for a detailed example. Regards, Jost Boekemeier |
From: <php...@li...> - 2009-12-01 16:02:19
|
Hi all, I'm new in the java-bridge technologies and have to create a PHP script to generate and signed an PDF. My problem come from 'byte' data type. I try to find a solution in archives and FAQ but nothing works... My java source code ( from http://itextpdf.sourceforge.net/howtosign.html -> How to sign with a timestamp and OCSP in Java) has to be 'traduce' to PHP. For the rest of the page, I think I'm fine, but when i declare the buf[] and use the messageDigest.update on it, I got unexpected result... (that's why I have a System.out.print("n=" + n) for the debug ) java result: n=191n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=4525 php result: n=184n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=8192n=6260 Exception... (when i use a array of 'int' instead of 'byte') [java code] byte buf[] = new byte[8192]; int n; while ((n = data.read(buf)) > 0) { messageDigest.update(buf, 0, n); System.out.print("n=" + n); } byte hash[] = messageDigest.digest(); Calendar cal = Calendar.getInstance(); byte[] ocsp = null; 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(); } byte sh[] = sgn.getAuthenticatedAttributeBytes(hash, cal, ocsp); sgn.update(sh, 0, sh.length); byte[] encodedSig = sgn.getEncodedPKCS7(hash, cal, tsc, ocsp); if (contentEstimated + 2 < encodedSig.length) throw new Exception("Not enough space"); byte[] paddedSig = new byte[contentEstimated]; System.arraycopy(encodedSig, 0, paddedSig, 0, encodedSig.length); PdfDictionary dic2 = new PdfDictionary(); dic2.put(PdfName.CONTENTS, new PdfString(paddedSig).setHexWriting(true)); sap.close(dic2); If someone can help to 'traduce in php' this code or just explain my exactly how to produce a array[8192] of byte. Best regards Antoine _________________________________________________________________ Messenger à partir de votre boîte de réception ! Découvrez la foule d'atouts de Hotmail. http://www.microsoft.com/switzerland/windows/fr/windowslive/hotmail_bl1/hotmail_bl1.aspx |