Can't view Admin page: PHP fatal error, "Cannot redeclare checkSetup()" -- and possible bug fix

General support for the Pi-Star System
Post Reply
KC1HBK
Posts: 3
Joined: Mon Nov 14, 2022 1:38 am

Can't view Admin page: PHP fatal error, "Cannot redeclare checkSetup()" -- and possible bug fix

Post by KC1HBK »

I'm trying to load the admin page, and I get this error. All other pages seem to load just fine.

Code: Select all

 Fatal error: Cannot redeclare checkSetup() (previously declared in /var/www/dashboard/mmdvmhost/tools.php:77) in /var/www/dashboard/admin/mmdvmhost/tools.php on line 77
Looking at the code, it seems to be failing when it runs the line "include_once 'mmdvmhost/tools.php';". However, inside "dstarrepeater/system.php" which loads before this (even though I'm not using D-Star features), I see that there's "include_once $_SERVER['DOCUMENT_ROOT'].'/mmdvmhost/tools.php';".

I edited "tools.php" to add "$_SERVER['DOCUMENT_ROOT']" to the "include_once" line and it appears everything is working, though my callsign is still showing up as M1ABC.
I'm actually W1DNS now.
KN2TOD
Posts: 268
Joined: Sun Nov 11, 2018 6:36 pm

Re: Can't view Admin page: PHP fatal error, "Cannot redeclare checkSetup()" -- and possible bug fix

Post by KN2TOD »

What version of Pi-Star are you running? And are you running in Repeater mode or MMDVM mode?
KC1HBK
Posts: 3
Joined: Mon Nov 14, 2022 1:38 am

Re: Can't view Admin page: PHP fatal error, "Cannot redeclare checkSetup()" -- and possible bug fix

Post by KC1HBK »

Pi-Star:4.1.6 / Dashboard: 20221029, in MMDVM simplex mode.
I'm actually W1DNS now.
AF6VN
Posts: 821
Joined: Fri Jul 20, 2018 1:15 am

Re: Can't view Admin page: PHP fatal error, "Cannot redeclare checkSetup()" -- and possible bug fix

Post by AF6VN »

Try pistar-update/pistar-upgrade (from SSH session) -- your dashboard seems a bit dated (mine shows 20221114)

--
AF6VN
Dennis L Bieber
KC1HBK
Posts: 3
Joined: Mon Nov 14, 2022 1:38 am

Re: Can't view Admin page: PHP fatal error, "Cannot redeclare checkSetup()" -- and possible bug fix

Post by KC1HBK »

Thanks, that did it. I'm now on Pi-Star 4.1.6 and dashboard 20221114, and it's working. I had to reapply settings to replace M1ABC with my callsign, but it's fine now.
I'm actually W1DNS now.
Post Reply