Re: Interbase DB module problems
| From: | Ludovico Magnocavallo | Date: | Tue, 22 Jan 2002 13:40:25 +0000 |
| Subject: | Re: Interbase DB module problems | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-4053@lists.php.net to get a copy of this message | ||
> Does it happens only with getAll()?
Hmmm apparently yes
> It looks like a database problem, but ...
Hmmm I don't think it's a database problem, but a problem with the php4
interbase module. An excerpt from "Request Handles"
(http://www.ibphoenix.com/ibp_request_handles.html) on this specific error
message:
"I tend to think of the blr as the code the engine executes in parallel with
the calling code. As long as they stay in sync, the engine will have a
message to send when the calling code is looking for that message and
vice-versa. When they get out of step, you get the error message: request
synchronization error."
> I don't have access to an Interbase for the moment, but perhaps you could
try
> some things, to see if we find the problem. Here are some ideas:
I already tried a few combinations before posting this supposed bug with no
luck, here are the ones you suggested (two of them fix the problem):
> 1)
> if ($fetchmode & DB_FETCHMODE_ASSOC) {
> $ar = array();
> $ar = (array)ibase_fetch_object($result);
> }
Same errors
> 2)
> if ($fetchmode & DB_FETCHMODE_ASSOC) {
> $ar = get_object_vars(ibase_fetch_object($result));
> }
Fixes the problem, ie no error messages and no stuck loop =)
> 3)
> if ($fetchmode & DB_FETCHMODE_ASSOC) {
> $obj = ibase_fetch_object($result);
> $ar = (array)$obj;
> }
Same errors
> 4)
> if ($fetchmode & DB_FETCHMODE_ASSOC) {
> $obj = ibase_fetch_object($result);
> if (is_object($obj)) {
> $ar = (array)$obj;
> } else {
> $ar = null;
> }
> }
Fixes the problem same as 2)
Nice job Tomas, 2 out of 4 =)
Thanks a lot,
Ludo