-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph issue. #274
Comments
Hi, I am trying to reproduce the error. |
Sure here it is
[Fri Oct 28 10:44:10.950497 2022] [php:error] [pid 999] [client 172.30.3.249:58288] PHP Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /var/www/html/daloradius/library/libchart/classes/Chart.php:81\nStack trace:\n#0 /var/www/html/daloradius/library/libchart/classes/Chart.php(81): array_push()\n#1 /var/www/html/daloradius/library/chart-mng-total-users.php(40): Chart->addPoint()\n#2 {main}\n thrown in /var/www/html/daloradius/library/libchart/classes/Chart.php on line 81, referer: <http://172.30.101.21/daloradius/mng-main.php> http://172.30.101.21/daloradius/mng-main.php
[Fri Oct 28 10:44:14.705567 2022] [php:error] [pid 1004] [client 172.30.3.249:58291] PHP Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /var/www/html/daloradius/library/libchart/classes/Chart.php:81\nStack trace:\n#0 /var/www/html/daloradius/library/libchart/classes/Chart.php(81): array_push()\n#1 /var/www/html/daloradius/library/graphs-reports-online-nas.php(41): Chart->addPoint()\n#2 {main}\n thrown in /var/www/html/daloradius/library/libchart/classes/Chart.php on line 81, referer: <http://172.30.101.21/daloradius/rep-online.php?usernameOnline=> http://172.30.101.21/daloradius/rep-online.php?usernameOnline=
[Fri Oct 28 10:44:14.717430 2022] [php:error] [pid 2660] [client 172.30.3.249:58290] PHP Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /var/www/html/daloradius/library/libchart/classes/Chart.php:81\nStack trace:\n#0 /var/www/html/daloradius/library/libchart/classes/Chart.php(81): array_push()\n#1 /var/www/html/daloradius/library/graphs-reports-online-users.php(48): Chart->addPoint()\n#2 {main}\n thrown in /var/www/html/daloradius/library/libchart/classes/Chart.php on line 81, referer: <http://172.30.101.21/daloradius/rep-online.php?usernameOnline=> http://172.30.101.21/daloradius/rep-online.php?usernameOnline=
|
On my test environment (PHP 7.4 / Apache 2.4) graphs were working just fine. If this does not fix the issue I need more details to further investigate the problem, |
Actually not old PHP version
OS: Ubuntu Linux 22.04.1
php --version
PHP 8.1.2-1ubuntu2.6 (cli) (built: Sep 15 2022 11:30:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.6, Copyright (c), by Zend Technologies
|
I just download the new version with the fix (#275) here is a full log after reboot the apache2 service [Fri Oct 28 19:36:28.894522 2022] [mpm_prefork:notice] [pid 15521] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations |
Ok. I think the problem is an incompatibility between the library used for rendering graphs and newer PHP version(s). With #276 I have update that library to the latest version (v1.3). If the problem is still there, I think the library code (which is third-party code) should be fixed in order to work with PHP > 7.4. |
Thank you so much for your great support What I do suggest is to create VM with fresh installation of UBUNTU 22.04 and install Apache2 / freeradius / mariadb / php here below the new log [Sun Oct 30 00:33:38.761530 2022] [php:warn] [pid 4712] [client 172.30.3.249:56927] PHP Warning: Undefined variable $short_size in /var/www/html/daloradius2/library/tables-alltime-users-login.php on line 179, referer: http://172.30.101.23/daloradius2/graph-main.php |
Thank you. With #278 I think graphs problem on PHP 8.1.2 has been resolved. Keep using/testing the "not-released feature" of this product. |
thank you |
Unfortunately Filippo, [Mon Oct 31 18:27:48.298125 2022] [php:error] [pid 17359] [client 172.30.3.249:55640] PHP Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /var/www/html/daloradius2/library/libchart/classes/model/XYDataSet.php:44\nStack trace:\n#0 /var/www/html/daloradius2/library/libchart/classes/model/XYDataSet.php(44): array_push()\n#1 /var/www/html/daloradius2/library/graphs-alltime-users-login.php(72): XYDataSet->addPoint()\n#2 {main}\n thrown in /var/www/html/daloradius2/library/libchart/classes/model/XYDataSet.php on line 44, referer: http://172.30.101.23/daloradius2/graphs-alltime_logins.php?type=daily |
Understood. We need more testing. |
Thank you it is working now. |
All graph in application have errors.
Noted that the Apache error log report this info
PHP Fatal error: Uncaught TypeError: array_push(): Argument #1 ($array) must be of type array, null given in /var/www/html/daloradius/library/libchart/classes/Chart.php:81
Even on current live beta the issue is present
The text was updated successfully, but these errors were encountered: