PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Nomad
Client


Joined: Jan 21, 2006
Posts: 87
Location: Arizona

PostPosted: Thu Jul 27, 2006 12:34 pm Reply with quote Back to top

I was tinkering with WS subscriptions adding to groups,

when all of a sudden, when I went to check my nsn groups, i got this error
Warning: Division by zero in /home/mysite/public_html/includes/nsngr_func.php on line 140 .....it reports no groups in database, or users, but that is not true.

My last action was to use ws subscriptions to set up a trial subscription to a group. This worked, the member was added. When I went into nsn groups to remove the user from the group, i couldnt access it, and got that error.

Now, when I check the function, I get this line:
$pagesint = ($totalselected / $perpage);

any hints.....where is the $perpage defined? or what could have went wrong?
is there a database table that i need to check or reset?


Last edited by Nomad on Thu Jul 27, 2006 7:08 pm; edited 1 time in total
View user's profile Send private message Visit poster's website AIM Address
persona_non_grata



Joined:
Posts: 0

PostPosted: Thu Jul 27, 2006 1:43 pm Reply with quote Back to top

im not saying this is your fix but has to do with the same line....
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4887

PostPosted: Thu Jul 27, 2006 1:45 pm Reply with quote Back to top

$perpage appears to be a configuration option for the NSN Groups module.
View user's profile Send private message
Nomad
Client


Joined: Jan 21, 2006
Posts: 87
Location: Arizona

PostPosted: Thu Jul 27, 2006 7:07 pm Reply with quote Back to top

Thanks guys. Here is what I found:

I read the post persona_non_grata gave me and I try the suggested fix. I put a @ in front of ($totalselected / $perpage) so that it reads $pagesint = @($totalselected / $perpage). This got rid of the division by zero error, but nsn groups wouldnt let me view groups or view users. It said that there wasnt any in the database.

Next I checked the configuration options as suggested by kguske. Here I was able to fix the problem, and duplicate the problem.

There are 3 options in the NSN Groups configuration menu. If you change the Send Expiring Notice without setting the # items in lists field (i.e. leave it blank & dont touch it) then you get this error. To fix the error, you have to just go back and choose an option for # items in lists.

I think you need to mark this as a bug. See if you can duplicate the problem


Thank you guys for you help...I feel enlightened Groovy
View user's profile Send private message Visit poster's website AIM Address
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4887

PostPosted: Thu Jul 27, 2006 7:11 pm Reply with quote Back to top

Thanks for the details.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Fri Jul 28, 2006 7:02 am Reply with quote Back to top

Quote:

I think you need to mark this as a bug. See if you can duplicate the problem


I have captured this as a potential bug. Given where we are at in the release cycle, it may not get reviewed for RavenNuke 2.10.00.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Sat Jul 29, 2006 6:37 pm Reply with quote Back to top

I just fixed this in 2.10.00. Turns out, under admin/modules/nsngroups, find within the files all references to the array $gr_config and change it to $grconfig.

I believe what may have happened is when you save the config and then come back into it, you will not see your previously saved values. If you accidentally save at this point, without changing the values on the page, the row limit gets to be zero.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4887

PostPosted: Sat Jul 29, 2006 6:41 pm Reply with quote Back to top

The needle in the haystack, so to speak. Well done, montego!
View user's profile Send private message
Nomad
Client


Joined: Jan 21, 2006
Posts: 87
Location: Arizona

PostPosted: Sun Jul 30, 2006 1:18 am Reply with quote Back to top

Wave
It works perfect now. You The Man!
View user's profile Send private message Visit poster's website AIM Address
leo51
Worker
Worker


Joined: Sep 09, 2004
Posts: 105
Location: Canada

PostPosted: Thu Aug 03, 2006 9:22 pm Reply with quote Back to top

montego wrote:
I just fixed this in 2.10.00. Turns out, under admin/modules/nsngroups, find within the files all references to the array $gr_config and change it to $grconfig.


Thanks for this fix. End up on this thread because I was told by "kguske" to do a search for division by zero erro. However, could you please guide me how exactly do I set the Date Display Format: I am not too familar with these things: as this ('l dS \of F Y h:i:s A') or l dS \of F Y h:i:s A

I found this "// Prints something like: Monday 15th of August 2005 03:12:46 PM
echo date('l dS \of F Y h:i:s A');" and would be able to do it in a page but not sure how to do it in this case.
View user's profile Send private message Visit poster's website MSN Messenger
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Fri Aug 04, 2006 11:56 pm Reply with quote Back to top

Im a little confused as to exactly your question.

If youd like to change the format throughout the site, Its a language edit, other then that, I think a more specific approach may be helpfull.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7487
Location: Arizona

PostPosted: Sat Aug 05, 2006 9:05 am Reply with quote Back to top

leo51, I would look here for the endless combinations of potential date formatting options:
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum