WebSite X5Help Center

 
Chris D.
Chris D.
User

Download Button object not incrementing  en

Auteur : Chris D.
Visité 1042, Followers 1, Partagé 0  

Hello.

I recently bought WebSiteX5 Evo 2021.

I imported a project into it from V12.

I made a new page with the 'Download Button' object.

When I'm live on the internet and I download, I see the counter increment.

But, if I referesh the page, it goes back to the 'Starting number'.

It seems that the counter is not being saved at server side.

My older pages with the same download button increment and stay, no problem.

Can anyone shed any light on this for me please?

Many thanks.

Posté le
19 RéPONSES
Aleksej H.
Aleksej H.
Moderator

Hello.

  1. Please provide a link to the site.
  2. What version of PHP do you have? I recommend 7.2-7.4.
  3. Delete all site files from the hosting and upload the site again.
  4. Clear your browser cache and check.
Lire plus
Posté le de Aleksej H.
Axel  
Axel  
User

Before export, re-create all the project by CTRL + Preview 

Lire plus
Posté le de Axel  
Chris D.
Chris D.
User
Auteur

Hello.

I did CTRL + Preview

I uploaded ALL files.

The counter for this one page does not save at server side.

Here is the page > https://niftytools.co.uk/alarm-manage.html

The page is currently hidden - Not ready for public yet

Thank you in advance for you time looking.

Lire plus
Posté le de Chris D.
Chris D.
Chris D.
User
Auteur

I found this error in my server log files:

[17-Mar-2021 22:46:19 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50

[17-Mar-2021 22:46:19 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49

PHP Version = 7.2.34

Lire plus
Posté le de Chris D.
Axel  
Axel  
User

For me your link works fine

Lire plus
Posté le de Axel  
Chris D.
Chris D.
User
Auteur

But, if you refresh the page, or come back later, or use a different browser, it will go back.

Lire plus
Posté le de Chris D.
Axel  
Axel  
User

Try to find your object name: here pluginAppObj_62_05 (Chrome inspect) and after on your website go to the object directory.

Similary displaying will be 

The .txt file is the file where the count is increased .. This file changes after each download.

Check from your side if true !

Hope this helps

Enjoy !

Axel

Lire plus
Posté le de Axel  
Chris D.
Chris D.
User
Auteur

I found a different numbered object folder for it:

The file contain '6'

Lire plus
Posté le de Chris D.
Axel  
Axel  
User

Click several time to download (with x browsers) your file.

The txt file is always at 6 ?

Lire plus
Posté le de Axel  
Chris D.
Chris D.
User
Auteur

I just clciked over and over. The page showed 11. When I refresh the page, it goes back to 6.

But, it started at 3, so it's kind of working, but not every time for some reason.

It's odd.

Lire plus
Posté le de Chris D.
Axel  
Axel  
User

No more idea.foot-in-mouth

Pls wait an Incomedia technician !

Lire plus
Posté le de Axel  
Chris D.
Chris D.
User
Auteur

OK. Will do. Thank you for your time Axel.

Lire plus
Posté le de Chris D.
Incomedia
Stefano G.
Incomedia

Hello Chris

The Object simply writes a new number into the file whenever a download is started. It seems really weird that if it works once, it doesn't twice.

I've tested this on your website from a couple of devices and browsers, and it worked

Can you test this again and see if the issue persists?

Thank you

Stefano

Lire plus
Posté le de Stefano G.
Chris D.
Chris D.
User
Auteur

Hello. I clciked the download button three time and I see this:

Then, I refresh the page and see this:

I'm somewhat confused, as you can imagine.

Could it be my fault?

Lire plus
Posté le de Chris D.
Chris D.
Chris D.
User
Auteur

I don't know if this is of any help/clue, but my server PHP Error log grows from 0 to 2G in less than a week, filled with these:

[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49
[22-Mar-2021 14:21:08 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 50
[22-Mar-2021 14:21:08 UTC] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php on line 49

Lire plus
Posté le de Chris D.
Axel  
Axel  
User

Hello Chris,

Are you sure to have the "read / write" rights on this ???? home/niftytoolsco/public_html/pluginAppObj/pluginAppObj_31_09/download.php

Please check with your provider !

Enjoy!

Axel

Lire plus
Posté le de Axel  
Chris D.
Chris D.
User
Auteur

This right?

Lire plus
Posté le de Chris D.
Chris D.
Chris D.
User
Auteur

Lire plus
Posté le de Chris D.
Axel  
Axel  
User

My suggestion is to delete your actual download button object and to recreate a new one to check if same error.

Lire plus
Posté le de Axel