Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

[TESTING] Random Photo- Version 2.0
Goto page Previous  1, 2, 3, 4, 5, 6, 7
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Fri Apr 23, 2004 9:36 am    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

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.
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: Re: [TESTING] Random Photo- Version 2.0  

Back to top
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Apr 27, 2004 11:42 am    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

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.
Back to top
Offline View user's profile Send private message
wysard

Beginner
Beginner


Joined: Apr 29, 2004
Posts: 8

PostPosted: Sun May 02, 2004 1:51 pm    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

Hi:

I hope I got the right thread, I've been searching.

I'm trying the NG-RandomPhotoV2 and getting the following errors:

Warning: Invalid argument supplied for foreach() in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 276

Fatal error: Call to a member function on a non-object in /home/kingwood/public_html/home/blocks/NG-RandomPhoto_functions.php on line 101

I only made the changes suggested in the README.

Thanks Sad
Back to top
Offline View user's profile Send private message
wysard

Beginner
Beginner


Joined: Apr 29, 2004
Posts: 8

PostPosted: Mon May 03, 2004 10:31 am    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

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

Thanks Cool
Back to top
Offline View user's profile Send private message
rioguia

Beginner
Beginner


Joined: Nov 16, 2003
Posts: 12

PostPosted: Fri Nov 05, 2004 1:30 pm    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

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;
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Tue Nov 09, 2004 9:44 am    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

the error you are getting is a PHP error, not a random block error. you must increase the allowed memory size variable in your php.ini
Back to top
Offline View user's profile Send private message Visit poster's website
rioguia

Beginner
Beginner


Joined: Nov 16, 2003
Posts: 12

PostPosted: Tue Nov 09, 2004 12:36 pm    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

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.
Back to top
Offline View user's profile Send private message Visit poster's website
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Tue Nov 09, 2004 1:35 pm    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

yes, editting php.ini will affect the entire server. see http://us2.php.net/function.ini-set on how to set php.ini vars on a per-script basis.
Back to top
Offline View user's profile Send private message Visit poster's website
ophidite

Beginner
Beginner


Joined: Mar 31, 2004
Posts: 15

PostPosted: Thu Nov 25, 2004 11:05 am    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

Here is the error i get when i try to activate the block

Fatal error: Call to undefined function: isalbumname() in /data/www/com/e/t/ophidite.com/www/htdocs/blocks/NG-RandomPhoto_functions.php on line 71


Any clue

Thganks in advance
Back to top
Offline View user's profile Send private message Visit poster's website
slackbladder

Moderator
Moderator


Joined: Mar 29, 2003
Posts: 1038
Location: Cambs,UK

PostPosted: Thu Nov 25, 2004 1:42 pm    Post subject: Re: [TESTING] Random Photo- Version 2.0 Reply with quote

This has been answered many times before, please try searching these forums using:

isalbumname()
or
getalbumname()
Back to top
Offline View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Goto page Previous  1, 2, 3, 4, 5, 6, 7

 
Jump to:  
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
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannOnline internetSEORestaurant Locator • Get great HP coupons from CouponSnapshot • Search for great dell coupons at CouponSnapshot.com.au • Graduation DressesAndroid TabletSEO IndiaBuy Phen375fuel filterWorld Meds Direct

8th year online! 2003-2011
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia