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
|
3
|
4
(3) |
|
5
|
6
(4) |
7
(1) |
8
(1) |
9
|
10
(1) |
11
(5) |
|
12
(4) |
13
(1) |
14
(2) |
15
(2) |
16
(1) |
17
|
18
|
|
19
|
20
(4) |
21
(3) |
22
(6) |
23
(1) |
24
(1) |
25
(4) |
|
26
(1) |
27
(2) |
28
(3) |
29
(1) |
30
|
|
|
|
From: <php...@li...> - 2010-09-29 19:28:30
|
Hi,
if your class is there, you can access it from php.
Where is your code?
On 9/28/10, php...@li...
<php...@li...> wrote:
> Here's my test JSP page (i don't use jsp, so my jsp code isn't great, but
> its good enough to test)
>
> i rewrote the TestClass in a package jspTest as well.
> The following works perfectly in tomcat....but i can't call the class from
> PHP, which is what i need.
>
> <%@ page import= "jspTest.TestClass" %>
> <jsp:useBean id= "MyTest" class= "jspTest.TestClass" scope= "session" />
>
> <html>
> <head><title>Number Guess</title></head>
> <body bgcolor="white">
> <font size=4>
>
> <% MyTest.setTestString("From JSP"); %>
>
> Value set to <%= MyTest.getTestString() %>
>
> </font>
> </body>
> </html>
>
> Another thing is, my apache server for PHP does allow me to turn on the
> allow_url_include option....i've changed in php.ini (both allow_url_include
> & fopen) no effect.
> would this be an issue?
>
> with this php/java bridge (java_include is a depreciated method.....so
> require_once("java/Java.inc") must be there and the you instantiate the java
> class immediately, right?)
> --------------------------------------------------
> From: <php...@li...>
> Sent: Tuesday, September 28, 2010 9:08 PM
> To: <php...@li...>
> Subject: Re: [Php-java-bridge-users] Using my own java classes with
> php/javabridge
>
>> Sounds as if the class .test does not exist. Use package name and see
>> FAQ fo details.
>>
>>
>>
>> On 9/28/10, php...@li...
>> <php...@li...> wrote:
>>> This is what the error log says....I took the code out of try...catch
>>> block
>>> so it could log the error.
>>>
>>> php[1992]
>>> PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception:
>>> CreateInstance failed: new testClass. Cause:
>>> java.lang.ClassNotFoundException: testClass VM:
>>> 1.6.0_21@http://java.sun.com/" at:
>>> #-30
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
>>> #-29
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
>>> #-28 java.lang.Class.forName0(Native Method)
>>> #-27 java.lang.Class.forName(Unknown Source)
>>> #-26 php.java.bridge.Util.classForName(Util.java:1481)
>>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429)
>>> #-24 php.java.bridge.Request.handleRequest(Request.java:458)
>>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510)
>>> #-22
>>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202)
>>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250)
>>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261)
>>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
>>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files
>>> (x86)\Apache Software
>>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195
>>>
>>> Event Xml:
>>> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>>> <System>
>>> <Provider Name="PHP-5.3.3" />
>>> <EventID Qualifiers="16384">2</EventID>
>>> <Level>4</Level>
>>> <Task>6</Task>
>>> <Keywords>0x80000000000000</Keywords>
>>> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" />
>>> <EventRecordID>26885</EventRecordID>
>>> <Channel>Application</Channel>
>>> <Computer></Computer>
>>> <Security />
>>> </System>
>>> <EventData>
>>> <Data>php[1992]</Data>
>>> <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception:
>>> CreateInstance failed: new testClass. Cause:
>>> java.lang.ClassNotFoundException: testClass VM:
>>> 1.6.0_21@http://java.sun.com/" at:
>>> #-30
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
>>> #-29
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
>>> #-28 java.lang.Class.forName0(Native Method)
>>> #-27 java.lang.Class.forName(Unknown Source)
>>> #-26 php.java.bridge.Util.classForName(Util.java:1481)
>>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429)
>>> #-24 php.java.bridge.Request.handleRequest(Request.java:458)
>>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510)
>>> #-22
>>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202)
>>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250)
>>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261)
>>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
>>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files
>>> (x86)\Apache Software
>>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line
>>> 195</Data>
>>> </EventData>
>>> </Event>
>>>
>>> --------------------------------------------------
>>> From: <php...@li...>
>>> Sent: Monday, September 27, 2010 8:25 PM
>>> To: <php...@li...>
>>> Subject: Re: [Php-java-bridge-users] Using my own java classes with php
>>> /javabridge
>>>
>>>> blank page means "syntax err" check php err log
>>>>
>>>> On 9/26/10, php...@li...
>>>> <php...@li...> wrote:
>>>>> Hi,
>>>>>
>>>>> i'm having issues getting my own java class working with php/java
>>>>> bridge.
>>>>> the bridge works perfect with the sample scripts and a script to get
>>>>> the
>>>>> date and display it, but as soon as i try using my own class, thats
>>>>> when
>>>>> the
>>>>> plot thickens....
>>>>>
>>>>> heres my simple class:
>>>>>
>>>>> public class testClass {
>>>>> private String _testString;
>>>>>
>>>>> public testClass() {
>>>>> }
>>>>>
>>>>> public void SetStringVal (String val) {
>>>>> this._testString = val;
>>>>> }
>>>>>
>>>>> public String GetStringVal() {
>>>>> return this._testString;
>>>>> }
>>>>>
>>>>> }
>>>>>
>>>>> i compiled it, made it into a jar file, then added it to the
>>>>> web-inf/lib
>>>>> folder in the JavaBridge template and deployed it with Tomcat (even
>>>>> restarted tomcat)
>>>>>
>>>>> (i'm using Apache 2.2 for PHP scripts and tomcat for the
>>>>> bridge....works
>>>>> beautifully....)
>>>>>
>>>>> my PHP code:
>>>>>
>>>>> <?php
>>>>> require_once("java/Java.inc");
>>>>>
>>>>> $mClass = new java("testClass");
>>>>>
>>>>> $mClass->SetStringVal("From Java");
>>>>>
>>>>> echo $mClass->GetStringVal() ." to PHP";
>>>>> ?>
>>>>>
>>>>> I assume that i followed the steps correctly, but no luck....i just get
>>>>>
>>>>> a
>>>>> blank page....
>>>>>
>>>>> any help would be appreciated...
>>>>> ------------------------------------------------------------------------------
>>>>> Start uncovering the many advantages of virtual appliances
>>>>> and start using them to simplify application deployment and
>>>>> accelerate your shift to cloud computing.
>>>>> http://p.sf.net/sfu/novell-sfdev2dev
>>>>> _______________________________________________
>>>>> php-java-bridge-users mailing list
>>>>> php...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start uncovering the many advantages of virtual appliances
>>>> and start using them to simplify application deployment and
>>>> accelerate your shift to cloud computing.
>>>> http://p.sf.net/sfu/novell-sfdev2dev
>>>> _______________________________________________
>>>> php-java-bridge-users mailing list
>>>> php...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> php-java-bridge-users mailing list
>>> php...@li...
>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> php-java-bridge-users mailing list
>> php...@li...
>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|
|
From: <php...@li...> - 2010-09-28 20:46:04
|
Here's my test JSP page (i don't use jsp, so my jsp code isn't great, but
its good enough to test)
i rewrote the TestClass in a package jspTest as well.
The following works perfectly in tomcat....but i can't call the class from
PHP, which is what i need.
<%@ page import= "jspTest.TestClass" %>
<jsp:useBean id= "MyTest" class= "jspTest.TestClass" scope= "session" />
<html>
<head><title>Number Guess</title></head>
<body bgcolor="white">
<font size=4>
<% MyTest.setTestString("From JSP"); %>
Value set to <%= MyTest.getTestString() %>
</font>
</body>
</html>
Another thing is, my apache server for PHP does allow me to turn on the
allow_url_include option....i've changed in php.ini (both allow_url_include
& fopen) no effect.
would this be an issue?
with this php/java bridge (java_include is a depreciated method.....so
require_once("java/Java.inc") must be there and the you instantiate the java
class immediately, right?)
--------------------------------------------------
From: <php...@li...>
Sent: Tuesday, September 28, 2010 9:08 PM
To: <php...@li...>
Subject: Re: [Php-java-bridge-users] Using my own java classes with
php/javabridge
> Sounds as if the class .test does not exist. Use package name and see
> FAQ fo details.
>
>
>
> On 9/28/10, php...@li...
> <php...@li...> wrote:
>> This is what the error log says....I took the code out of try...catch
>> block
>> so it could log the error.
>>
>> php[1992]
>> PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception:
>> CreateInstance failed: new testClass. Cause:
>> java.lang.ClassNotFoundException: testClass VM:
>> 1.6.0_21@http://java.sun.com/" at:
>> #-30
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
>> #-29
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
>> #-28 java.lang.Class.forName0(Native Method)
>> #-27 java.lang.Class.forName(Unknown Source)
>> #-26 php.java.bridge.Util.classForName(Util.java:1481)
>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429)
>> #-24 php.java.bridge.Request.handleRequest(Request.java:458)
>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510)
>> #-22
>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202)
>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250)
>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261)
>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files
>> (x86)\Apache Software
>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195
>>
>> Event Xml:
>> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
>> <System>
>> <Provider Name="PHP-5.3.3" />
>> <EventID Qualifiers="16384">2</EventID>
>> <Level>4</Level>
>> <Task>6</Task>
>> <Keywords>0x80000000000000</Keywords>
>> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" />
>> <EventRecordID>26885</EventRecordID>
>> <Channel>Application</Channel>
>> <Computer></Computer>
>> <Security />
>> </System>
>> <EventData>
>> <Data>php[1992]</Data>
>> <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception:
>> CreateInstance failed: new testClass. Cause:
>> java.lang.ClassNotFoundException: testClass VM:
>> 1.6.0_21@http://java.sun.com/" at:
>> #-30
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
>> #-29
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
>> #-28 java.lang.Class.forName0(Native Method)
>> #-27 java.lang.Class.forName(Unknown Source)
>> #-26 php.java.bridge.Util.classForName(Util.java:1481)
>> #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429)
>> #-24 php.java.bridge.Request.handleRequest(Request.java:458)
>> #-23 php.java.bridge.Request.handleOneRequest(Request.java:510)
>> #-22
>> php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202)
>> #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250)
>> #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261)
>> #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
>> #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files
>> (x86)\Apache Software
>> Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line
>> 195</Data>
>> </EventData>
>> </Event>
>>
>> --------------------------------------------------
>> From: <php...@li...>
>> Sent: Monday, September 27, 2010 8:25 PM
>> To: <php...@li...>
>> Subject: Re: [Php-java-bridge-users] Using my own java classes with php
>> /javabridge
>>
>>> blank page means "syntax err" check php err log
>>>
>>> On 9/26/10, php...@li...
>>> <php...@li...> wrote:
>>>> Hi,
>>>>
>>>> i'm having issues getting my own java class working with php/java
>>>> bridge.
>>>> the bridge works perfect with the sample scripts and a script to get
>>>> the
>>>> date and display it, but as soon as i try using my own class, thats
>>>> when
>>>> the
>>>> plot thickens....
>>>>
>>>> heres my simple class:
>>>>
>>>> public class testClass {
>>>> private String _testString;
>>>>
>>>> public testClass() {
>>>> }
>>>>
>>>> public void SetStringVal (String val) {
>>>> this._testString = val;
>>>> }
>>>>
>>>> public String GetStringVal() {
>>>> return this._testString;
>>>> }
>>>>
>>>> }
>>>>
>>>> i compiled it, made it into a jar file, then added it to the
>>>> web-inf/lib
>>>> folder in the JavaBridge template and deployed it with Tomcat (even
>>>> restarted tomcat)
>>>>
>>>> (i'm using Apache 2.2 for PHP scripts and tomcat for the
>>>> bridge....works
>>>> beautifully....)
>>>>
>>>> my PHP code:
>>>>
>>>> <?php
>>>> require_once("java/Java.inc");
>>>>
>>>> $mClass = new java("testClass");
>>>>
>>>> $mClass->SetStringVal("From Java");
>>>>
>>>> echo $mClass->GetStringVal() ." to PHP";
>>>> ?>
>>>>
>>>> I assume that i followed the steps correctly, but no luck....i just get
>>>> a
>>>> blank page....
>>>>
>>>> any help would be appreciated...
>>>> ------------------------------------------------------------------------------
>>>> Start uncovering the many advantages of virtual appliances
>>>> and start using them to simplify application deployment and
>>>> accelerate your shift to cloud computing.
>>>> http://p.sf.net/sfu/novell-sfdev2dev
>>>> _______________________________________________
>>>> php-java-bridge-users mailing list
>>>> php...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> php-java-bridge-users mailing list
>>> php...@li...
>>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> php-java-bridge-users mailing list
>> php...@li...
>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|
|
From: <php...@li...> - 2010-09-28 19:08:46
|
Sounds as if the class .test does not exist. Use package name and see FAQ fo details. On 9/28/10, php...@li... <php...@li...> wrote: > This is what the error log says....I took the code out of try...catch block > so it could log the error. > > php[1992] > PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: > CreateInstance failed: new testClass. Cause: > java.lang.ClassNotFoundException: testClass VM: > 1.6.0_21@http://java.sun.com/" at: > #-30 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) > #-29 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) > #-28 java.lang.Class.forName0(Native Method) > #-27 java.lang.Class.forName(Unknown Source) > #-26 php.java.bridge.Util.classForName(Util.java:1481) > #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) > #-24 php.java.bridge.Request.handleRequest(Request.java:458) > #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) > #-22 > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) > #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) > #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files > (x86)\Apache Software > Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 > > Event Xml: > <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> > <System> > <Provider Name="PHP-5.3.3" /> > <EventID Qualifiers="16384">2</EventID> > <Level>4</Level> > <Task>6</Task> > <Keywords>0x80000000000000</Keywords> > <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> > <EventRecordID>26885</EventRecordID> > <Channel>Application</Channel> > <Computer></Computer> > <Security /> > </System> > <EventData> > <Data>php[1992]</Data> > <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: > CreateInstance failed: new testClass. Cause: > java.lang.ClassNotFoundException: testClass VM: > 1.6.0_21@http://java.sun.com/" at: > #-30 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) > #-29 > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) > #-28 java.lang.Class.forName0(Native Method) > #-27 java.lang.Class.forName(Unknown Source) > #-26 php.java.bridge.Util.classForName(Util.java:1481) > #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) > #-24 php.java.bridge.Request.handleRequest(Request.java:458) > #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) > #-22 > php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) > #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) > #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) > #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) > #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files > (x86)\Apache Software > Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195</Data> > </EventData> > </Event> > > -------------------------------------------------- > From: <php...@li...> > Sent: Monday, September 27, 2010 8:25 PM > To: <php...@li...> > Subject: Re: [Php-java-bridge-users] Using my own java classes with php > /javabridge > >> blank page means "syntax err" check php err log >> >> On 9/26/10, php...@li... >> <php...@li...> wrote: >>> Hi, >>> >>> i'm having issues getting my own java class working with php/java bridge. >>> the bridge works perfect with the sample scripts and a script to get the >>> date and display it, but as soon as i try using my own class, thats when >>> the >>> plot thickens.... >>> >>> heres my simple class: >>> >>> public class testClass { >>> private String _testString; >>> >>> public testClass() { >>> } >>> >>> public void SetStringVal (String val) { >>> this._testString = val; >>> } >>> >>> public String GetStringVal() { >>> return this._testString; >>> } >>> >>> } >>> >>> i compiled it, made it into a jar file, then added it to the web-inf/lib >>> folder in the JavaBridge template and deployed it with Tomcat (even >>> restarted tomcat) >>> >>> (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works >>> beautifully....) >>> >>> my PHP code: >>> >>> <?php >>> require_once("java/Java.inc"); >>> >>> $mClass = new java("testClass"); >>> >>> $mClass->SetStringVal("From Java"); >>> >>> echo $mClass->GetStringVal() ." to PHP"; >>> ?> >>> >>> I assume that i followed the steps correctly, but no luck....i just get a >>> blank page.... >>> >>> any help would be appreciated... >>> ------------------------------------------------------------------------------ >>> Start uncovering the many advantages of virtual appliances >>> and start using them to simplify application deployment and >>> accelerate your shift to cloud computing. >>> http://p.sf.net/sfu/novell-sfdev2dev >>> _______________________________________________ >>> php-java-bridge-users mailing list >>> php...@li... >>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >>> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2010-09-28 16:05:17
|
This is what the error log says....I took the code out of try...catch block so it could log the error. php[1992] PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new testClass. Cause: java.lang.ClassNotFoundException: testClass VM: 1.6.0_21@http://java.sun.com/" at: #-30 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) #-29 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) #-28 java.lang.Class.forName0(Native Method) #-27 java.lang.Class.forName(Unknown Source) #-26 php.java.bridge.Util.classForName(Util.java:1481) #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) #-24 php.java.bridge.Request.handleRequest(Request.java:458) #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) #-22 php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195 Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="PHP-5.3.3" /> <EventID Qualifiers="16384">2</EventID> <Level>4</Level> <Task>6</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2010-09-28T15:51:10.000000000Z" /> <EventRecordID>26885</EventRecordID> <Channel>Application</Channel> <Computer></Computer> <Security /> </System> <EventData> <Data>php[1992]</Data> <Data>PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new testClass. Cause: java.lang.ClassNotFoundException: testClass VM: 1.6.0_21@http://java.sun.com/" at: #-30 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666) #-29 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511) #-28 java.lang.Class.forName0(Native Method) #-27 java.lang.Class.forName(Unknown Source) #-26 php.java.bridge.Util.classForName(Util.java:1481) #-25 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:429) #-24 php.java.bridge.Request.handleRequest(Request.java:458) #-23 php.java.bridge.Request.handleOneRequest(Request.java:510) #-22 php.java.servlet.PhpJavaServlet.handleLocalConnection(PhpJavaServlet.java:202) #-21 php.java.servlet.PhpJavaServlet.handlePut(PhpJavaServlet.java:250) #-20 php.java.servlet.PhpJavaServlet.doPut(PhpJavaServlet.java:261) #-19 javax.servlet.http.HttpServlet.service(HttpServlet.java:644) #-18 javax.servlet.http.HttpServlet.service(Ht in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyTestPHPJava\java\Java.inc on line 195</Data> </EventData> </Event> -------------------------------------------------- From: <php...@li...> Sent: Monday, September 27, 2010 8:25 PM To: <php...@li...> Subject: Re: [Php-java-bridge-users] Using my own java classes with php /javabridge > blank page means "syntax err" check php err log > > On 9/26/10, php...@li... > <php...@li...> wrote: >> Hi, >> >> i'm having issues getting my own java class working with php/java bridge. >> the bridge works perfect with the sample scripts and a script to get the >> date and display it, but as soon as i try using my own class, thats when >> the >> plot thickens.... >> >> heres my simple class: >> >> public class testClass { >> private String _testString; >> >> public testClass() { >> } >> >> public void SetStringVal (String val) { >> this._testString = val; >> } >> >> public String GetStringVal() { >> return this._testString; >> } >> >> } >> >> i compiled it, made it into a jar file, then added it to the web-inf/lib >> folder in the JavaBridge template and deployed it with Tomcat (even >> restarted tomcat) >> >> (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works >> beautifully....) >> >> my PHP code: >> >> <?php >> require_once("java/Java.inc"); >> >> $mClass = new java("testClass"); >> >> $mClass->SetStringVal("From Java"); >> >> echo $mClass->GetStringVal() ." to PHP"; >> ?> >> >> I assume that i followed the steps correctly, but no luck....i just get a >> blank page.... >> >> any help would be appreciated... >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2010-09-27 19:35:19
|
Hi,
can you call the class from JSP?
On 9/26/10, php...@li...
<php...@li...> wrote:
> Hi,
>
> i'm having issues getting my own java class working with php/java bridge.
> the bridge works perfect with the sample scripts and a script to get the
> date and display it, but as soon as i try using my own class, thats when the
> plot thickens....
>
> heres my simple class:
>
> public class testClass {
> private String _testString;
>
> public testClass() {
> }
>
> public void SetStringVal (String val) {
> this._testString = val;
> }
>
> public String GetStringVal() {
> return this._testString;
> }
>
> }
>
> i compiled it, made it into a jar file, then added it to the web-inf/lib
> folder in the JavaBridge template and deployed it with Tomcat (even
> restarted tomcat)
>
> (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works
> beautifully....)
>
> my PHP code:
>
> <?php
> require_once("java/Java.inc");
>
> $mClass = new java("testClass");
>
> $mClass->SetStringVal("From Java");
>
> echo $mClass->GetStringVal() ." to PHP";
> ?>
>
> I assume that i followed the steps correctly, but no luck....i just get a
> blank page....
>
> any help would be appreciated...
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|
|
From: <php...@li...> - 2010-09-27 18:25:49
|
blank page means "syntax err" check php err log
On 9/26/10, php...@li...
<php...@li...> wrote:
> Hi,
>
> i'm having issues getting my own java class working with php/java bridge.
> the bridge works perfect with the sample scripts and a script to get the
> date and display it, but as soon as i try using my own class, thats when the
> plot thickens....
>
> heres my simple class:
>
> public class testClass {
> private String _testString;
>
> public testClass() {
> }
>
> public void SetStringVal (String val) {
> this._testString = val;
> }
>
> public String GetStringVal() {
> return this._testString;
> }
>
> }
>
> i compiled it, made it into a jar file, then added it to the web-inf/lib
> folder in the JavaBridge template and deployed it with Tomcat (even
> restarted tomcat)
>
> (i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works
> beautifully....)
>
> my PHP code:
>
> <?php
> require_once("java/Java.inc");
>
> $mClass = new java("testClass");
>
> $mClass->SetStringVal("From Java");
>
> echo $mClass->GetStringVal() ." to PHP";
> ?>
>
> I assume that i followed the steps correctly, but no luck....i just get a
> blank page....
>
> any help would be appreciated...
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|
|
From: <php...@li...> - 2010-09-26 19:48:15
|
Hi,
i'm having issues getting my own java class working with php/java bridge. the bridge works perfect with the sample scripts and a script to get the date and display it, but as soon as i try using my own class, thats when the plot thickens....
heres my simple class:
public class testClass {
private String _testString;
public testClass() {
}
public void SetStringVal (String val) {
this._testString = val;
}
public String GetStringVal() {
return this._testString;
}
}
i compiled it, made it into a jar file, then added it to the web-inf/lib folder in the JavaBridge template and deployed it with Tomcat (even restarted tomcat)
(i'm using Apache 2.2 for PHP scripts and tomcat for the bridge....works beautifully....)
my PHP code:
<?php
require_once("java/Java.inc");
$mClass = new java("testClass");
$mClass->SetStringVal("From Java");
echo $mClass->GetStringVal() ." to PHP";
?>
I assume that i followed the steps correctly, but no luck....i just get a blank page....
any help would be appreciated...
|
|
From: <php...@li...> - 2010-09-25 10:34:01
|
Hi, this problem has been fixed in version 6.2.1 Regards, Jost Bökemeier On 9/11/10, Jost Boekemeier <jos...@go...> wrote: > Hi, > > I will look at this problem. Please note that the PHP/Java Bridge > currently doesn't use HTTPS to communicate with a JEE back end. > > I will change the behaviour for 6.2.1. > > Regards, > Jost Bökemeier > |
|
From: <php...@li...> - 2010-09-25 10:10:40
|
Hi,
[please excuse the delay]
> instance.getEngine().getContext().setWriter(writer); // wrong! reset by following line
> instance.getEngine().setContext((ScriptContext)new PhpHttpScriptContext(instance.getEngine().getContext(),this,this.getServletContext(),request,response));
> I have been doing more investigations into why the php-java bridge is
> not working as I would expect
The PHP/Java Bridge code is correct. The decorator you've set connects
the writer, reader, errorWriter to the servlet. So your code has no
effect.
Please see the example code I've given.
BTW: For PHP/Java Bridge 6.2.1 I will rename the decorator to
"PhpHttpScriptContext". Please either use your own decorator (copy
PhpHttpCompiledScriptContext.java to your project) or please use the
new name.
The test script I've used is below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<%@ page import="java.io.*" %>
<%@ page import="org.apache.commons.lang.*" %>
<%@page import="javax.script.*" %>
<%@page import="php.java.script.servlet.*" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Example</title>
<%
// My PHP script is defined here....
String phpScript = "";
phpScript += "function pass_to_php_backend($ar) { \n";
phpScript += " print('something'); \n";
phpScript += " //do something useful here...\n";
phpScript += "} \n";
phpScript += "function outputJavaScript() { \n";
phpScript += "$IMConfig = array(); \n";
phpScript += "$IMConfig['allowed_image_extensions'] =
array('jpg','gif','png'); \n";
phpScript += "return pass_to_php_backend($IMConfig); \n";
phpScript += "} \n";
phpScript += "outputJavaScript(); \n";
%>
<%!
private static final CompiledScript script;
static {
try {
script =((Compilable)(new
ScriptEngineManager().getEngineByName("php"))).compile(
"<?php echo eval(java_context()->get('script')); ?>");
} catch (ScriptException e) {
throw new RuntimeException("bleh!");
}
}
// private static final String evalPHP(String arg) {
private String evalPHP(String arg, HttpServletRequest request,
HttpServletResponse response) {
CompiledScript instance
=(CompiledScript)((java.security.cert.CertStoreParameters)script).clone();
instance.getEngine().put("script", arg);
OutputStream out = new ByteArrayOutputStream();
Writer writer = new OutputStreamWriter(out);
instance.getEngine().setContext((ScriptContext)new
PhpHttpScriptContext(instance.getEngine().getContext(),this,this.getServletContext(),request,response));
instance.getEngine().getContext().setWriter(writer);
try {
instance.eval();
} catch (ScriptException e) {
throw new RuntimeException("bleh!");
}
try {
writer.close();
} catch (IOException e) {
throw new RuntimeException("bleh!");
}
String result = out.toString();
return result;
}
%>
<script type="text/javascript">
a = '<%= evalPHP(phpScript, request, response) %>;'
if (a == "") alert("No Output");
else alert("Output = " + a);
<%= evalPHP(phpScript, request, response) %>
</script>
</head>
<body>
hello
</body>
</html>
Regards,
Jost Bökemeier
|
|
From: <php...@li...> - 2010-09-25 08:20:50
|
Hi Theen-Theen, [please excuse the delay] I am sorry, but I could not reproduce this problem with jboss-4.0.3SP1 > - on MacOSX > - php-cgi compiled using Macport. > - latest php-java-bridge > - JBOSS 4.0.3 > - I do not have the doc_root variable set in my php.ini Please upgrade jboss 4.0.3 or please send a bug report to the vendor. Regards, Jost Bökemeier |
|
From: <php...@li...> - 2010-09-25 08:18:18
|
Hi, welcome to the PHP/Java Bridge mailing list. You can find information about the PHP/Java Bridge at http://php-java-bridge.sf.net Regards, Jost Bökemeier |
|
From: <php...@li...> - 2010-09-24 15:53:02
|
Hi, where you can get the file php-5.0-java-x86-windows.dll or java-x86-windows.dll to test the bridge between php and java, and that the war is not found.
Thank's
|
|
From: <php...@li...> - 2010-09-23 17:38:19
|
> am not understanding how http://sourceforge.net/mailarchive/message.php?msg_id=AANLkTikUyejJ_jaZ9XBo2DUL1r9_RK6_W-bCyoByJ_4t%40mail.gmail.com is related to my problem.. It probably isn't. http://localhost:8080/test/env.jsp/tail?a=b => URI /test/env.jsp/tail ServletPath /test/env.jsp PathInfo /tail QueryString a=b a b >env.servletPath = (String) req.getAttribute("javax.servlet.include.servlet_path"); >if (env.servletPath == null) { >env.servletPath = req.getServletPath() + req.getPathInfo(); >} So PATH_INFO should be null for your request. The super.setupRequestVariables() sets env.servletPath = (String) req.getAttribute("javax.servlet.include.servlet_path"); if (env.servletPath == null) env.servletPath = req.getServletPath(); which is equivalent to your code. Regards, Jost Bökemeier |
|
From: <php...@li...> - 2010-09-22 17:59:01
|
I downloeded 6.2.1.RC3 http://sourceforge.net/projects/php-java-bridge/files/Binary%20package/php-java-bridge_6.2.1rc3/exploded/JavaBridge.jar/download We use Tomcat with our JBOSS. I am not understanding how http://sourceforge.net/mailarchive/message.php?msg_id=AANLkTikUyejJ_jaZ9XBo2DUL1r9_RK6_W-bCyoByJ_4t%40mail.gmail.com is related to my problem... Please elaborate. Thanks! Theen-Theen On Sep 22, 2010, at 10:01 AM, <php...@li...> wrote: > Hi, > > you say "latest" PHP/Java Bridge version. I assume it is version > 6.2.1RC3. -- latest stable is 5.4.something. > > >> env.servletPath = (String) req.getAttribute("javax.servlet.include.servlet_path"); > > We've made a change regarding this, please see > http://sourceforge.net/mailarchive/message.php?msg_id=AANLkTikUyejJ_jaZ9XBo2DUL1r9_RK6_W-bCyoByJ_4t%40mail.gmail.com > > >> JBOSS, and its own servlet container. > > I don't think jboss uses its own servlet container. Do you use jetty or tomcat? > > > Regards, > Jost Bökemeier > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
|
From: <php...@li...> - 2010-09-22 17:08:30
|
> ? Is this the way? Well the "destop guide" shows how to extend your Java desktop application to allow scripting. For web applications please follow the other guide (web front-end => servlet/jee back-end). You *can* use JavaBridge.jar instead of a servlet back end. But note that the standalone JavaBridge.jar container isn't as efficient as a servlet or JEE container. Regards, Jost Bökemeier |
|
From: <php...@li...> - 2010-09-22 17:01:11
|
Hi,
you say "latest" PHP/Java Bridge version. I assume it is version
6.2.1RC3. -- latest stable is 5.4.something.
> env.servletPath = (String) req.getAttribute("javax.servlet.include.servlet_path");
We've made a change regarding this, please see
http://sourceforge.net/mailarchive/message.php?msg_id=AANLkTikUyejJ_jaZ9XBo2DUL1r9_RK6_W-bCyoByJ_4t%40mail.gmail.com
> JBOSS, and its own servlet container.
I don't think jboss uses its own servlet container. Do you use jetty or tomcat?
Regards,
Jost Bökemeier
|
|
From: <php...@li...> - 2010-09-22 16:35:04
|
Hi,
JBOSS, and its own servlet container. I wrote a servlet that replaced this in FastCGIServlet
protected void setupRequestVariables(HttpServletRequest req, Environment env) {
super.setupRequestVariables(req, env);
env.servletPath = (String) req.getAttribute("javax.servlet.include.servlet_path");
if (env.servletPath == null) {
env.servletPath = req.getServletPath() + req.getPathInfo();
}
}
And I can get to pages with https://localhost:8080/ctx/directory/directory/test.php now.
But not sure if I should do that ...
PS. I don't know how to reply to my own email in digest mode...
Thanks.
Theen-Theen
Message: 5
Date: Wed, 22 Sep 2010 08:54:18 +0200
From: php...@li...<mailto:php...@li...>
Subject: Re: [Php-java-bridge-users] No input file specified.
To: php...@li...<mailto:php...@li...>
Message-ID:
<AAN...@ma...<mailto:AAN...@ma...>>
Content-Type: text/plain; charset=UTF-8
jboss/jetty or jboss/tomcat?
On Sep 21, 2010, at 1:40 PM, Theen-Theen Tan wrote:
Hi,
I am running
- on MacOSX
- php-cgi compiled using Macport.
- latest php-java-bridge
- JBOSS 4.0.3
- I do not have the doc_root variable set in my php.ini
I can access the test.php page (which is a call to phpinfo) fine from php-cgi directly, or when I place it one level from my web app root. But I get "No input file specified." on the page when I place the file under a directory.
Here are the various environment parameters that is useful for debugging. For me, it looks like both SCRIPT_NAME and SCRIPT_FILENAME are wrong.
This fails
https://localhost:8080/ctx/directory/directory/test.php
PATH_INFO=/test.php
PATH_TRANSLATED=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/test.php
SCRIPT_NAME=/ctx/directory
SCRIPT_FILENAME=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/directory
This works
https://localhost:8080/ctx/test.php
SCRIPT_NAME=/ctx/test.php
SCRIPT_FILENAME=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/test.php
What can be done?
Thanks.
Theen-Theen
|
|
From: <php...@li...> - 2010-09-22 12:08:39
|
Hello,
I'm new to php/java bridge and I'm wondering if I could use this fantastic project in a work of mine. The "problem" is the follow:
I have to create a Webservices running on a customized-centos to offer an access to some business operation. My goal is to write the webservices in PHP (as I've already an Apache running on my distro) and write the business operations in java (to avoid my code to be read or edited). Business operations would be a collection of classes rappresenting database entities, classes to manipulate them and some other stuff. I could say I want to create a java-layer between php-webservices and database server.
Reading at the installation guide, I've found out one could create a "desktop" java client and call it's methods and classes within php. I don't understand if it's my scenario (webservices + persistence-layer) or it's completely different. So, do I need to write something like the follow:
- a java-main class like
public class Test {
public static final String JAVABRIDGE_PORT="8087";
static final php.java.bridge.JavaBridgeRunner runner =
php.java.bridge.JavaBridgeRunner.getInstance(JAVABRIDGE_PORT);
public static void main(String args[]) throws Exception {
//some initializations go here?
runner.waitFor();
System.exit(0);
}
//and then write a contract for php
public Model getModel(String modelName)..
public boolean someStuff()
}
public interface Model{
public boolean save();
}
-and within php
<?php
require_once("http://localhost:8087/JavaBridge/java/Java.inc");
$dbLibrary = new java("Test");
$model = $dbLibrary->getModel("myModel"); //does it return a valid class with a valid db connection(if i setted it in the model)?
//do some stuff on model
$model->save(); //should it work?????
?>
? Is this the way?
Thank you very much
Giorgio Maria Santini
|
|
From: <php...@li...> - 2010-09-22 06:54:24
|
jboss/jetty or jboss/tomcat? On 9/21/10, php...@li... <php...@li...> wrote: > Hi, > > I am running > > - on MacOSX > - php-cgi compiled using Macport. > - latest php-java-bridge > - JBOSS 4.0.3 > - I do not have the doc_root variable set in my php.ini > > I can access the test.php page (which is a call to phpinfo) fine from > php-cgi directly, or when I place it one level from my web app root. But I > get "No input file specified." on the page when I place the file under a > directory. > > Here are the various environment parameters that is useful for debugging. > For me, it looks like both SCRIPT_NAME and SCRIPT_FILENAME are wrong. > > This fails > > https://localhost:8080/ctx/directory/directory/test.php > > PATH_INFO=/test.php > PATH_TRANSLATED=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/test.php > SCRIPT_NAME=/ctx/directory > SCRIPT_FILENAME=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/directory > > This works > > https://localhost:8080/ctx/test.php > > SCRIPT_NAME=/ctx/test.php > SCRIPT_FILENAME=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/test.php > > What can be done? > > Thanks. > > Theen-Theen > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2010-09-21 21:14:59
|
Hi, I am running - on MacOSX - php-cgi compiled using Macport. - latest php-java-bridge - JBOSS 4.0.3 - I do not have the doc_root variable set in my php.ini I can access the test.php page (which is a call to phpinfo) fine from php-cgi directly, or when I place it one level from my web app root. But I get "No input file specified." on the page when I place the file under a directory. Here are the various environment parameters that is useful for debugging. For me, it looks like both SCRIPT_NAME and SCRIPT_FILENAME are wrong. This fails https://localhost:8080/ctx/directory/directory/test.php PATH_INFO=/test.php PATH_TRANSLATED=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/test.php SCRIPT_NAME=/ctx/directory SCRIPT_FILENAME=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/directory This works https://localhost:8080/ctx/test.php SCRIPT_NAME=/ctx/test.php SCRIPT_FILENAME=/<JBOSS_HOME>/server/myserver/./deploy/ctx.war/test.php What can be done? Thanks. Theen-Theen |
|
From: <php...@li...> - 2010-09-21 17:14:49
|
Hi Ian, > I don't normally call this manually but let the main site __destruct() > function call handle the saving of all my objects into a session > variable the __destruct() hook lets you destroy external resources associated with the current class instance. What you are looking for is the __sleep() hook, which lets you save the object state. Please see the PHP documentation for details. Please see also: http://bugs.php.net/bug.php?id=49432 Regards, Jost Bökemeier |
|
From: <php...@li...> - 2010-09-21 13:25:56
|
On 20/09/2010 19:25, php...@li... wrote: > Hi, > > not if we want to get PHP/Java Bridge 6.2.1 through the release tests, > no. Please see http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/tests.php5/session_write_close_bug.php?revision=1.5&content-type=text%2Fplain > > This problem should be solved on PHP level, please see > http://bugs.php.net/bug.php?id=46451 > > >> This was causing >> problems with my application by saving the session before I had finished >> using it. > > Why and how do you want to access the session after the evaluator shutdown? Hi, Thanks for the response, although I don't quite understand what's going on so please bare with me ;) The site I am working is pure php but in order to process a particular type of transaction I have to use a Java library. I have placed all the code I need into a php class and call this when necessary. I have found that session variable set after using this class aren't stored. (This was very frustrating to debug as you can imagine.) Could you tell me when and under what circumstances the java_shutdown() function is called? I may be able to alter my code to work around this issue if it is necessary to run the session_write_close() at that point. I don't normally call this manually but let the main site __destruct() function call handle the saving of all my objects into a session variable - which is then rebuilt when another page is called. Thanks for your assistance. Ian -- |
|
From: <php...@li...> - 2010-09-20 20:42:32
|
probably the decorator resets or reverts your changes. we wlll see On 9/20/10, php...@li... <php...@li...> wrote: > Anyone, Jost, got any thoughts on why this PHP script is not working > as I would expect it to? I am stuck until I can find a solution... > Thanks... Marc.. > > On 9/15/2010 6:31 PM, php...@li... wrote: >> Jost, all - >> >> I have been doing more investigations into why the php-java bridge is >> not working as I would expect, but so far I got no joy in why it is >> failing... So I thought I would send in a concise version of the jsp >> code/file I am trying to set up, and see if you or anyone else can spot >> what I am doing wrong.... (this also shows the interplay between jsp >> variables and the Javascript/PHP scripts, which is why I am choosing to >> use JSP) >> >> What I am discovering, is that as expected the method evalPHP is being >> called (twice). The call to the function - outputJavaScript in my PHP >> script does indeed return a Javascript statement (via the internal call >> to pass_to_php_backend), which is a String variable, and I can in fact >> put an echo statement just before the return and see that the expected >> Javascript statement is produced. But what is NOT happening is that >> this returned string is produced in the output document, at the point of >> call to evalPHP. (I have placed calls to alerts to show this is indeed >> what is happening, as can be seen in the following code.) >> >> Thoughts? Thanks again in advance for helping me with this... Marc... >> >> >> <?xml version="1.0" encoding="UTF-8"?> >> <!DOCTYPE html >> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> >> <%@ page import="java.io.*" %> >> <%@ page import="org.apache.commons.lang.*" %> >> <%@page import="javax.script.*" %> >> <%@page import="php.java.script.servlet.*" %> >> >> <head> >> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >> <title>Example</title> >> >> <% >> String url = request.getAttribute("URL").toString(); >> String file = request.getAttribute("DocPath").toString(); >> String docRootDir = file.substring(0, file.lastIndexOf("/")); >> String serverURL = request.getAttribute("ServerURL").toString(); >> String contextPath = "/" + >> request.getAttribute("ContextPath").toString(); >> String Dir = request.getAttribute("Dir").toString(); >> %> >> >> <% >> // My PHP script is defined here.... >> String phpScript = ""; >> phpScript = "require_once '" + Dir + "/java/Java.inc'; \n"; >> phpScript += "require_once '" + Dir + "/contrib/php-utilities.php'; \n"; >> >> phpScript += "function outputJavaScript() { \n"; >> phpScript += "$IMConfig = array(); \n"; >> phpScript += "$IMConfig['images_dir'] = '" + docRootDir + "/images'; \n"; >> phpScript += "$IMConfig['allowed_image_extensions'] = >> array('jpg','gif','png'); \n"; >> phpScript += "return pass_to_php_backend($IMConfig); \n"; >> phpScript += "} \n"; >> >> phpScript += "outputJavaScript(); \n"; >> %> >> >> <%! >> private static final CompiledScript script; >> static { >> try { >> script =((Compilable)(new >> ScriptEngineManager().getEngineByName("php"))).compile( >> "<?php echo eval(java_context()->get('script')); ?>"); >> } catch (ScriptException e) { >> throw new RuntimeException("bleh!"); >> } >> } >> // private static final String evalPHP(String arg) { >> private String evalPHP(String arg, HttpServletRequest request, >> HttpServletResponse response) { >> CompiledScript instance = >> (CompiledScript)((java.security.cert.CertStoreParameters)script).clone(); >> instance.getEngine().put("script", arg); >> OutputStream out = new ByteArrayOutputStream(); >> Writer writer = new OutputStreamWriter(out); >> instance.getEngine().getContext().setWriter(writer); >> instance.getEngine().setContext((ScriptContext)new >> >> PhpCompiledHttpScriptContext(instance.getEngine().getContext(),this,this.getServletContext(),request,response)); >> try { >> instance.eval(); >> } catch (ScriptException e) { >> throw new RuntimeException("bleh!"); >> } >> try { >> writer.close(); >> } catch (IOException e) { >> throw new RuntimeException("bleh!"); >> } >> String result = out.toString(); >> return result; >> } >> %> >> >> >> <script type="text/javascript"> >> url =<%= "\"" + serverURL + "\"" %> +<%= "\"" + contextPath + >> "\"" %>; >> lang = "en"; >> </script> >> >> <!--<script type="text/javascript" src="../Core.js"></script> --> >> <script type="text/javascript" src="Loader.js"></script> >> >> <script type="text/javascript"> >> config = config ? config : new Backend.Config(); >> config.fullPage = true; >> // pass the configuration to plugin >> if (config.FileManager) { >> with (config.FileManager) >> { >> a = "<%= evalPHP(phpScript, request, response) %>"; >> if (a == "") alert("No Output"); >> else { >> alert("Output = " + a); >> <%= evalPHP(phpScript, request, response) %> >> } >> >> } >> } >> }; >> </script> >> </head> >> >> <body> >> <!-- Content of body not important, removed --> >> </body> >> </html> >> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2010-09-20 20:26:37
|
Anyone, Jost, got any thoughts on why this PHP script is not working as I would expect it to? I am stuck until I can find a solution... Thanks... Marc.. On 9/15/2010 6:31 PM, php...@li... wrote: > Jost, all - > > I have been doing more investigations into why the php-java bridge is > not working as I would expect, but so far I got no joy in why it is > failing... So I thought I would send in a concise version of the jsp > code/file I am trying to set up, and see if you or anyone else can spot > what I am doing wrong.... (this also shows the interplay between jsp > variables and the Javascript/PHP scripts, which is why I am choosing to > use JSP) > > What I am discovering, is that as expected the method evalPHP is being > called (twice). The call to the function - outputJavaScript in my PHP > script does indeed return a Javascript statement (via the internal call > to pass_to_php_backend), which is a String variable, and I can in fact > put an echo statement just before the return and see that the expected > Javascript statement is produced. But what is NOT happening is that > this returned string is produced in the output document, at the point of > call to evalPHP. (I have placed calls to alerts to show this is indeed > what is happening, as can be seen in the following code.) > > Thoughts? Thanks again in advance for helping me with this... Marc... > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <%@ page import="java.io.*" %> > <%@ page import="org.apache.commons.lang.*" %> > <%@page import="javax.script.*" %> > <%@page import="php.java.script.servlet.*" %> > > <head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <title>Example</title> > > <% > String url = request.getAttribute("URL").toString(); > String file = request.getAttribute("DocPath").toString(); > String docRootDir = file.substring(0, file.lastIndexOf("/")); > String serverURL = request.getAttribute("ServerURL").toString(); > String contextPath = "/" + > request.getAttribute("ContextPath").toString(); > String Dir = request.getAttribute("Dir").toString(); > %> > > <% > // My PHP script is defined here.... > String phpScript = ""; > phpScript = "require_once '" + Dir + "/java/Java.inc'; \n"; > phpScript += "require_once '" + Dir + "/contrib/php-utilities.php'; \n"; > > phpScript += "function outputJavaScript() { \n"; > phpScript += "$IMConfig = array(); \n"; > phpScript += "$IMConfig['images_dir'] = '" + docRootDir + "/images'; \n"; > phpScript += "$IMConfig['allowed_image_extensions'] = > array('jpg','gif','png'); \n"; > phpScript += "return pass_to_php_backend($IMConfig); \n"; > phpScript += "} \n"; > > phpScript += "outputJavaScript(); \n"; > %> > > <%! > private static final CompiledScript script; > static { > try { > script =((Compilable)(new > ScriptEngineManager().getEngineByName("php"))).compile( > "<?php echo eval(java_context()->get('script')); ?>"); > } catch (ScriptException e) { > throw new RuntimeException("bleh!"); > } > } > // private static final String evalPHP(String arg) { > private String evalPHP(String arg, HttpServletRequest request, > HttpServletResponse response) { > CompiledScript instance = > (CompiledScript)((java.security.cert.CertStoreParameters)script).clone(); > instance.getEngine().put("script", arg); > OutputStream out = new ByteArrayOutputStream(); > Writer writer = new OutputStreamWriter(out); > instance.getEngine().getContext().setWriter(writer); > instance.getEngine().setContext((ScriptContext)new > > PhpCompiledHttpScriptContext(instance.getEngine().getContext(),this,this.getServletContext(),request,response)); > try { > instance.eval(); > } catch (ScriptException e) { > throw new RuntimeException("bleh!"); > } > try { > writer.close(); > } catch (IOException e) { > throw new RuntimeException("bleh!"); > } > String result = out.toString(); > return result; > } > %> > > > <script type="text/javascript"> > url =<%= "\"" + serverURL + "\"" %> +<%= "\"" + contextPath + > "\"" %>; > lang = "en"; > </script> > > <!--<script type="text/javascript" src="../Core.js"></script> --> > <script type="text/javascript" src="Loader.js"></script> > > <script type="text/javascript"> > config = config ? config : new Backend.Config(); > config.fullPage = true; > // pass the configuration to plugin > if (config.FileManager) { > with (config.FileManager) > { > a = "<%= evalPHP(phpScript, request, response) %>"; > if (a == "") alert("No Output"); > else { > alert("Output = " + a); > <%= evalPHP(phpScript, request, response) %> > } > > } > } > }; > </script> > </head> > > <body> > <!-- Content of body not important, removed --> > </body> > </html> > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
|
From: <php...@li...> - 2010-09-20 18:25:22
|
Hi, not if we want to get PHP/Java Bridge 6.2.1 through the release tests, no. Please see http://php-java-bridge.cvs.sourceforge.net/viewvc/php-java-bridge/php-java-bridge/tests.php5/session_write_close_bug.php?revision=1.5&content-type=text%2Fplain This problem should be solved on PHP level, please see http://bugs.php.net/bug.php?id=46451 > This was causing > problems with my application by saving the session before I had finished > using it. Why and how do you want to access the session after the evaluator shutdown? Regards, Jost Bökemeier |