#29633 [Opn]: Result Resource Deleted, valid for first fetch, then becomes invalid
| From: | paul at campbell-multimedia dot co dot uk | Date: | Thu, 12 Aug 2004 14:25:43 +0000 |
| Subject: | #29633 [Opn]: Result Resource Deleted, valid for first fetch, then becomes invalid | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64495@lists.php.net to get a copy of this message | ||
ID: 29633
User updated by: paul at campbell-multimedia dot co dot uk
Reported By: paul at campbell-multimedia dot co dot uk
Status: Open
Bug Type: MySQL related
Operating System: Linux redhat i386
PHP Version: 4.3.8
New Comment:
I can if required post, or email the developers the
complete code files and the URL to the live site.
Further to my post I have found that google.com has
spidered sites in the past few months with the exact same
error, some sites have fixed the problem, others haven't.
I also found several references to people with the same
illusive problem after upgrading from 4.3.7 to 4.3.8, but
alas, no solutions.
Previous Comments:
------------------------------------------------------------------------
[2004-08-12 16:18:51] paul at campbell-multimedia dot co dot uk
Description:
------------
I can't post a short script that creates this problem as
it appears to be illusive.
I have an DB abstraction class that I have used on
everysite I have done for the last 3 years and it works on
every site.
The problem presents itself as an invalid result resource,
eg. "8 is not a valid MySQL result resource in
generic.php line 230"
The code queries a table for 20 "ids", then for each ID it
loads an object instance variables using a sepearte query,
then it queries 3 other tables for related info and
finally prints out a table of info and moves on to the
next row in the original query.
When it gets to the next row the result resource is no
longer valid.
The code worked perfectly until the host upgraded, nothing
has been changed in the last year. If I download the code
and run it on my server (PHP 4.3.6) it works perfectly.
Worse still is that other very similar areas of the site,
using subclasses of the same object code that produces the
error, work perfectly. To be clearer, 2 subclasses of a
ProfileList do very similar things, the both use the same
code to render themselves. One fails, the others work.
even thought they are the same peices of code, the same
tables and the only difference is in the original query.
The failing query is,
"SELECT id FROM designers LIMIT 0,20"
I have check again and again that the result is NOT being
overwritten and it is #8 when the first row is returned
and is is STILL #8 when the next row is fetched, yet the
second attempt to fetch returns the invalid result error.
Has the number of active result resources been decreased
in 4.3.8?
Thanks.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29633&edit=1