Error when runing icingacli setup token create

Hello I have Icinga2 and php with following shown below version/config below
When i try to execute following commandicingacli setup token create i have following error below , do i miss something or wrong version ?
Please advice
Thanks

Error

PHP Fatal error:  Uncaught ErrorException: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/php/Icinga/Application/Modules/Module.php:689
Stack trace:
#0 /usr/share/php/Icinga/Application/ClassLoader.php(303): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, '"continue" targ...', '/usr/share/php/...', 689, Array)
#1 /usr/share/php/Icinga/Application/ClassLoader.php(303): require()
#2 [internal function]: Icinga\Application\ClassLoader->loadClass('Icinga\\Applicat...')
#3 /usr/share/php/Icinga/Application/Modules/Manager.php(227): spl_autoload_call('Icinga\\Applicat...')
#4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(464): Icinga\Application\Modules\Manager->loadModule('setup')
#5 /usr/share/php/Icinga/Application/Cli.php(46): Icinga\Application\ApplicationBootstrap->loadSetupModuleIfNecessary()
#6 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(369): Icinga\Application\Cli->bootstrap()
#7 /usr/bin/icingacli(7): Icinga\Applica in /usr/share/php/Icinga/Application/Modules/Module.php on line 689

Fatal error: Uncaught ErrorException: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/php/Icinga/Application/Modules/Module.php:689
Stack trace:
#0 /usr/share/php/Icinga/Application/ClassLoader.php(303): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, '"continue" targ...', '/usr/share/php/...', 689, Array)
#1 /usr/share/php/Icinga/Application/ClassLoader.php(303): require()
#2 [internal function]: Icinga\Application\ClassLoader->loadClass('Icinga\\Applicat...')
#3 /usr/share/php/Icinga/Application/Modules/Manager.php(227): spl_autoload_call('Icinga\\Applicat...')
#4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(464): Icinga\Application\Modules\Manager->loadModule('setup')
#5 /usr/share/php/Icinga/Application/Cli.php(46): Icinga\Application\ApplicationBootstrap->loadSetupModuleIfNecessary()
#6 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(369): Icinga\Application\Cli->bootstrap()
#7 /usr/bin/icingacli(7): Icinga\Applica in /usr/share/php/Icinga/Application/Modules/Module.php on line 689

php version

PHP 7.3.4-1+ubuntu18.04.1+deb.sury.org+3 (cli) (built: Apr 10 2019 10:51:11) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.4-1+ubuntu18.04.1+deb.sury.org+3, Copyright (c) 1999-2018, by Zend Technologies

Icinga2 version

icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.4-1)

Copyright (c) 2012-2019 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Ubuntu
  Platform version: 18.04.2 LTS (Bionic Beaver)
  Kernel: Linux
  Kernel version: 4.15.0-46-generic
  Architecture: x86_64

Build information:
  Compiler: GNU 7.3.0
  Build host: b2ecadfb68ab

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

Icingaweb2 is currently not compatible with PHP 7.3, I would suggest running PHP 7.1 for the best experience. There is an upcoming release that should be compatible with PHP 7.3

1 Like

Thanks for the rapid answer cheers :smiley:

I have PHP 7.1 and have the same output, what should i change ? or what could be broken?