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...> - 2009-01-07 18:37:48
|
Hi, > Why do I definitely need Tomcat? you need a J2EE server or a servlet engine of your choice. You can write your own J2EE server or use the test "J2EE" server built into JavaBridge.jar and ship it as part of your product, but you're responsible for this. We guarantee that the PHP/Java Bridge application works correctly on any servlet engine or J2EE server inplementing the J2EE spec >= 1.3. > Hello: function bindtextdomain not found. Please install > language support, see http://php.net for details Please see the PHP documentation for details. > The requested method PUT is not allowed for the URL mod_jk disables PUT requests. Remove mod_jk. Nobody needs it, anyway. Use mod_proxy instead. Please see our FAQ ("j2ee cluster") for details. > Are the above errors pointing to problems with my PHP-Java > Bridge installation? If so, how can I go about fixing them? It's a misunderstanding. If you really need mod_jk for tomcat on port 8080, start another tomcat on port 8081 and deploy the bridge into this one. Or configure mod_jk to not disable PUT requests. [use PHP] > as an Apache module, or as FastCGI. Which would you > recommend using? Depends on your requirements. If you want to install a cluster, use mod_proxy/balancer within the apache front end and run PHP in the J2EE back end. [FastCGI vs Apache/PHP SAPI] > Does the PHP-Java bridge work better with > one rather than the other? The SAPI doesn't matter. > IDMS <-----> JDBC <-----> Java <-----> > /BRIDGE/ <-----> PHP <-----> Web?? Both modes, running PHP within Apache/IIS front-end or within a J2EE server back-end are supported. Regards, Jost Boekemeier |
|
From: <php...@li...> - 2009-01-07 17:03:40
|
Hi there, I ran this command from the terminal to test the php-java bridge installation: java -classpath JavaBridge.war TestInstallation I got the following information followed by an error: Starting a simple servlet engine: [/home/java/jre/bin/java, -jar, /home/tomcat/webapps/ext/JavaBridge.jar, SERVLET_LOCAL:8081] Jan 07 16:48:41 VMBridge INFO : VM : 1.6.0@http://www.ibm.com/ Jan 07 16:48:41 VMBridge INFO : VMBridge version : 5.4.2 Jan 07 16:48:41 VMBridge INFO : logFile : Jan 07 16:48:41 VMBridge INFO : default logLevel : 3 Jan 07 16:48:41 VMBridge INFO : socket : SERVLET_LOCAL:8081 Jan 07 16:48:41 VMBridge INFO : java.ext.dirs : /home/java/jre/lib/ext Jan 07 16:48:41 VMBridge INFO : php.java.bridge.base: /root Jan 07 16:48:41 VMBridge INFO : thread pool size : 20 Jan 07 16:48:41 VMBridge INFO : JavaBridgeRunner started on port INET_LOCAL:8081 Invoking php: [php-cgi, -n, -d, allow_url_include=On, /home/tomcat/webapps/test.php] java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, allow_url_include=On, /home/tomcat/webapps/test.php]), please check if php-cgi is in the path. at TestInstallation.start(TestInstallation.java:327) at TestInstallation.main(TestInstallation.java:251) Caused by: java.io.IOException: Cannot run program "php-cgi": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:470) at java.lang.Runtime.exec(Runtime.java:604) at java.lang.Runtime.exec(Runtime.java:520) at TestInstallation.start(TestInstallation.java:325) ... 1 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:197) at java.lang.ProcessImpl.start(ProcessImpl.java:101) at java.lang.ProcessBuilder.start(ProcessBuilder.java:463) ... 4 more However, within my Tomcat webapps folder some new files were created after I did the above. An ext/ directory containing jar files, a result.html file and a log file were created. Does the error indicate that the path to the php-cgi binary is not set? If so, how can I correct this? And my Tomcat installation uses port 8080, so why does it say the bridge starts on 8081? Kind regards This message has been scanned for viruses by MailControl - www.mailcontrol.com |
|
From: <php...@li...> - 2009-01-07 16:10:18
|
This is a follow up to the post: Configure bridge as a PHP Apache module or deploy into J2EE server? Thanks for the reply. I still require a little more advice if thats OK? Why do I definitely need Tomcat? Is the reason for this so that I can use JDBC -- can you explain why I need Tomcat? I have had a go at setting up the bridge myself and managed to do the following, which may or may not be correct: 1) I auto-deployed the JavaBridge.war in the tomcats webapps folder. 2) I then accessed www.mydomain.com/JavaBridge/index.php (remember that I am using mod_jk so this is accessing Tomcat's webapps folder) and ran the examples - but these scripts gave errors: Hello example gave this error Hello: function bindtextdomain not found. Please install language support, see http://php.net for details JSR 223 example2 gave this error: protocol error: Method Not Allowed The requested method PUT is not allowed for the URL /JavaBridge/jsp+php.jsp._cache_.phpjavabridge. , Internal error at col 4. Check the back end log for OutOfMemoryErrors. protocol error: Method Not Allowed The requested method PUT is not allowed for the URL /JavaBridge/jsp+php.jsp._cache_.phpjavabridge. , Internal error at col 4. Check the back end log for OutOfMemoryErrors. JSR 223 and IIS/Apache interaction example gave this error: protocol error: Method Not Allowed The requested method PUT is not allowed for the URL /JavaBridge/jsp+php2.jsp._cache_.phpjavabridge. , Internal error at col 4. Check the back end log for OutOfMemoryErrors. Could not evaluate script on IIS/Apache port 80: java.lang.IllegalArgumentException: reader must be a ScriptFileReader Are the above errors pointing to problems with my PHP-Java Bridge installation? If so, how can I go about fixing them? 3) Next I copied the JavaBridge folder to the Apache htdocs folder, and renamed it to JavaBridge2. 4) I then accessed the examples using www.mydomain.com/JavaBridge2/index.php - which points to my Apache htdocs folder. 5) Again, the same scripts gave the same errors as they did when accessing the scripts through Tomcat. 6) Next I compiled my own HelloWorld.java Java example. I did this by running the following command on the HelloWorld.java file.: - javac HelloWorld.java 7) Next I compiled the jar file using this command: - jar cvf HelloWorld.jar HelloWorld.class 8) I then created the helloworld.php file <?php require_once("java/Java.inc"); java_require('http://localhost/HelloWorld.jar'); $myObj = new Java('HelloWorld'); // display Hello World echo (String) $myObj->getHelloWorld(); ?> 9) Next I copied the HelloWorld.java, HelloWorld.class, HelloWorld.jar and helloworld.php files into the webapps/JavaBridge folder on Tomcat, and also to the htdocs/JavaBridge2 folder on Apache. When viewing the following URL's I saw the "Hello World" text in the browser, indicating that it had worked: www.mydomain.com/JavaBridge/helloworld.php www.mydomain.com/JavaBridge2/helloworld.php So does the above indicate that the PHP-Java Bridge is working as it should?? My example works fine when using PHP as an Apache module, or as FastCGI. Which would you recommend using? Does the PHP-Java bridge work better with one rather than the other? The most important question is will the way in which I have setup the PHP-Java Bridge provide the correct foundation for my proposed system i.e. will it allow me to achieve the following: IDMS <-----> JDBC <-----> Java <-----> /BRIDGE/ <-----> PHP <-----> Web?? Sorry for the huge post, i'm still getting my head around the basics. Once again, any help will be fantastic. kind regards Jonathan > > > Message: 8 > Date: Wed, 7 Jan 2009 12:00:22 -0000 > From: php...@li... > Subject: [Php-java-bridge-users] Configure bridge as a PHP Apache > module or deploy into J2EE server? > To: <php...@li...> > Message-ID: <D9991C4FC6614709BF8700521BFCB9DC@JPILLING> > Content-Type: text/plain; charset="iso-8859-1" > > Hi there, > > I am configuring a Linux server that will be eventually used as a web server. I am new to Java so some things are not clear to me, so please excuse any incorrect statements that I make. > > The idea is to connect to our IDMS database via JDBC Type 4 drivers from within a Java environment (which is installed on the Linux server), and then collect the data using Java and/or PHP through the PHP-Java Bridge, and then display the data over the web using PHP. > > I have Apache 2 configured, PHP as an Apache module and also as FastCGI, Apache mod_fastcgi, Tomcat server and the Apache mod_jk connectors. > > We want Apache 2 to handle all web requests and so we are using the mod_jk connectors to do this. i.e. if we want to view a JSP page online we can access it through www.mydomain.com/test.jsp instead of www.mydomain.com:8080/test.jsp. > > Considering our desired setup, how should I use the PHP-Java Bridge? Should I use it as an Apache PHP module, or just deploy it to the J2EE Tomcat server? > > The reason that I installed Tomcat is because I assumed it will create the JDBC connection with our IDMS database and allow PHP and Java to work together. However, I think that this may be incorrect and that all I need is Apache, PHP as an Apache module, the Java environment (SDK 6) to create the JDBC connection, and the PHP-Java Bridge as a PHP module. If we are not serving JSP pages then I can't see any need for Tomcat? Can you confirm that what I suspect is somewhat correct? > > Please advise as I'm quite confused which method to use. Any help will be much appreciated. > > Kind regards > Jonathan > > This message has been scanned for viruses by MailControl - www.mailcontrol.com > > > ------------------------------ > > Message: 9 > Date: Wed, 7 Jan 2009 14:19:39 +0000 (GMT) > From: php...@li... > Subject: Re: [Php-java-bridge-users] Configure bridge as a PHP Apache > module or deploy into J2EE server? > To: php...@li... > Message-ID: <498...@we...> > Content-Type: text/plain; charset=iso-8859-1 > > Hi, > > whether or not you intent to use JSP, you'll need tomcat anyway; although you can start a Java daemon from PHP (see http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=startJava.php), tomcat is much easier to set up and to handle than some Java daemon started from PHP. > > > Regards, > Jost B?kemeier > > > > > > > > ------------------------------ > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > > ------------------------------ > > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > End of php-java-bridge-users Digest, Vol 32, Issue 2 > **************************************************** |
|
From: <php...@li...> - 2009-01-07 14:19:48
|
Hi, whether or not you intent to use JSP, you'll need tomcat anyway; although you can start a Java daemon from PHP (see http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=startJava.php), tomcat is much easier to set up and to handle than some Java daemon started from PHP. Regards, Jost Bökemeier |
|
From: <php...@li...> - 2009-01-07 13:22:10
|
Hi there, I am configuring a Linux server that will be eventually used as a web server. I am new to Java so some things are not clear to me, so please excuse any incorrect statements that I make. The idea is to connect to our IDMS database via JDBC Type 4 drivers from within a Java environment (which is installed on the Linux server), and then collect the data using Java and/or PHP through the PHP-Java Bridge, and then display the data over the web using PHP. I have Apache 2 configured, PHP as an Apache module and also as FastCGI, Apache mod_fastcgi, Tomcat server and the Apache mod_jk connectors. We want Apache 2 to handle all web requests and so we are using the mod_jk connectors to do this. i.e. if we want to view a JSP page online we can access it through www.mydomain.com/test.jsp instead of www.mydomain.com:8080/test.jsp. Considering our desired setup, how should I use the PHP-Java Bridge? Should I use it as an Apache PHP module, or just deploy it to the J2EE Tomcat server? The reason that I installed Tomcat is because I assumed it will create the JDBC connection with our IDMS database and allow PHP and Java to work together. However, I think that this may be incorrect and that all I need is Apache, PHP as an Apache module, the Java environment (SDK 6) to create the JDBC connection, and the PHP-Java Bridge as a PHP module. If we are not serving JSP pages then I can't see any need for Tomcat? Can you confirm that what I suspect is somewhat correct? Please advise as I'm quite confused which method to use. Any help will be much appreciated. Kind regards Jonathan This message has been scanned for viruses by MailControl - www.mailcontrol.com |
|
From: <php...@li...> - 2009-01-06 15:56:52
|
Hi,
cvs -d :ext:you...@ph...:/cvsroot/php-java-bridge co php-java-bridge
anonymous CVS will also work.
However, you don't need CVS access, as the sources are contained in the documentation folder of the binary download (in src.zip).
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2009-01-06 15:53:52
|
Hi,
> - How to reliably run the JavaBridge.jar in production?
Just deploy JavaBridge.war into your favorite J2EE server or servlet engine. Please see our FAQ and the INSTALL.J2EE document for details.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2009-01-06 15:51:14
|
Hi John, > java.lang.RuntimeException: Could not run PHP ([php-cgi, what about adding a OSX php-cgi binary to the JavaBridge.war file? AFAIK OSX doesn't ship with a php-cgi binary. Furthermore all current PHP binaries aren't exactly stable (see this regression for example: http://bugs.php.net/bug.php?id=46723&edit=1), anyway. So it might be a good idea to ship a stable PHP binary along with the PHP/Java Bridge. The Solaris/Linux/... PHP binaries conntained in JavaBridge.war which have been compiled with: cd php-5.1.4; ./configure --disable-all --enable-fastcgi && make && strip sapi/cgi/php-cgi Could you provide such a php-cgi binary for OSX? Regards, Jost Boekemeier |
|
From: <php...@li...> - 2009-01-06 15:40:57
|
Hi, I've done my first (succesful) steps with the bridge. Questions: - How to reliably run the JavaBridge.jar in production? Everything works fine, when I just enter java -Djava.ext.dirs="/usr/share/java/" -jar JavaBridge.jar SERVLET_LOCAL:8080 Now I only need to require java.inc in PHP and can work. But I would like to have this run as a daemon, which restarts automatically on failure or system restart. And no. I'd rather not install Tomcat. I have no idea, what this Tomcat is and does and don't like to spend resources on yet another java monster. Please excuse my ignorace of the Java world. :-) Best regards, -- Thomas Koch, http://www.koch.ro YMC AG, http://www.ymc.ch |
|
From: <php...@li...> - 2009-01-06 10:53:25
|
Hi, I'm just starting to dive into the php-java-bridge and wondered, where I could find the source code repository of the project. It's not necessary right now, but I like to observe the trunk of projects I use. Best regards, -- Thomas Koch, Software Developer http://www.koch.ro |
|
From: <php...@li...> - 2009-01-06 07:08:05
|
Hi all,
Well i'm having a silly problem getting the latest release (5.4.2) to
extract so that I can test compatibility with our Web application. I
am currently running version 3.2.1 in production (has been running
for over a year beautifully).
As I am a complete noob when it comes to Java, this is likely a very
simple problem I hope. I am running Mac OS X 10.4.11.
I copied the downloaded folder to my Mac Web directory at /Library/
WebServer/Documents/php-java-bridge_5-1/
Here is my terminal output for three different attempts:
1) Using the installation instructions verbatim:
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 jkoerber$ java -
classpath JavaBridge.war TestInstallation
java.io.FileNotFoundException: /Library/WebServer/Documents/php-java-
bridge_5-1/JavaBridge.war:/System/Library/Frameworks/JavaVM.framework/
Versions/1.5.0/Classes/.compatibility/ext/JavaBridge.jar (Permission
denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at TestInstallation.extractFile(TestInstallation.java:351)
at TestInstallation.start(TestInstallation.java:283)
at TestInstallation.main(TestInstallation.java:251)
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 jkoerber$
2) Specifying a path for "-classpath"
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 jkoerber$ java -
classpath /Library/WebServer/Documents/php-java-bridge_5-1/
JavaBridge.war TestInstallation
java.io.FileNotFoundException: /Library/WebServer/Documents/php-java-
bridge_5-1/JavaBridge.war:/System/Library/Frameworks/JavaVM.framework/
Versions/1.5.0/Classes/.compatibility/ext/JavaBridge.jar (Permission
denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at TestInstallation.extractFile(TestInstallation.java:351)
at TestInstallation.start(TestInstallation.java:283)
at TestInstallation.main(TestInstallation.java:251)
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 jkoerber$
3) Running as superuser (since I noticed the permission denied message)
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 jkoerber$ su root
Password:
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 root# java -
classpath /Library/WebServer/Documents/php-java-bridge_5-1/
JavaBridge.war TestInstallation
Starting a simple servlet engine: [/System/Library/Frameworks/
JavaVM.framework/Versions/1.5.0/Home/bin/java, -jar, /Library/
WebServer/Documents/php-java-bridge_5-1/JavaBridge.war:/System/
Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/ext/JavaBridge.jar, SERVLET_LOCAL:8080]
Exception in thread "main" java.lang.NoClassDefFoundError: php/java/
bridge/Standalone
Invoking php: [php-cgi, -n, -d, allow_url_include=On, /Library/
WebServer/Documents/php-java-bridge_5-1/JavaBridge.war:/System/
Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/test.php]
java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d,
allow_url_include=On, /Library/WebServer/Documents/php-java-
bridge_5-1/JavaBridge.war:/System/Library/Frameworks/JavaVM.framework/
Versions/1.5.0/Classes/.compatibility/test.php]), please check if php-
cgi is in the path.
at TestInstallation.start(TestInstallation.java:327)
at TestInstallation.main(TestInstallation.java:251)
Caused by: java.io.IOException: php-cgi: not found
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:52)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:507)
at TestInstallation.start(TestInstallation.java:325)
... 1 more
iMac:/Library/WebServer/Documents/php-java-bridge_5-1 root#
I appreciate any tips on why I am unable to get the .war file to
unzip on my Mac.
Thanks
-- Jon
|
|
From: <php...@li...> - 2009-01-05 16:44:52
|
Hi,
> I want to wrap two PHP objects as closures, pass them to Java, and in
> Java call a method on the first closure with the second closure as
> parameter [argument]
In pseudo code (please see the JSR 223 API for details):
String pA = "class A{function testA($b){echo $b->testB();}}\n"
String pB = "class B{function testB(){echo 'hello world';}}\n"
String test = "<?php "+pA+Pb+" $thiz=java_context()->getAttribute("thiz"); $thiz->call(java_closure(new A()), java_closure(new B()); ?>
public void doWork (){
scriptEngine = new ScriptEngineManager().getEngineByName("php-invocable");
scriptEngine.put("thiz", this);
scriptEngine.eval(test);
((Closeable)scriptEngine).close();
}
static interface IA { public void testA(IB cc1); }
static interface IB { public void testB(); }
public void call(Object $ccA, Object $ccB) {
IA ccA = scriptEngine.getInterface($ccA, IA);
IB ccB = scriptEngine.getInterface($ccB, IB);
ccA.testA(ccB);
}
> The problem is that on the php side I get a new object of
> type PhpProcedure instead of the closure/proxy I created before.
Yes, the type is determined lazily. Why is that a problem?
> Therefore within the method I always get the wrong
> parameter passed in.
I think this is a misunderstanding. If you don't specify the type, either via getInterface() (see above) or by calling java_closure() with three arguments, the generated procedure is generic, i.e. you cannot call the procedure "testA" on it.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2009-01-05 13:42:56
|
I think found what was causing my confusion. On the SQL Server the field
that I thought was a double is actually defined as a Money type. If I
understand it correctly, the Money type is a long integer that has to be
scaled based on the definition.
Thanks for your reply. I suspected that PHP only really used strings, but
wasn't sure. Also, I had forgotten about the java_values command. I have
used it before, but it has been some time.
Thanks Jost.
Charles Shaffer
Senior Analyst
NTN-Bower Corporation
php...@li...
01/03/2009 11:00 AM
Please respond to php-java-bridge-users
To: php...@li...
cc:
Subject: Re: [Php-java-bridge-users] Type Casting
Hi,
can you please give an example which demonstrates the problem?
> Should PHP handle everyting as a string and type casting be
> done in Java?
That's the only type that PHP supports, anyway. :)
> For example I have a Sql query being called from Java. PHP
> passes a
> string and an int to the Java routine and the Java routine
> runs the SQL query and returns a double.
The bridge will return a proxy for the result, which can be evaluated as
usual:
either
echo (int)(string)$sqlResult;
or
echo java_values($sqlResult);
Note that the first line above might be wrong on 32 bit machines, where
PHP int values have a limited range. Use (double)(string)$sqlResult
instead.
Regards,
Jost Boekemeier
------------------------------------------------------------------------------
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2009-01-05 09:05:49
|
Hi all, I want to wrap two PHP objects as closures, pass them to Java, and in Java call a method on the first closure with the second closure as parameter. I believe that there's no simple java_closure()-call to do this at once. Therefore I wrote a Java-class that takes over the two closures and tries to do what I desribed above. See attachment for my PHP and Java code look. The problem is that on the php side I get a new object of type PhpProcedure instead of the closure/proxy I created before. Therefore within the method I always get the wrong parameter passed in. If I omit the line where I replace Proxy by underlying PhpProcedure in my java code, I get an (dollar)Proxy0-object instead of the PhpProcedure - which is still wrong. What I probably would need to get is the PhpProcedureProxy, but I've got no glue how to get a handle on that on the java side. I'm quite new to PHP-Java-Bridge, so I don't know whether this is a missing feature or I'm missing some basic understanding. Regards Juergen |
|
From: <php...@li...> - 2009-01-03 17:00:05
|
Hi,
can you please give an example which demonstrates the problem?
> Should PHP handle everyting as a string and type casting be
> done in Java?
That's the only type that PHP supports, anyway. :)
> For example I have a Sql query being called from Java. PHP
> passes a
> string and an int to the Java routine and the Java routine
> runs the SQL query and returns a double.
The bridge will return a proxy for the result, which can be evaluated as usual:
either
echo (int)(string)$sqlResult;
or
echo java_values($sqlResult);
Note that the first line above might be wrong on 32 bit machines, where PHP int values have a limited range. Use (double)(string)$sqlResult instead.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2009-01-02 20:39:55
|
This is not a Bridge problem, more of a question. I am using the Java Bridge to access database servers from PHP. Type casting is driving me nuts. Does anyone have a preferred method of handling this? Should PHP handle everyting as a string and type casting be done in Java? I find the types are "difficult" when trying to pass objects. Should everything be handled as primitives? For example I have a Sql query being called from Java. PHP passes a string and an int to the Java routine and the Java routine runs the SQL query and returns a double. I have tried several different approaches and so far it isn't happy. Any suggestions? Charles Shaffer Senior Analyst NTN-Bower Corporation |
|
From: <php...@li...> - 2008-12-31 10:03:18
|
Hi,
The bridge can and should only be used to connect a http front-end with a j2ee back-end within the local intranet. If there's a firewall between them, channel redirects will not work. Please see the README "security" section for details.
To access a remote service via the internet, use SOAP or RMI/IIOP instead. The source download contains an example which shows how to use Java SOAP bindings to access a remote service and how to access EJB session beans.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-31 02:06:40
|
As a follow up to my earlier message php error logs contain the following:
Stack trace:
#0 http://12.254.254.53:8080/JavaBridge/java/Java.inc(1181):
java_HttpHandler->getChannel('9267')
#1 http://12.254.254.53:8080/JavaBridge/java/Java.inc(1308):
java_HttpHandler->redirect()
#2 http://12.254.254.53:8080/JavaBridge/java/Java.inc(1338):
java_Protocol->redirect()
#3 http://12.254.254.53:8080/JavaBridge/java/Java.inc(1371):
java_Protocol->finish()
#4 http://12.254.254.53:8080/JavaBridge/java/Java.inc(679):
java_Protocol->createObjectEnd()
#5 http://12.254.254.53:8080/JavaBridge/java/Java.inc(2097):
java_Client->createObject('java.lang.Strin...', Array)
#6 /var/www/html/java/test.php(6): Java->Java('java.lang.Strin...',
'HelloWorld')
#7 {main}
thrown in http://12.254.254.53:8080/JavaBridge/java/Java.inc
<http://12.108.64.53:8080/JavaBridge/java/Java.inc%20on%20line%201164> on
line 1164
Does anyone have any suggestions based on these entries?
Jeff
|
|
From: <php...@li...> - 2008-12-30 23:02:08
|
It seems that trying
$string = new Java("java.lang.String", "HelloWorld");
Causes the max script execution time to timeout before it get a response
from tomcat.
Jeff
On Tue, 2008-12-30 at 15:37 -0700,
php...@li... wrote:
> Thanks Peter. I found that information in the /JavaBridge/settings.php
> and was just trying to figure out where to turn it on. That was a big
> help. The PHP side is fine I was missing that on the tomcat side.
>
> Jeff
>
>
>
> On Tue, 2008-12-30 at 14:30 -0800,
> php...@li... wrote:
> > IBM has had a good introduction: http://www.ibm.com/developerworks/aix/library/au-javaphpaix5/index.html#resources
> >
> >
> > >From their article:
> >
> > Listing 6. Uncommenting the block to allow remote access to Java classes
> > <init-param>
> > <param-name>promiscuous</param-name>
> > <param-value>On</param-value>
> > </init-param>...
> >
> > Your PHP Java Bridge installation works by importing a PHP include file directly
> > from the remote Java application server. Unfortunately, just as the PHP Java
> > Bridge wouldn't allow remote access, default PHP installations ban the remote
> > inclusion of files, as it is a potential security risk.
> >
> > You need to enable two PHP configuration parameters,
> > allow_url_fopen, which allows you to open a remote file
> > as if it were a local one, and allow_url_include, which
> > enables you to include remote PHP files to import code.
> > ;;;;;;;;;;;;;;;;;;
> > ; Fopen wrappers ;
> > ;;;;;;;;;;;;;;;;;;
> >
> > ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
> > allow_url_fopen = On
> > allow_url_include = On
> > ...
> >
> > Listing 9. Creating a file on your Web server
> >
> > <?
> > require_once("http://sulaco.mcslp.pri:8080/JavaBridge/java/Java.inc");
> > $System = new Java("java.lang.System");
> > print_r($System->getProperties());
> > ?>
> >
> >
> > Peter
> >
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > php-java-bridge-users mailing list
> > php...@li...
> > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2008-12-30 22:37:17
|
Thanks Peter. I found that information in the /JavaBridge/settings.php and was just trying to figure out where to turn it on. That was a big help. The PHP side is fine I was missing that on the tomcat side. Jeff On Tue, 2008-12-30 at 14:30 -0800, php...@li... wrote: > IBM has had a good introduction: http://www.ibm.com/developerworks/aix/library/au-javaphpaix5/index.html#resources > > > >From their article: > > Listing 6. Uncommenting the block to allow remote access to Java classes > <init-param> > <param-name>promiscuous</param-name> > <param-value>On</param-value> > </init-param>... > > Your PHP Java Bridge installation works by importing a PHP include file directly > from the remote Java application server. Unfortunately, just as the PHP Java > Bridge wouldn't allow remote access, default PHP installations ban the remote > inclusion of files, as it is a potential security risk. > > You need to enable two PHP configuration parameters, > allow_url_fopen, which allows you to open a remote file > as if it were a local one, and allow_url_include, which > enables you to include remote PHP files to import code. > ;;;;;;;;;;;;;;;;;; > ; Fopen wrappers ; > ;;;;;;;;;;;;;;;;;; > > ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. > allow_url_fopen = On > allow_url_include = On > ... > > Listing 9. Creating a file on your Web server > > <? > require_once("http://sulaco.mcslp.pri:8080/JavaBridge/java/Java.inc"); > $System = new Java("java.lang.System"); > print_r($System->getProperties()); > ?> > > > Peter > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2008-12-30 22:30:45
|
IBM has had a good introduction: http://www.ibm.com/developerworks/aix/library/au-javaphpaix5/index.html#resources >From their article: Listing 6. Uncommenting the block to allow remote access to Java classes <init-param> <param-name>promiscuous</param-name> <param-value>On</param-value> </init-param>... Your PHP Java Bridge installation works by importing a PHP include file directly from the remote Java application server. Unfortunately, just as the PHP Java Bridge wouldn't allow remote access, default PHP installations ban the remote inclusion of files, as it is a potential security risk. You need to enable two PHP configuration parameters, allow_url_fopen, which allows you to open a remote file as if it were a local one, and allow_url_include, which enables you to include remote PHP files to import code. ;;;;;;;;;;;;;;;;;; ; Fopen wrappers ; ;;;;;;;;;;;;;;;;;; ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On allow_url_include = On ... Listing 9. Creating a file on your Web server <? require_once("http://sulaco.mcslp.pri:8080/JavaBridge/java/Java.inc"); $System = new Java("java.lang.System"); print_r($System->getProperties()); ?> Peter |
|
From: <php...@li...> - 2008-12-30 22:10:51
|
I have the PHP-Java bridge working fine on a single server with the JAVA
Standalone config.
I am trying to get the communication working between my PHP server and my
remote Tomcat. I have copied the war file into the webapps and when
starting tomcat it created it's folder.
In the Java.inc on the tomcat box I have an echo"got to tomcat" so I know
that I am getting to the include. I can't get any of the demos or the code
provided in the readme working.
<?php
ini_set("allow_url_include", 1);
require_once("http://my_remote_tomcat:8080/JavaBridge/java/Java.inc");
$string = new Java("java.lang.String", "HelloWorld");
echo $string;
?>
The only entries in the tomcat logs are:
67.244.244.204 - - [30/Dec/2008:16:19:44 -0500] "GET
/JavaBridge/java/Java.inc HTTP/1.0" 200 66991
67.244.244.204 - - [30/Dec/2008:16:20:00 -0500] "PUT
/JavaBridge/JavaBridge.phpjavabridge HTTP/1.0" 200 43
When I startup the JavaBridge.jar I get the same results as when I'm using
Tomcat.
TIA, Jeff
|
|
From: <php...@li...> - 2008-12-30 16:13:25
|
Thnks a lot. It Works!
/*CORRECT CODE*/
$exportManager = new
Java("net.sf.jasperreports.engine.export.JRRtfExporter");
$file = new Java("java.io.File",realpath(".")."/"."informe.rtf");
$pr = new
JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
$exportManager->setParameter($pr->JASPER_PRINT,$jasperPrint);
$exportManager->setParameter($pr->OUTPUT_FILE,$file);
$exportManager->exportReport();
2008/12/30 <php...@li...>
> Try this
>
> $exportManager = new
> Java ("net.sf.jasperreports.engine.export.JRRtfExporter");
>
> // note that it is not JavaClass but Java
>
> The following code that you have in PHP
> $exportManager = new
> JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
>
> is equivalent to the following Java Code
> exportManager = JRRtfExporter.class;
>
> Use new JavaClass("classname) to access static methods and variables and
> new
> Java("classname") to use instance method and variables.
>
> -Ajit
>
> -----Original Message-----
> From: php...@li...
> [mailto:php...@li...]
> Sent: Monday, December 29, 2008 5:29 PM
> To: php...@li...
> Subject: [Php-java-bridge-users] Urgent: Jasper report problem
>
> Im trying to get that in php:
>
> /*JAVA CODE*/
>
> JRRtfExporter exporter = new JRRtfExporter();
> exporter.setParameter(JRExporterParameter.JASPER_PRINT, masterPrint);
> exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sPathRTF);
> exporter.exportReport();
>
> /*MY PHP JAVA BRIDGE IMPLEMENTATION*/
>
> $exportManager = new
> JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
> $exportManagerParam = new
> JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
> $outputPath = realpath(".")."/"."informe.rtf";
>
> $exportManager->setParameter($exportManagerParam->JASPER_PRINT,$jasperPrint)
> ;
>
> $exportManager->setParameter($exportManagerParam->OUPUT_FILE_NAME,$outputPat
> h);
> $exportManager->exportReport();
>
> /*output*/
> *Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
> [[c:JRRtfExporter]]->setParameter([o:JRExporterParameter],
> [o:JasperPrint]).
> Cause: java.lang.NoSuchMethodException:
> setParameter([o:JRExporterParameter], [o:JasperPrint]). Candidates: [] VM:
> 1.6.0_07@http://java.sun.com/" at: #-5
> php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1059) #-4
> php.java.bridge.Request.handleRequest(Request.java:405) #-3
> php.java.bridge.Request.handleRequests(Request.java:481) #0
> C:\wamp\www\pruebas\jasper\java\Java.inc(337):
> java_ThrowExceptionProxyFactory->getProxy(24, 'net.sf.jasperre...',
> 'setParameter([o...', true) #1
> C:\wamp\www\pruebas\jasper\java\Java.inc(494): java_Arg->getResult(true) #2
> C:\wamp\www\pruebas\jasper\java\Java.inc(500):
> java_Client->getWrappedResult(true) #3
> C:\wamp\www\pruebas\jasper\java\Java.inc(704): java_Client->getResult() #4
> C:\wamp\www\pruebas\jasper\java\Java.inc(1889):
> java_Client->invokeMethod(21, 'setParameter', Array) #5
> C:\wamp\www\pruebas\jasper\java\Java.inc(2007): java_JavaProxy->_ in
> C:\wamp\www\pruebas\jasper\java\Java.inc on line 300*
>
> *¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT STATIC ATTRIBUTE IN
> PHP
> JAVA BRIDGE???*
>
> Thanks for your guide and help
>
> ----------------------------------------------------------------------------
> --
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
--
Saludos afectuosos,
Israel González S
---------------
Gerente General Better Choice Ltda - Software Estratégico a Medida
Ingenieria Civil Industrial en Tecnologias de Información UC.
------------------------
Office: (56-2) 551 59 04
Cel: (56- 099) 381 40 58
skype: igonzals
http://www.betterchoice.cl
|
|
From: <php...@li...> - 2008-12-30 16:09:52
|
Hi,
> Sorry but Class has method.
I am sorry, but I don't understand this sentence. According to the link you have posted there is no such procedure, it's a method, not a procedure. So you must call it as accordingly.
> The method is inherited from another class
Methods can be inherited, procedures can't.
> I found some people with this error in Google and with no
> success in solution.
Too bad. They should have looked at the PHP/Java Bridge documentation first.
Please use the official API, the constructors you've used are helper routines and are not even documented, so I wonder how you figured out they exist.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-30 04:13:00
|
Try this
$exportManager = new
Java ("net.sf.jasperreports.engine.export.JRRtfExporter");
// note that it is not JavaClass but Java
The following code that you have in PHP
$exportManager = new
JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
is equivalent to the following Java Code
exportManager = JRRtfExporter.class;
Use new JavaClass("classname) to access static methods and variables and new
Java("classname") to use instance method and variables.
-Ajit
-----Original Message-----
From: php...@li...
[mailto:php...@li...]
Sent: Monday, December 29, 2008 5:29 PM
To: php...@li...
Subject: [Php-java-bridge-users] Urgent: Jasper report problem
Im trying to get that in php:
/*JAVA CODE*/
JRRtfExporter exporter = new JRRtfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, masterPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sPathRTF);
exporter.exportReport();
/*MY PHP JAVA BRIDGE IMPLEMENTATION*/
$exportManager = new
JavaClass("net.sf.jasperreports.engine.export.JRRtfExporter");
$exportManagerParam = new
JavaClass("net.sf.jasperreports.engine.JRExporterParameter");
$outputPath = realpath(".")."/"."informe.rtf";
$exportManager->setParameter($exportManagerParam->JASPER_PRINT,$jasperPrint)
;
$exportManager->setParameter($exportManagerParam->OUPUT_FILE_NAME,$outputPat
h);
$exportManager->exportReport();
/*output*/
*Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
[[c:JRRtfExporter]]->setParameter([o:JRExporterParameter], [o:JasperPrint]).
Cause: java.lang.NoSuchMethodException:
setParameter([o:JRExporterParameter], [o:JasperPrint]). Candidates: [] VM:
1.6.0_07@http://java.sun.com/" at: #-5
php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1059) #-4
php.java.bridge.Request.handleRequest(Request.java:405) #-3
php.java.bridge.Request.handleRequests(Request.java:481) #0
C:\wamp\www\pruebas\jasper\java\Java.inc(337):
java_ThrowExceptionProxyFactory->getProxy(24, 'net.sf.jasperre...',
'setParameter([o...', true) #1
C:\wamp\www\pruebas\jasper\java\Java.inc(494): java_Arg->getResult(true) #2
C:\wamp\www\pruebas\jasper\java\Java.inc(500):
java_Client->getWrappedResult(true) #3
C:\wamp\www\pruebas\jasper\java\Java.inc(704): java_Client->getResult() #4
C:\wamp\www\pruebas\jasper\java\Java.inc(1889):
java_Client->invokeMethod(21, 'setParameter', Array) #5
C:\wamp\www\pruebas\jasper\java\Java.inc(2007): java_JavaProxy->_ in
C:\wamp\www\pruebas\jasper\java\Java.inc on line 300*
*¿¿HOW TO IMPLEMENT JRExporterParameter.JASPER_PRINT STATIC ATTRIBUTE IN PHP
JAVA BRIDGE???*
Thanks for your guide and help
----------------------------------------------------------------------------
--
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|