Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-15-2012, 11:31 PM   PM User | #1
NeedhelpPlease
New to the CF scene

 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
NeedhelpPlease is an unknown quantity at this point
Question Been Fighting with this ...Help!

Hi

I purchased this script a few weeks ago, and after install everything was working just great.... and then all the sudden I get this and can't seem to get rid of it..... or can I post it here???

First off, the error shows when a member is surfing... sometimes it will go away, most of the time it stays there... the script is an auto surf and each time it goes to another page it still shows up stating there is a division by zero in line 204 but everything looks fine in line 204.
Secondly, the error which it gives has to do with the running of the surfbar which for some reason it is causing an error which wasn't before.
Thirdly, I did post the error and what it says it's in red.

ERROR: Warning: Division by zero in /home/bizzybee/public_html/surfbar.php on line 204

<?php> if (isset($_SESSION['sess_data']['contcx']) && $credit_me == 'yes' && $_SESSION['sess_data']['won'] != 'really') {
if (($_SESSION['sess_data']['sts'] % $_SESSION['sess_data']['contcx']) == 0) {


In Bold is the problem... it's line 204 in code .... posted other because maybe it holds same error... this site was to be getting updated and I know members are wondering what happened but I want to finish updating before I let them know it's back up... help please!! Is this the right way... never had an issue like this that I couldn't fix so I usually do not have to come to forums lol .... Thanks Much!

Last edited by NeedhelpPlease; 09-16-2012 at 12:18 AM.. Reason: forgot to tell what error was and didn't post correctly
NeedhelpPlease is offline   Reply With Quote
Old 09-15-2012, 11:36 PM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,667
Thanks: 46
Thanked 456 Times in 444 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Mr Rush Hurry...

Please first of all read the sticky topic that asks you to use the appropriate code or php tags. Why? You want our help and it makes it easier for us to read your code If you make it easy for us to read your code, we might be able to help you.

Next up, please tell us what is actually wrong. Be descriptive. All you've told us is that the problem is in bold and its line number. What about it? Is it causing an error? If so what does that error message say? Is it showing on the web page? Are we supposed to understand the fault through telepathy?

Finally, it would really help if you tell us what the code is actually supposed to do so that we have a vague idea what we're up against. It's the weekend, not many regulars are on these forums at the weekend which means you're chances of help are lower than in the week. Therefore you need to give us and you a head start.
__________________
Please don't be rude: Put your php code in [php][/php] tags. It is a sticky topic at the top of the forum and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 09-15-2012, 11:52 PM   PM User | #3
NeedhelpPlease
New to the CF scene

 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
NeedhelpPlease is an unknown quantity at this point
Hi

I reformatted my post thanks
NeedhelpPlease is offline   Reply With Quote
Old 09-16-2012, 09:14 AM   PM User | #4
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
$_SESSION['sess_data']['sts'] % $_
SESSION['sess_data']['contcx']

Thats a modulus operation i.e get the remainder in the division between $_SESSION['sess_data']['sts'] and SESSION['sess_data']['contcx']. According to your error, $_SESSION['sess_data']['contcx'] is zero. Since you cannot divide a number by zero.

Your problem is therefore from where SESSION['sess_data']['contcx'] get's it's value prior to the above operation.Try debugging by echoing up the code and you'll find the error.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:48 PM.


Advertisement
Log in to turn off these ads.