|
From: <php...@li...> - 2009-07-14 06:58:18
|
> So why the sudden infinite loop bug?
In PHP5 object->value autoconversion only works for strings, but not for
other primitive values. Until the proposed hook exists, please use a string
cast explicitly or java_is_false(), which calls ((bool)(string)$jobj)
internally.
This feature was working in PHP4 (through a low-level api), dropped in PHP5.
But I am quite sure this will work again in PHP6.
> took me and someone else about 10-12 hours of
I m sorry for the inconvenience, but we've had the entire 4.x release for
more than 2 years to help the transition from binary to XML. -- The reason
was that the low level binary code doesn't work well in mixed environments
(64 bit JVM vs. 32 bit PHP and vice versa), and needed recompilation for
each new PHP binary.
> Simply adding the JAVA_PREFER_VALES=true fixed the
We will switch it on as soon as possible.
Regards,
Jost Boekemeier
14. Jul 2009 6:46 vorm. schrieb am <
php...@li...>:
Jost-
Thanks again for the pile of tips. Based on your steps I was finally
able to isolate the problem.
In reality my situation was caused by a collision of lack of upgrade
docs with code that might not have been clean enough in the first
place. I'll tell you what happened, and ask that hopefully you can
amend the docs to prevent others from experiencing the same thing. It
literally took me and someone else about 10-12 hours of debugging over
4-5 debugging sessions to figure this out.
So, in PHP code we were doing something like:
$rs = $someJavaObject->getResultSet();
while ($rs->next()) {
// stuff
}
This works *fine* on java bridge v3.1.8. When we upgraded, it started
failing.
After installing turning on verbose debugging, we realized that the
script was actually executing in an infinite loop in that spot, which
is why it was eventually throwing a "php script timeout" error. The
debug logs allowed us to find the code shown above and realize that we
were in an infinite loop.
So why the sudden infinite loop bug?
> define ("JAVA_PREFER_VALUES", true);
> require_once('/usr/local/src/pjb/java/Java.inc');
Simply adding the JAVA_PREFER_VALES=true fixed the bug. That setting
doesn't seem to be documented anywhere. Nothing is mentioned about
anything special needing to be done to upgrade that I saw.
So, while I am very happy that we've solved our problem, I would still
like to know:
1) What exactly does JAVA_PREFER_VALES=true do?
2) Could you please add in an appropriate place in the docs something
about this setting and how it might be important when upgrading from
older versions. It would've saved me TONS of time and massive amounts
of frustration. In the end it has taken us 10-12 hours minimum off and
on for 3 weeks to solve this problem. I don't wish it on anyone else.
Thanks again for your help, without your advice we'd probably have
gone totally nuts by now.
Regards,
Alan
On Jun 20, 2009, at 2:44 AM, php-java-bridge-
us...@li... wrote: > Hi, > >> bridge seems to be hanging...
the first few calls wil...
>
------------------------------------------------------------------------------
> Are you an open s...
> php...@li... >
https://lists.sourceforge.net/lists/listinfo/php-jav...
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________ php-java-bridge-users
mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-br...
|