|
From: <php...@li...> - 2007-09-07 20:39:22
|
Help! I ran into a bizarre problem that I simply don't understand.
As soon as I include the PHP/Java bridge in my code (i.e. as soon as I
include the following statement in my PHP file):
------------------------------
...
require_once('http://localhost:8080/JavaBridge/java/Java.inc');=20
...
------------------------------
I am getting the following PHP error:=20
------------------------------
Fatal error: Cannot redeclare java_last_exception_get() in
http://localhost:8080/JavaBridge/java/Java.inc on line 1431
------------------------------
Not only is the include done using "require_ONCE()" (capitalization
here for emphasis only), but the Java.inc also is internally
additionally guarded by:
------------------------------
<?php
=20
if(!function_exists("java_get_base")) {
...
function java_get_base() {
...
}
... lost of stuff among them also:
function java_last_exception_get() {
...
}
}
?>
------------------------------
So, IMHO it should NEVER EVER be possible that anything contained in
this file is ever redeclared.
And why is the error only at the function
"java_last_exception_get(...)" which is somewhere after the middle of
the file, while there are lots of other functions declared before it,
which - if for some reason the file would indeed be re-read - should
already cause errors much earlier...
I simply don't understand what's going in here. Anyone who had similar
encounters and/or can shed some light onto this?
I am using this XAMPP v1.6.3a (a ready-packed combination of Apache
v2.2.4 & PHP v5.2.3 & Zend Optimizer v3.3.0 & MySQL v5.0.45 - see
http://www.apachefriends.org/en/xampp-windows.html) plus the Tomcat
v6.10.13 -addon (on which I run the JavaBridge.war file).
on WinXP Pro.
Michael
|