Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:38 am EDT

Geeklog Forums

Gallery Block errors


Status: offline

racooper

Forum User
Junior
Registered: 03/13/04
Posts: 24
Howdy!

I'm currently running Gallery 1.5, and was using the GalleryBlock plugin on GL1.3.11. After uploading ~30 pics to a new album today, and did some reorganization of existing albums. Afterward, I attempted to visit the main homepage of the site and got a continual blank page. I found this in Apache's error log:

PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 12 bytes) in /data/home/noidea-us/html/gallery/classes/Album.php on line 820, referer: http://www.noidea.us/admin/block.php

I tried loading the new 1.1.3 Gallery block with no change.
If I disable Gallery Block, I can load site/index.php fine.
Never had a problem before today. Any suggestions?
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
I'm stumped...

Can you give me an idea of the size of your gallery? How many photos? How many albums?

- Andy
 Quote

Status: offline

racooper

Forum User
Junior
Registered: 03/13/04
Posts: 24
14 Galleries with pictures
4 containing only other albums
little over 500 images

http://www.noidea.us/gallery/

 Quote

mach

Anonymous
How big are the pics that are being called by the block? are they taking up more memory to resize and display than is allowed by your PHP's memory_limit?

Apache? try this in .htaccess
Text Formatted Code
<FilesMatch "\.(php|html?)$">
php_value memory_limit 16M
</FilesMatch>
 

I think the default is about 8.. and that what your's looks to be
 Quote

Status: offline

racooper

Forum User
Junior
Registered: 03/13/04
Posts: 24
Quote by mach: How big are the pics that are being called by the block? are they taking up more memory to resize and display than is allowed by your PHP's memory_limit?
....
I think the default is about 8.. and that what your's looks to be


But the block doesn't display images...only shows what's new....
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
[I have a gallery with over 800 photos and 16 albums, so yours isn't too huge.]

Hmmm... What's the maximum depth of your nested albums?

Can you tell me what you have these set to in your gallery block config.php:

$GB_CONF['nested_show']
$GB_CONF['nested_parent_depth']

- Andy
 Quote

Status: offline

racooper

Forum User
Junior
Registered: 03/13/04
Posts: 24
I believe 3 deep -- parent:child:child w/ pics

$GB_CONF['nested_show'] = 1;
$GB_CONF['nested_parent_depth'] = 0;
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

If anyone else is experiencing this problem, here's how we fixed it in version 1.1.3:

1) in blocks/galleryblock/phpblock.php:

Text Formatted Code
change line 46 from this:

$numPhotos = $galleryCache->albumDB->numPhotos( $gallery->user );

to this:

$numPhotos = $galleryCache->albumDB->getCachedNumPhotos( $gallery->user );

 

2) in public_html/galleryblock/galleryblock.php:

Text Formatted Code
change line 40 from this:

$this->albumDB = new AlbumDB();

to this:

$this->albumDB = new AlbumDB( false );

AND change line 133 from this:

'num_photos' => $album->numPhotos(),

to this:

'num_photos' => $album->fields["cached_photo_count"],

 

3) remove the cache file if it exists

This will be fixed in the next version.

- Andy
 Quote

Jayda

Anonymous
I tried using Galleryblock 1.1.3 with Gallery 1.5.1-RC1 without the above made corrections and got the blank index.php page so i disabled galleryblock made the changes checked for the cache file and then re-enabled galleryblock only to have the same blank index.php. If i disable galleryblock my index.php loads fine.

I have all the default settings in galleryblock, other then i did change my gallery path line. Please help as i would love to get this working.
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
I don't have 1.5.1-RC1 installed, so I can't test it.

What does your httpd error log say?

- Andy
 Quote

Jayda

Anonymous
Quote by asmaloney: I don't have 1.5.1-RC1 installed, so I can't test it.

What does your httpd error log say?

- Andy


It doesnt report an error. I see where i connect in the access log but no errors in the error log.
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
Jayda,

There should be an error produced somewhere. Anything in GL's error log? Where do you normally see PHP errors and warnings?

Without an error, fixing it's going to be a bit of a problem...

If you can't find an error in any log file, I would suggest trying it with Gallery 1.5 to see if that works for you.

- Andy
 Quote

Jayda

Anonymous
Quote by asmaloney: Jayda,

There should be an error produced somewhere. Anything in GL's error log? Where do you normally see PHP errors and warnings?

Without an error, fixing it's going to be a bit of a problem...

If you can't find an error in any log file, I would suggest trying it with Gallery 1.5 to see if that works for you.

- Andy


I normally see the errors in my site httpd error.log file there have been no errors since Aug 4th .. to verify it was still logging errrors i forced it to error and it added the entry. I agree without an error its pretty impossible to locate the problem. I did go to Gallery 1.5 and it works fine so i guess i will stick with that for now.
 Quote

All times are EDT. The time is now 06:38 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content