Jump to content

urgent help please


andy40

Recommended Posts

Hi i had someone join my affiliate and now i have this error below plus when they login the quicknav bar on the right goes to the bottom of the page can anyone help??

 

Warning: Division by zero in /home//public_html/support/admin/affiliates.php on line 0

Link to comment
Share on other sites

Can you provide anymore details? There's not really a whole lot to go by here. Some screen shots or some code blocks could be helpful.

 

Hi i had someone join my affiliate and now i have this error below plus when they login the quicknav bar on the right goes to the bottom of the page can anyone help??

 

Warning: Division by zero in /home//public_html/support/admin/affiliates.php on line 0

Link to comment
Share on other sites

Hi in WHMCS when i look at affiliates it as this error below and also when i login as the client the error is at the top of the page plus it makes the page go over to the left and the quicknav bar on the right go down to the bottom but its fine on all other pages on get the error when i click affiliates

 

Warning: Division by zero in /home//public_html/support/admin/affiliates.php on line 0

Link to comment
Share on other sites

To start with, you probably want to disable errors if you're on a production site. You can turn them off in your php ini file, or in your root folder for WHMCS create a file called .htaccess and paste the following line in it:

 

php_flag display_errors off

 

See if that fixes the display issue, it might just be the error message that's breaking your template.

Link to comment
Share on other sites

hi i have a httaccess file in there with announcements / download / knowledgebase in there do i add the line to that file and where abouts?

 

It doesn't matter where, just as long as it's in there on it's own line. It doesn't make the error go away, something is still trying to divide by zero, but it wont' show it on the screen anymore, so your clients won't be able to see it.

Link to comment
Share on other sites

Also, make sure the file name is .htaccess and not htaccess.txt. By default, they put it in there as htaccess.txt but his has to be renamed to .htaccess in order for it to be active.

 

If it wasn't active, make sure to either remove the lines with announcments/downloads/knowledgebase or enable SEO friendly URLs in the admin area.

Link to comment
Share on other sites

hi did that but nothing happend and also it only does it when i am logged in with the one customer who joind tonight all the oters are fine ?

 

You did that, and the error still appears on the page?

 

And just to clarify, this is doing this in the client area when you are logged in with the client, not when you're logged in through the admin area?

 

Did you customize the affiliates page template at all?

Link to comment
Share on other sites

I'm not sure either, it's really hard to say, I can't see the page, or the code, so I'm kind of just guessing here. From looking at the error something is trying to divide by zero. This is happening on line 0, so I don't really know where since line 0 doesn't really exist. Can you attach or PM me a screenshot of the page with the error? You might want to block out the client's information first though before posting.

Link to comment
Share on other sites

hi just changed it to default instead of portal and it was still the same so its nothing to do with them

 

You need to figure out why your errors are being displayed on screen. Since it's a live site, you want them to be logged instead of shown on screen anyways. Once they are hidden, I suspect the style errors will go away.

 

The only thing I can think of that would be generating the warning is when the page calculates the conversion rate, since it would be dividing the sales by the referrals, and since both are 0 it would be dividing by zero if it isn't caught properly. Since the program is encrypted I can't see what they're doing.

 

Other then that, I don't know what else I have to offer, it's really hard to diagnose something when I can't see the code myself. Maybe someone else has gotten the same error themselves or perhaps WHMCS can offer a suggestion.

Link to comment
Share on other sites

  • 4 months later...

I know this thread is a bit old, but I recently ran into this issue in the affiliates module in WHMCS and thought I would share what I found. This problem was happening on my installation for one affiliate only as well, all the other affiliates did not throw this error. In looking at this one affiliates account I noticed that they had zero referrals, just happens to be a company we do a lot of business with and they send their client details to use via phone/email and we setup the accounts for them and mark them as the affiliate for the account - so they have never actually refered any traffic to our site using their affiliate link, i.e. http://domain.com/whmcs/*?aff=123

 

I resolved the divide by zero warning by pasting their affiliate link into a browser and hitting it once. This seems to be a defect in the WHMCS affiliate module code - they should be handling that condition in their code.

 

Hope this helps someone who may run into this in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated