Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
  Last Script Version: 24

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
New version 24: PHP fatal error (Gelesen: 551 mal)
De Hout
YaBB Newbies
*
Offline



Beiträge: 20
Alkmaar, Netherlands
Geschlecht: male
New version 24: PHP fatal error
10.11.24 um 20:02:01
 
Thank you for the new version!

After updating to v24, I did some tests to ensure the upgrade went well.

After I recreated the cache in the Admin Center, a fatal error appeared in the PHP logfiles (PHP versions 8.1.28 and 8.3.4). I'm not 100% sure if this is due to updating to v24, but I've never seen PHP Web Stats causing a fatal error before.

I don't see anything strange happening during cache rebuild. Same as it was in v20.

Code:
[10-Nov-2024 19:15:38 Europe/Amsterdam] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string / int in C:\inetpub\wwwroot\stat\func\func_cache_control.php:45
Stack trace:
#0 {main}
  thrown in C:\inetpub\wwwroot\stat\func\func_cache_control.php on line 45 

Zum Seitenanfang
« Zuletzt geändert: 10.11.24 um 21:29:40 von De Hout »  
Homepage  
IP gespeichert
 
De Hout
YaBB Newbies
*
Offline



Beiträge: 20
Alkmaar, Netherlands
Geschlecht: male
Re: PHP fatal error during cache rebuild
Antwort #1 - 14.11.24 um 20:51:26
 
I have been testing with older PHP versions.
Version 7.4.9 is the last version which produces no error during cache rebuild.
All newer versions do.

With 7.4.9 I see a progress bar during cache rebuild.
Never seen that before.

It seems the error is there since PHP version 8.0 and not introduced in stats v24.
Zum Seitenanfang
 
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1999
Geschlecht: male
Re: New version 24: PHP fatal error
Antwort #2 - 18.11.24 um 22:13:44
 
We are still analyzing to find out the reason for this.
Zum Seitenanfang
 
 
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1999
Geschlecht: male
Re: New version 24: PHP fatal error
Antwort #3 - 19.11.24 um 21:44:04
 
Hi there,

indeed, there is a bug and we already have a solution for this.

File: func_cache_control.php

Replace the lines 27, 34, and 45 as follows:

Code (PHP):
$percent = ( int ) round ( $cache_memory_address / filesize ( "../log/logdb_backup.dta" ) * 100 ); 



with this line:

Code (PHP):
$percent = ( int ) round ( (int) $cache_memory_address / filesize ( "../log/logdb_backup.dta" ) * 100 ); 



This patch will be part of our next update.

Thanks for your notice and best regards
Reimar



Zum Seitenanfang
 
 
IP gespeichert
 
De Hout
YaBB Newbies
*
Offline



Beiträge: 20
Alkmaar, Netherlands
Geschlecht: male
Re: New version 24: PHP fatal error
Antwort #4 - 21.11.24 um 20:57:08
 
It works. Thanks for the fix!
Zum Seitenanfang
 
Homepage  
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken