Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
Posted: Fri Apr 23, 2004 9:36 am Post subject: Re: [TESTING] Random Photo- Version 2.0
ah...for the multiple instances..
you can have multiple block files, but only *one* support file...so, name the block files:
block-Random, block-Hourly, block-Daily, etc....but keep the RandomSupport file, and just have one copy of it. make all the block files reference that one support file in their header. it should work just fine.
Posted: Tue Apr 27, 2004 11:42 am Post subject: Re: [TESTING] Random Photo- Version 2.0
oops, i just realized i posted that question in the wrong thread, i am using the "selectable" album version...i will post in that to help keep things straight.
Posted: Mon May 03, 2004 10:31 am Post subject: Re: [TESTING] Random Photo- Version 2.0
Hi:
I'm getting more errors now? Not sure why? Please help with some ideas, I'm new to PHP.
Warning: fopen(/home/kingwood/public_html/home/albums/block-random.cache): failed to open stream: Permission denied in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 221
Warning: fwrite(): supplied argument is not a valid stream resource in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 223
Warning: fwrite(): supplied argument is not a valid stream resource in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 223
Warning: fclose(): supplied argument is not a valid stream resource in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 225
Fatal error: Call to undefined function: isalbumname() in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 101
Posted: Fri Nov 05, 2004 1:30 pm Post subject: Re: [TESTING] Random Photo- Version 2.0
i am having the same memory error problem noted earlier but have not found a solution. i have the latest cv release of gallery(1.5?) with the random-block functions modified (edited the NG-RandomPhoto_functions.php. file by replacing every instance of the function, "isAlbumName" with the function "getAlbumName."). My gallery is inbedded in nuke 7.3 and running on fedora core 2 / apache 2.05.
i suspect that is because my gallery has over 4000 pics (i have kids and distant family). i'd be happy to make any adjustments to my server to accomodate this probem if someone would give me some suggestions (or terms to google on)
specifc errors i get are:
i get errors in my log
/var/log/httpd/www.primary.com_errors
PHP Fatal error: Allowed memory size of 8388608
bytes exhausted (tried to allocate 20 bytes) in
/var/www/html/modules/gallery/classes/Album.php on line 783
Code: › function loadPhotosFromFile($filename) {
$tmp = unserialize(getFile($filename));
if (!is_Array($tmp)){
line 783 ---> $tmp = unserialize(getFile($filename, true));
if (!is_Array($tmp)){
return 0;
}
}
if (count($tmp) > 0) {
if (strcasecmp(get_class($tmp[0]), "albumitem")) {
/* Dunno what we unserialized .. but it
wasn't an album! */
return 0;
Posted: Tue Nov 09, 2004 12:36 pm Post subject: Re: [TESTING] Random Photo- Version 2.0
thanks for your response. i now understand that one fix would be to increase the memory limit in /etc/php.ini. in my case, it requires memory_limit 32M. Since php.ini governs any php script, i am concerned that just increasing the limit for the entire server could cause stability problems. It's my understanding that there are alternatives for setting the memory limit, especially in a .htaccess file and as part of the virtual host configuration:
Code: › php_admin_value memory_limit 32M
Is this true? Also, does this memory hit only last while the script is loading or will the memory consumption continue?
Also, I wonder if there are some programming work arounds. I'm not a programmer but it looks like gallery calls the entire array before it gets the object it needs. I wonder if the overhead would be less if instead of calling the entire array if it would be possible to call just the specfic objects within the array? As I said, i am not a programmer, so i appologize in advance if my analysis is incorrect.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum