|
From: <php...@li...> - 2009-09-21 10:13:08
|
Please report this bug to both, the "joomla" and the php maintainers.
First, __autoload must not be used by php libraries. It is reserved for
applications to bind libraries together;
It can be used at most once. Please report this bug to the "joomla" library
authors.
Second, spl_autoload can be used by libraries, but it must not destroy any
existing __autoload handler:
<?php
function autoload_legacy($x) {echo "legacy autoload $x\n"; return false;}
function autoload_spl1($x) {echo "spl1 autoload $x\n"; return false;}
function autoload_spl2($x) {echo "spl2 autoload $x\n"; return false;}
function autoload_spl3($x) {echo "spl3 autoload $x\n"; return false;}
spl_autoload_register("autoload_spl1");
function __autoload($x) {return autoload_legacy($x);}
spl_autoload_register("autoload_spl2");
spl_autoload_register("autoload_spl3");
@new Foo();
?>
Please report this bug to the php maintainers. Ask them to either deprecate
__autoload or to change spl_autoload_register to not destroy any existing
__autoload hook. The result of the above php script must be "spl1 spl2 spl3
legacy".
In the meantime you can disable the use of spl_autoload by setting the
define JAVA_DISABLE_AUTOLOAD. If you do this, you won't be able to autoload
java classes anymore.
Regards,
Jost Boekemeier
On Sep 21, 2009 10:14 AM, <php...@li...>
wrote:
Hi,
I installed successfully Joomla on the Glassfish server based on the
http://www2.sebastiendionne.ca:8282/glassfish/joomla-on-glassfish.html
My problem came when I tried to insert
require_once ("java/Java.inc");
to my code.
All php classes that was find before, no are not recognize anymore.
ex.
javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error:
Class 'JModuleHelper' not found
if I comment require_once ("java/Java.inc"); everything goes smoothly.
Do you have any ideas if Java.inc could overwrite somehow all classes
included before?
Or other ideas about this problem?
thx in advance,
Cipm
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|