Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    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.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  • #3
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi

    I reformatted my post thanks

  • #4
    Regular Coder Redcoder's Avatar
    Join Date
    May 2012
    Location
    /dev/null
    Posts
    332
    Thanks
    2
    Thanked 47 Times in 46 Posts
    $_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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •