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
(4) |
3
(10) |
4
(1) |
5
|
6
(1) |
|
7
|
8
(4) |
9
(3) |
10
(1) |
11
(1) |
12
|
13
(1) |
|
14
(2) |
15
|
16
|
17
|
18
(4) |
19
|
20
(1) |
|
21
|
22
(2) |
23
(2) |
24
(2) |
25
(2) |
26
(3) |
27
|
|
28
|
29
|
30
|
|
|
|
|
|
From: <php...@li...> - 2008-09-25 19:39:12
|
Hi,
> I am short on time right now to sort out the PUT
> permission. I'll take
Just deinstall mod_jk and it should work.
> to re-configure PHP
> to support PUT requests.
Not really. Tomcat and the PHPJavaServlet do support put, get and post requests. However, when mod_jk is installed, which is a deprecated method to connect apache with tomcat, the back end denies PUT requests in order to disallow internet clients to modify the web content.
> java-related code; where the php based front end calls a
> JAVA based backend.
You have two options: either start the built-in servlet engine with java -jar JavaBridge.jar or use a real servlet engine, for example tomcat, jetty, Oracle, IBM WebSphere, ...
[the other way 'round...]
> - I have an existing PHP based application, both backend
> and frontend.
> - I want to create a JAVA based front end that can talk to
> the PHP based
> backend
That's trivial, if you use the JSR 223 API.
For example:
jrunscript -classpath JavaBridge.jar -l php-interactive
> function toString() {return "hello Java, I am PHP";}
> echo java_closure();
=> hello Java, I am PHP
[to run the above example make sure that JavaBridge.jar and php-script.jar
is in the current working directory and that jre/lib/ext does not contain
JavaBridge.jar and php-script.jar -- Java doesn't have a module system, please
see our README section Java Platform Issues for details. Use .NET or Mono if you
don't like how Java works around that problem... ]
> * Copied the created "JavaBridge.jar" and
> "php-script.jar" from the
> "ext" folder to the J2SE library path
> (specifically the 'jre/lib/ext'
> directory)
Right.
> * opened Netbeans IDE
[...]
> public class HelloWorld {
>
> public static void main(String[] args) {
>
> String l = "3";
>
> System.setProperty("php.java.bridge.default_log_level",
> l);
>
> System.setProperty("php.java.bridge.default_log_file",
> "");
>
> System.setProperty("php.java.bridge.php_exec",
> "php-cgi");
>
> try {
> InvocablePhpScriptEngine engine = new
> InvocablePhpScriptEngine();
> String s = "<?php
> extension_loaded('java')||@dl('java.so')||@dl('php_java.dll');
> echo
> 'HelloWorld!\n';
> java_context()->call(java_closure())
> ||die('oops!');?>";
>
> engine.eval(new StringReader(s));
> String name = (String)
> ((Invocable)engine).invokeFunction("java_get_server_name",
> new Object[]{});
> System.out.println("PHP/Java communication
> port: " + name);
>
> }
>
> //engine.release();
> engine.eval((Reader)null);
>
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> * Compiled the code, which went fine
The above example contains a try/catch statement with two closing braces. Either netbeans is a really bad programming editor or the above example is not the code you've tested.
I fixed the error and ran the following code in eclipse:
package test;
import java.io.Reader;
import java.io.StringReader;
import javax.script.Invocable;
import php.java.script.InvocablePhpScriptEngine;
public class HelloWorld {
public static void main(String[] args) {
String l = "3";
System.setProperty("php.java.bridge.default_log_level", l);
System.setProperty("php.java.bridge.default_log_file", "");
System.setProperty("php.java.bridge.php_exec", "php-cgi");
try {
InvocablePhpScriptEngine engine = new InvocablePhpScriptEngine();
String s = "<?php echo 'HelloWorld!\n'; ?>";
engine.eval(new StringReader(s));
String name = (String)
((Invocable)engine).invokeFunction("java_get_server_name", new Object[]{});
System.out.println("PHP/Java communication port: " + name);
engine.eval((Reader)null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
The result:
PHP/Java communication port: 127.0.0.1:9267
HelloWorld!
> java.lang.NullPointerException
The null pointer exception is because the eval failed. Or eval has never been called.
Regards,
Jost Boekemeier
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
|
|
From: <php...@li...> - 2008-09-25 15:06:30
|
Hi,
I am short on time right now to sort out the PUT permission. I'll take
another look at it when I can. I AM using a standard tomcat installation to
which I deployed the war file, but obviously I'll need to re-configure PHP
to support PUT requests.
Putting that aside for a moment though, my main intention for using the
bridge would not be to write new PHP files containing a mix of php and
java-related code; where the php based front end calls a JAVA based backend.
I am solely interested really in the following:
- I have an existing PHP based application, both backend and frontend.
- I want to create a JAVA based front end that can talk to the PHP based
backend
In other words, I want to evaluate PHP code from a JAVA program using a PHP
script engine and use the results in the JAVA program. Preferable I want to
do this in such a way that no changes to the existing PHP code are needed
(i.e. no inclusion of java related constructs in the PHP code, etceteras),
however if this is the only way to do it I'll naturally consider it. Any
info on the exact support offered by the bridge would be nice.
Following the instructions in the Installation.J2SE file I did the following
to setup the bridge:
* Have Java 1.6.0_07.
* Have PHP 5.2.2.
* Downloaded and extracted the php-java-bridge_j2ee*.zip archive into a
folder and typed: java -classpath JavaBridge.war TestInstallation
* Copied the created "JavaBridge.jar" and "php-script.jar" from the
"ext" folder to the J2SE library path (specifically the 'jre/lib/ext'
directory)
* opened Netbeans IDE
* created the example in helloworld.java via Netbeans, being:
public class HelloWorld {
public static void main(String[] args) {
String l = "3";
System.setProperty("php.java.bridge.default_log_level", l);
System.setProperty("php.java.bridge.default_log_file", "");
System.setProperty("php.java.bridge.php_exec", "php-cgi");
try {
InvocablePhpScriptEngine engine = new InvocablePhpScriptEngine();
String s = "<?php
extension_loaded('java')||@dl('java.so')||@dl('php_java.dll'); echo
'HelloWorld!\n'; java_context()->call(java_closure())
||die('oops!');?>";
engine.eval(new StringReader(s));
String name = (String)
((Invocable)engine).invokeFunction("java_get_server_name", new Object[]{});
System.out.println("PHP/Java communication port: " + name);
}
//engine.release();
engine.eval((Reader)null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
* Compiled the code, which went fine
* Ran the code, leading to:
Exception in thread "main" java.lang.NullPointerException
at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:636)
at
php.java.script.InvocablePhpScriptEngine.invoke(InvocablePhpScriptEngine.java:116)
at
php.java.script.InvocablePhpScriptEngine.invoke(InvocablePhpScriptEngine.java:100)
at
php.java.script.InvocablePhpScriptEngine.invokeFunction(InvocablePhpScriptEngine.java:108)
As a second test I also ran SimpleInvocation.java:
public class Main {
public static void main(String[] args) throws Exception {
ScriptEngineManager m = new ScriptEngineManager();
ScriptEngine e = m.getEngineByName("php-invocable");
Invocable i = (Invocable)e;
i.invokeFunction("phpinfo", new Object[0]);
System.exit(0);
}
}
This leads to the same error.
What am I doing wrong? No php_java.dll is loaded in php.ini.
Thanks for any help,
Bart
|