PHP Errors with php8.1

Issue #1254 resolved
Matthias Knopp created an issue

I managed to install piler 1.3.12 on a fresh ubuntu server 22.04 virtual machine. I’m using apache for the gui. Ubuntu 22.04 is using php 8.1 as php interpreter. Nearly everything works except:

In Admin mode the statistics graph isn’t show

In the browsers debug console in the network console I get error 500 requests. In the apache log I found the following error messages:

[Sun Aug 21 10:21:52.167989 2022] [php:error] [pid 1355] [client 192.168.188.33:50646] PHP Fatal error:  Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /var/piler/www/system/helper/libchart/classes/view/chart/PieChart.php on line 67, referer: http://ubuntuvm:8080/index.php?route=stat/stat&timespan=daily

Furthermore in the audit section nothing is shown

But of course there should be entries. In the apache log I found the following php warning:

[Sun Aug 21 10:28:49.188943 2022] [php:warn] [pid 1766] [client 192.168.188.33:50744] PHP Warning:  Undefined array key "count" in /var/piler/www/model/audit/audit.php on line 77, referer: http://ubuntuvm:8080/index.php?route=audit/audit

Viewing emails creating users changing passwords and all the other stuff I checked is working.

Comments (5)

  1. Janos SUTO repo owner

    I’ve addressed the ubuntu 22.04 compatibility issues on the master branch. Please give it a try, and confirm if it works properly.

  2. Matthias Knopp reporter

    I copied the files from master webui path to piler/www folder on my server and can confirm that both problems are solved.

    Thanks now, I can upgrade my server to ubuntu 22.04

    Am I supposed to close the issue?

  3. Log in to comment