Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.6k stars 397 forks source link

PHP errors on new install #5738

Closed KnoAll closed 1 month ago

KnoAll commented 2 months ago

I have a clean install and am getting PHP errors... 2024-04-29 12:52:03 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 2024-04-29 12:52:03 - ERROR PHP ERROR: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /var/www/html/cacti/poller_boost.php:503 Stack trace: #0 /var/www/html/cacti/poller_boost.php(503): date() #1 /var/www/html/cacti/poller_boost.php(138): boost_time_to_run() #2 {main} thrown in file: /var/www/html/cacti/poller_boost.php on line: 503

This is on: AlmaLinux 9.3 PHP 8.1.28 official release Cacti 1.2.26

reproduced on both 1.2.x branch as well as 1.3.x from git.

TheWitness commented 2 months ago

Check out my fork. It should be fixed there.

KnoAll commented 2 months ago

Looks to be working as expected now. Thanks!

KnoAll commented 1 month ago

Am getting another similar issue....

2024-05-02 15:05:18 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_rrdcheck.php[159]:do_rrdcheck(), /lib/rrdcheck.php[170]:is_resource_writable(), /lib/functions.php[6660]:fopen(), CactiErrorHandler()) 2024-05-02 15:05:18 - ERROR PHP WARNING: fopen(/var/www/html/cacti/rra/mm-fortigate_traffic_in_73.rrd): Failed to open stream: Permission denied in file: /var/www/html/cacti/lib/functions.php on line: 6660 2024-05-02 15:05:18 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_rrdcheck.php[159]:do_rrdcheck(), /lib/rrdcheck.php[170]:is_resource_writable(), /lib/functions.php[6660]:fopen(), CactiErrorHandler()) 2024-05-02 15:05:18 - ERROR PHP WARNING: fopen(/var/www/html/cacti/rra/mm-fortigate_traffic_in_72.rrd): Failed to open stream: Permission denied in file: /var/www/html/cacti/lib/functions.php on line: 6660 2024-05-02 15:05:18 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_rrdcheck.php[159]:do_rrdcheck(), /lib/rrdcheck.php[170]:is_resource_writable(), /lib/functions.php[6660]:fopen(), CactiErrorHandler()) 2024-05-02 15:05:18 - ERROR PHP WARNING: fopen(/var/www/html/cacti/rra/mm-fortigate_traffic_in_71.rrd): Failed to open stream: Permission denied in file: /var/www/html/cacti/lib/functions.php on line: 6660

TheWitness commented 1 month ago

That's a legit permission error not a bug.

KnoAll commented 1 month ago

Yep, sorry about that. thanks again.