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  

New errors
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Blocks View previous topicPrinter friendly versionView next topic
Author Message
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Jul 01, 2003 6:14 pm    Post subject: New errors Reply with quote

i got some errors on my random blocks...they were working fine, then all of the sudden i started getting these errors...
Code: › Warning: rand() expects parameter 2 to be long, string given in /home/virtual/site21/fst/var/www/html/html/modules/gallery/random_support.php on line 203
ERROR: requested index [] out of bounds [4]
Fatal error: Call to a member function on a non-object in /home/virtual/site21/fst/var/www/html/html/modules/gallery/classes/Album.php on line 669
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: New errors  

Back to top
dari

Site Admin
Site Admin


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

PostPosted: Mon Jul 07, 2003 7:24 am    Post subject: Reply with quote

hmm...did you upgrade gallery to a new CVS version, or did this just start popping up?
Back to top
Offline View user's profile Send private message Visit poster's website
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Mon Jul 07, 2003 8:12 am    Post subject: Reply with quote

nope...nothing changed...i installed the blocks, got them working perfectly, went back a couple of days later and there were errors...i hadn't touched it
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Mon Jul 07, 2003 8:22 am    Post subject: Re: New errors Reply with quote

hmm, let me catch up on some work and then i'll take a look at this and get back to you.
Back to top
Offline View user's profile Send private message Visit poster's website
DaveJWood

Beginner
Beginner


Joined: Jun 25, 2003
Posts: 2
Location: Sawley, North Yorkshire, UK

PostPosted: Tue Jul 08, 2003 3:29 am    Post subject: Re: New errors Reply with quote

I'm getting the same error. It's fine for a while then along comes the "rand() expects parameter 2 to be long" error.
Would be very interested for a fix for this one.
Rolling Eyes
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Tue Jul 08, 2003 6:03 am    Post subject: Reply with quote

ok, here is the offending line:
Code: › $choose = rand(1, $count);

you could put a simple line like this:
Code: › echo $count;

immediately before that line and see what it returns. post the results here. i have a workaround, but it's not (in my mind) a good fix.
Back to top
Offline View user's profile Send private message Visit poster's website
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Jul 08, 2003 6:42 am    Post subject: Re: New errors Reply with quote

ok, here is the result
Code: › 3
Warning: rand() expects parameter 2 to be long, string given in /home/virtual/site21/fst/var/www/html/html/modules/gallery/random_support.php on line 204
ERROR: requested index [] out of bounds [4]
Fatal error: Call to a member function on a non-object in /home/virtual/site21/fst/var/www/html/html/modules/gallery/classes/Album.php on line 669
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Tue Jul 08, 2003 7:30 am    Post subject: Re: New errors Reply with quote

try this for the echo statement:
Code: › echo gettype($count);

what's that produce?
Back to top
Offline View user's profile Send private message Visit poster's website
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Jul 08, 2003 7:41 am    Post subject: Re: New errors Reply with quote

ok, now its this
Code: › string
Warning: rand() expects parameter 2 to be long, string given in /home/virtual/site21/fst/var/www/html/html/modules/gallery/random_support.php on line 204
ERROR: requested index [] out of bounds [4]
Fatal error: Call to a member function on a non-object in /home/virtual/site21/fst/var/www/html/html/modules/gallery/classes/Album.php on line 669
Back to top
Offline View user's profile Send private message
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Jul 08, 2003 7:48 am    Post subject: Reply with quote

i dont know if the two are related, but in my second gallery (i have 2) i am getting this error now...and it is new too, it worked for a while and now it is appearing

Fatal error: Call to a member function on a non-object in /home/virtual/site21/fst/var/www/html/html/modules/gallery2/classes/AlbumDB.php on line 162
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Tue Jul 08, 2003 8:16 am    Post subject: Reply with quote

hmm..i think it may have to do with how Gallery does it's serialization. try putting the following block of code:
Code: ›
if(!is_int($count)) {
   settype($count, "int");
}

underneath these lines:
Code: ›
function choosephoto($album) {
    global $cache;

    $count = $cache[$album->fields["name"]];
Back to top
Offline View user's profile Send private message Visit poster's website
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Jul 08, 2003 8:36 am    Post subject: Reply with quote

worked...any ideas on the error i am getting in my second gallery i referred to above?

also, i attempted to put 2 random blocks on the same page but i get constant "cannot redeclare" errors on a ton of functions, so short of going in and renaming all the functions is there anything i can do?
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Tue Jul 08, 2003 8:41 am    Post subject: Re: New errors Reply with quote

i'm not sure about the second gallery issue...i know on the gallery site they have tips on running multiple galleries in one domain.

as for the multiple random blocks, what are the specific errors you're getting?
Back to top
Offline View user's profile Send private message Visit poster's website
inSaNE_iRIsH

Wizard
Wizard


Joined: Jun 19, 2003
Posts: 101

PostPosted: Tue Jul 08, 2003 9:30 am    Post subject: Re: New errors Reply with quote

here is an example
Code: › Fatal error: Cannot redeclare fs_copy() (previously declared in /home/virtual/site21/fst/var/www/html/html/modules/gallery/platform/fs_unix.php:22) in /home/virtual/site21/fst/var/www/html/html/modules/gallery2/platform/fs_unix.php on line 22


but if i rename the fs_copy function to fs_copy2 i get a new error for whatever the next function is....if i rename all the functions in the fs_unix.php file i start getting errors on all the functions in the random_support.php file that is in gallery2...
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


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

PostPosted: Tue Jul 08, 2003 9:52 am    Post subject: Reply with quote

gotcha...yeah, this isn't a random block issue...this is because of the fact that you're essentially running two instances of gallery on the server, so all the functions are declared twice. give me a few and i'll post a solution.
Back to top
Offline View user's profile Send private message Visit poster's website
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 1, 2  Next

 
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 filter

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