|
From: <php...@li...> - 2007-08-01 17:54:43
|
Background:
JavaBridge version is 4.1.7_j2ee
I'm using Tomcat 6.0 (running as a service) as the JVM.
Java version is 1.6.0_02
I'm running IIS (needs to work on both v5.1 and v6.0, which are running on Windows XP pro and Windows Server 2003 respectively)
PHP is version 5.2.3 and is running as an ISAPI
php directory is C:/PHP5
I want to run the javaBridge's pure php implementation
I do not want to run php as a CGI, but rather use my already running ISAPI php
When I first place the javaBridge.war file in Tomcat's webapps directory, it works fine regardless of which machine I used to access
http://localhost:8080/JavaBridge/test.php
However it does use CGI/FastCGI version of php (5.2.1) which is obviously not the ISAPI php instance I want it to use. It does list C:PHP5\php.ini as the php.ini file that was loaded, so it must be finding the php folder.
Also, when I restart the computer, a request to http://localhost:8080/JavaBridge/test.php
from the localhost will fail with
Warning: fread() [function.fread]: Length parameter must be greater than 0 in C:\Inetpub\wwwroot\JavaBridge\java\Java.inc on line 884
protocol error. , Invalid document end at col 1
However, if I go to the same page from a different computer
for instance:
http://192.168.0.5:8080/JavaBridge/test.php
the test completes successfully
So, I have two questions, how can I configure the bridge to use my ISAPI php instance, and why can I only run java from a computer that's not the server?
Thank you for your time.
--Nathan Shaskin
Compliance Publishing
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
|
|
From: <php...@li...> - 2007-08-01 19:30:14
|
an update on the fread() errors below:
It started failing on the following computer
http://192.168.0.5:8080/JavaBridge/test.php
after I'd changed a webpage that I've been developing (that makes use of the bridge) and clicked refresh. Thus, it must not have to do with which computer is used.
I found that deleting cookies makes it work again for some reason, so the problem must have something to do with cookies or the cache. Does the java bridge use cookies? if so, can it be configured not to?
--Nathan Shaskin
Compliance Publishing
php...@li... wrote: Background:
JavaBridge version is 4.1.7_j2ee
I'm using Tomcat 6.0 (running as a service) as the JVM.
Java version is 1.6.0_02
I'm running IIS (needs to work on both v5.1 and v6.0, which are running on Windows XP pro and Windows Server 2003 respectively)
PHP is version 5.2.3 and is running as an ISAPI
php directory is C:/PHP5
I want to run the javaBridge's pure php implementation
I do not want to run php as a CGI, but rather use my already running ISAPI php
When I first place the javaBridge.war file in Tomcat's webapps directory, it works fine regardless of which machine I used to access
http://localhost:8080/JavaBridge/test.php
However it does use CGI/FastCGI version of php (5.2.1) which is obviously not the ISAPI php instance I want it to use. It does list C:PHP5\php.ini as the php.ini file that was loaded, so it must be finding the php folder.
Also, when I restart the computer, a request to http://localhost:8080/JavaBridge/test.php
from the localhost will fail with
Warning: fread() [function.fread]: Length parameter must be greater than 0 in C:\Inetpub\wwwroot\JavaBridge\java\Java.inc on line 884
protocol error. , Invalid document end at col 1
However, if I go to the same page from a different computer
for instance:
http://192.168.0.5:8080/JavaBridge/test.php
the test completes successfully
So, I have two questions, how can I configure the bridge to use my ISAPI php instance, and why can I only run java from a computer that's not the server?
Thank you for your time.
--Nathan Shaskin
Compliance Publishing
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
|
|
From: <php...@li...> - 2007-08-02 09:19:12
|
Hi,
> an update on the fread() errors below:
a short read or a "protocol error" means that something went wrong in the back end; the back end
has simply closed the connection.
You should find the reason for the short read in the log of the back end.
Regards,
Jost Boekemeier
dddd
|
|
From: <php...@li...> - 2007-08-02 19:13:56
|
hello!
I think the URL split() used in version 4.1.7 caused this. In version 4.1.8 this
problem disappeared (for me).
BTW: Is it possible to use Java.inc with version 3.2.1?
---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.
|
|
From: <php...@li...> - 2007-08-02 20:03:24
|
It appears that the problem I was having with fread() errors (which, by the way, Jost, I couldn't find any errors in the logs. Where would I find this log? Tomcat should report the error, shouldn't it?) has to do with a JavaScript function interfering with Java. I guess they're so similar in terms of syntax that functions that happen to have the same name clash. That is what appears is happening with the setCookie function that exists in java.inc as well as many JavaScript based web applications that use cookies. Of course, I don't have to use JavaScript to set cookies, so I'll be finding a different way to set cookies I need to set.
--Nathan Shaskin
Compliance Publishing
php...@li... wrote: hello!
I think the URL split() used in version 4.1.7 caused this. In version 4.1.8 this
problem disappeared (for me).
BTW: Is it possible to use Java.inc with version 3.2.1?
---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search.
|
|
From: <php...@li...> - 2007-08-04 16:29:57
|
Hi, > It appears that the problem I was having with fread() errors (which, by the way, Jost, I > couldn't find any errors in the logs. Where would I find this log? Tomcat should report the > error, shouldn't it?) yes. -- The php.java.bridge.default_log_level is 3, which means that exceptions and errors are logged to the tomcat error log (usually called logs/NODENAME_date). > has to do with a JavaScript function interfering with Java. I guess Can you please open a problem report (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233), set the log level to 5 and attach the log there? Maybe it is possible to also attach the request headers, obtained by adding the following line to Java.inc (line 265 in the current code http://php-java-bridge.cvs.sourceforge.net/php-java-bridge/php-java-bridge/server/META-INF/java/Protocol.inc?revision=1.11&view=markup): echo "request header::$str<br>\n"; I suspect that PHP could not parse the request headers correctly, probably because the back end has sent both, the PHP cookie and the JAVA cookie in an unusual way. -- I could not reproduce this, just a guess. They should be separated by a "; " and the value should be properly URLEncoded. Basically the bridge simply forwards the request URL to the back-end. I think what happened is that Java.inc has sent a garbage URL to tomcat and tomcat responded with a HTML error message. The bridge failed to detect the error condition and tried to parse the HTML error as a PHP/Java Bridge protocol response. > That is what appears is happening with the setCookie function that exists in java.inc as well as Yes, setCookie could be smarter. It should detect if the value is properly URLEncoded for example. I will check this. Regards, Jost Boekemeier __________________________________ Alles was der Gesundheit und Entspannung dient. BE A BETTER MEDIZINMANN! www.yahoo.de/clever |
|
From: <php...@li...> - 2007-08-04 16:35:32
|
Hi,
> I think the URL split() used in version 4.1.7 caused this. In version 4.1.8 this
> problem disappeared (for me).
which URL split() do you mean?
> BTW: Is it possible to use Java.inc with version 3.2.1?
No, I don't think so. Version 4.x uses an enhanced protocol which tries to avoid round-trips as
much as possible. In order to make this work correctly, the bridge needs two interfaces, which
currently don't exist in the php core.
We could implement them ourselfs in java.c. But the java.c contained in version 4 is a fake, used
only for backward compatibility.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-08-02 09:17:19
|
Hi,
the ISAPI requires a running IIS webserver, right?
Why don't you install PHP into IIS and then use the following code:
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
To connect the PHP instances running in your IIS server with the tomcat J2EE back end?
Regards,
Jost Boekemeier
__________________________________ Wissenswertes für Bastler und Hobby Handwerker. BE A BETTER HEIMWERKER! www.yahoo.de/clever
|