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

PHP Parse ERROR #57

Open
ghost opened this issue Apr 9, 2021 · 1 comment
Open

PHP Parse ERROR #57

ghost opened this issue Apr 9, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 9, 2021

Main question

Hello, a trap is received but when is handle by the TrapApi I got this message

Apr 9 15:12:50 socadm snmptrapd: PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsProcess/TrapApi.php on line 21

Also when I go to /icingaweb2/trapdirector/status/plugins
Parse error
: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in
/usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsProcess/TrapApi.php
on line
21

Your Environment

If related to the question in any way :

  • trapdirector version (in icinga web 2 : System - About): 1.0.7a
  • Icinga Web 2 version and modules (in icinga web 2 : System - About): Icinga Web 2 Version 2.8.2
  • Icinga 2 version (icinga2 --version): (version: 2.12.3)
  • Operating System and version: RedHat7
  • Webserver, PHP versions: PHP Version 7.0.33
@6bIBAET
Copy link

6bIBAET commented Dec 1, 2021

Same too.
Editing /usr/share/icingaweb2/modules/trapdirector/library/Trapdirector/TrapsProcess/TrapApi.php
on line 21, 22 and 23 change from
public const MASTER=1;
public const MASTERHA=2;
public const SAT=3;
to
const MASTER=1;
const MASTERHA=2;
const SAT=3;

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

1 participant