Skip to content
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

[CACTI 1.2.x latest + syslog latest] PHP error after latest commits for 1.3 branch compatibility #231

Open
anarkia1976 opened this issue Nov 7, 2024 · 4 comments

Comments

@anarkia1976
Copy link

Hi @TheWitness ,

we see a lot of errors into cacti logs after latest commits:

f92bb39 Fix #230 - SQL Errors due to missing field definitions
33da506 Fixing the install advisor for syslog
62a651a QA: Modifications for Cacti 1.3 and Add Aria Storage Engine

2024-11-07 14:06:07 - CMDPHP PHP ERROR Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1848]:title_trim(), /lib/functions.php[37]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP DEPRECATED: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in file: /var/www/html/cacti/lib/functions.php on line: 37
2024-11-07 14:06:07 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1848]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "" in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1848
2024-11-07 14:06:07 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1848]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP WARNING in Plugin 'syslog': Trying to access array offset on value of type null in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1848
2024-11-07 14:06:07 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1839]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "" in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1839
2024-11-07 14:06:07 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1839]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP WARNING in Plugin 'syslog': Trying to access array offset on value of type null in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1839
2024-11-07 14:06:07 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1838]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP WARNING in Plugin 'syslog': Undefined array key "" in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1838
2024-11-07 14:06:07 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1838]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP WARNING in Plugin 'syslog': Trying to access array offset on value of type null in file: /var/www/html/cacti/plugins/syslog/syslog.php on line: 1838
2024-11-07 14:06:07 - CMDPHP PHP ERROR Backtrace: (/plugins/syslog/syslog.php[102]:syslog_messages(), /plugins/syslog/syslog.php[1848]:title_trim(), /lib/functions.php[37]:CactiErrorHandler())
2024-11-07 14:06:07 - ERROR PHP DEPRECATED: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in file: /var/www/html/cacti/lib/functions.php on line: 37

thanks a lot. stefano.

@xmacan
Copy link
Member

xmacan commented Nov 7, 2024

@anarkia1976 please show part of config.php and config_local.php (if exists)
Lines beginning $syslog_incoming_config

@TheWitness
Copy link
Member

I'm wondering if this is a consequence of not having a config.php to users with existing installs just doing a pull?

@morganfw
Copy link

morganfw commented Nov 7, 2024

@anarkia1976 please show part of config.php and config_local.php (if exists) Lines beginning $syslog_incoming_config

We have config.php file only

root@cacti:/var/www/html/cacti/plugins/syslog# ls -latrh config*
-rwxrwxr-x 1 www-data www-data 3.5K Nov  7 14:08 config.php.dist
-rwxrwxr-x 1 www-data www-data 3.4K Nov  7 14:08 config.php
-rwxrwxr-x 1 www-data www-data 3.7K Nov  7 14:08 config_local.php.dist

requested file content below:

root@cacti:/var/www/html/cacti/plugins/syslog# grep "\$syslog_incoming_config" config.php

$syslog_incoming_config['timeField']          = 'logtime';
$syslog_incoming_config['priorityField']      = 'priority_id';
$syslog_incoming_config['facilityField']      = 'facility_id';
$syslog_incoming_config['hostField']          = 'host_id';
$syslog_incoming_config['textField']          = 'message';
$syslog_incoming_config['id']                 = 'seq';

@xmacan
Copy link
Member

xmacan commented Nov 8, 2024

I tried update one syslog from 4.0 to 4.2 (with patch #233) and my log is clear.
Fresh installation of 4.2 works to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants