ERROR: requested index [51] out of bounds [50]

Amorphine

Joined: 2005-01-11
Posts: 54
Posted: Tue, 2005-03-29 20:45
ERROR: requested index [51] out of bounds [50] 
Fatal error: Call to a member function on a non-object in /home/simsadmi/public_html/modules/gallery/classes/Album.php on line 1113

I just made new Album,and the block-NG-RandomPhoto.php start to get this error sometimes...
ANY HELP?
I see many people got this problem,but i cannot find cure & answers about it...
Thanks!!!

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Tue, 2005-03-29 20:55

Your cache is out of date because people have deleted images.

Either:
Delete the random-block.cache file from your albums directory
Wait 24 hours for the cache to rebuild itself
Re-run the config wizard and specify a shorter cache value

 
Amorphine

Joined: 2005-01-11
Posts: 54
Posted: Tue, 2005-03-29 21:09

signe, 10x...i change it to 6 hours it's ok?
And do i had to wait 24 before reconfig?

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Tue, 2005-03-29 21:16

If you delete the cache file, you don't have to wait at all.

Otherwise, you have to wait for whatever time period you specified in the timeout.

 
woodentigger

Joined: 2005-04-13
Posts: 2
Posted: Wed, 2005-04-13 22:48

I too am experiencing a similar problem with the random block. However it seems to be a little more widespread in that when i make changes to the gallery the block causes out of bounds issues.

I see from the post why that is happening.

However with Xanthia (default install on pn 0.750) and gallery 1.4.4-pl2 after experiencing this issue when i tried to add a new block it gave me a similar error and only displayed the right hand blocks in a clumn, an now i get a blank page any suggestions as to why this is happening?

Help resolving this would be greatly appreciated

 
Amorphine

Joined: 2005-01-11
Posts: 54
Posted: Thu, 2005-04-14 09:09

i really dont know anything about Xanthia (default install on pn 0.750) but cannot see how random block reffers to your block system.

 
jackquake

Joined: 2004-08-29
Posts: 8
Posted: Wed, 2005-04-27 01:17

Same problem here. Using 1.4.4 pl2 version of Gallery. I wonder if this has something to do with a PHP patch or something? I mean, as the original poster stated, this happens "sometimes". On the site, I kept pressing F5 to refresh the page over and over and over. About half the time, I got an error and the other half it loaded correctly. ARGGHHHH...so many variables. Is it a memory issue? Is it a PHP issue? Is it too many sites hosted on a single server? Intermittent problems are the hardest to figure out. Not even sure how to troubleshoot this one other than, I for one confirm it is indeed an issue.

JQ

 
Amorphine

Joined: 2005-01-11
Posts: 54
Posted: Wed, 2005-04-27 06:48

go to your Albusm dir, and delete the file randomblock.cache . It happnes if you move pictures from one dir to other...or delete images.And if you move albums too.

 
jackquake

Joined: 2004-08-29
Posts: 8
Posted: Wed, 2005-04-27 23:08

Thank you for the suggestion, but I do not have a random block on the site. Strangely enough, the home page of the site just "references" images in the gallery, but does not actually use "Gallery" (if that makes sense). And I still get the out of bounds error message. Here is one:

Quote:
Error: Requested index [4] out of bounds [2]
Fatal error: Call to a member function on a non-object in /home/realimag/public_html/mdpro/modules/gallery/classes/Album.php on line 1113

I looked for the file but one could not be found--again thanks for the suggestion, but the problem persists.

 
Amorphine

Joined: 2005-01-11
Posts: 54
Posted: Thu, 2005-04-28 10:40
Quote:
Re-run the config wizard and specify a shorter cache value

That should Help!Just set it to lower time.
What do you mean about

Quote:
the home page of the site just "references" images in the gallery, but does not actually use "Gallery"

You're using some URLs of pictures from the Gallery in Home page?If you're using the url from Gallery,and you have modified in any way your gallery(moving albums,pictures,deleting... etc), it's normally to get an error, cause the URLs go wrong.

 
jackquake

Joined: 2004-08-29
Posts: 8
Posted: Sat, 2005-04-30 19:05

Ok, I'll try the shorter cache idea and let you know.

To your point of referencing the pix on the homepage, you are correct. I agree--this is dangerous, but these are pretty static and won't change. The point is, the gallery program isn't even being used--we're just referencing the photos with simple links.

That is the strangest... This is why I think it might not even be gallery, but maybe a PHP patch or memory issue on the server or something else.

I'll try the cache though and let you know.

Thanks again!
JQ

 
Leviathan

Joined: 2004-12-06
Posts: 16
Posted: Wed, 2005-07-06 18:46
signe wrote:
Your cache is out of date because people have deleted images.

Either:
Delete the random-block.cache file from your albums directory
Wait 24 hours for the cache to rebuild itself
Re-run the config wizard and specify a shorter cache value

I've had this error before and have fixed it by deleting the .cache file in the albums directory as well as specifying a shorter value in the config (30 minutes). In fact, I just deleted the .cache file yesterday because I got the error again. I have it set to a 30 minutes rebuild.

However, I just got the error again today and went in to delete the cache file but it's not there. What do I do now? Why didn't the file come back?

 
Leviathan

Joined: 2004-12-06
Posts: 16
Posted: Wed, 2005-07-06 21:24

Nevermind my question above. It seems that I had started out using one version of Random image block but switched to another. The second version I put in didn't put in a .cache file which is why I couldn't find it. So I switched back to the first version I had (I think they're done by the same author) and the .cache file is there now. Weird.