13 to 14 distro-upgrade php errors / asterisk will not start

Hi, have a 10.13.66 and trying to upgrade to 14. Modules were checked for latest prior to upgrade. Ran yum update prior to running upgrade.

When upgrade was completed after 2nd reboot, login to server displays:

PHP Fatal error:  Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Whoops\Exception\ErrorException: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in file /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Stack trace:
  1. () /var/www/html/admin/libraries/Console/RemoteUnlock.class.php:23
PHP Fatal error:  Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Whoops\Exception\ErrorException: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in file /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Stack trace:
  1. () /var/www/html/admin/libraries/Console/RemoteUnlock.class.php:23

Asterisk is not running # fwconsole start displays

PHP Fatal error:  Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Whoops\Exception\ErrorException: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in file /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Stack trace:
  1. () /var/www/html/admin/libraries/Console/RemoteUnlock.class.php:23

Anyone know a fix for this?
Thanks.

Did you run the Recovery from a failed upgrade script?
https://wiki.freepbx.org/display/PPS/Upgrading+from+FreePBX+10.13.66+to+SNG7#UpgradingfromFreePBX10.13.66toSNG7-Recoveryfromafailedupgrade

Hi, ran ./post-upgrade twice. I will go check the link you put above.
Thanks.

Ran ./post_upgrade again, after reboot, ssh to server and see:

PHP Fatal error:  Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Whoops\Exception\ErrorException: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in file /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Stack trace:
  1. () /var/www/html/admin/libraries/Console/RemoteUnlock.class.php:23
PHP Fatal error:  Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Whoops\Exception\ErrorException: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in file /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Stack trace:
  1. () /var/www/html/admin/libraries/Console/RemoteUnlock.class.php:23

fwconsole chown

PHP Fatal error: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Whoops\Exception\ErrorException: Cannot redeclare class FreePBX\Console\Command\RemoteUnlock in file /var/www/html/admin/libraries/Console/RemoteUnlock.class.php on line 23
Stack trace:

  1. () /var/www/html/admin/libraries/Console/RemoteUnlock.class.php:23

Any ideas?
Thanks.

Have you tried downloading and reinstalling Framework?

I see the issue, run this:

mv /var/www/html/admin/libraries/Console/RemoteUnlock.class.php /tmp

Hi, i looked in the /Console DIR and there were two of them…
-rw-rw-r-- 1 asterisk asterisk 978 Feb 23 13:57 RemoteUnlock.class.php
-rw-rw-r-- 1 asterisk asterisk 1016 Apr 18 2019 Remoteunlock.class.php

mv Remoteunlock.class.php Remoteunlock.class.php-4-18-19

fwconsole chown

Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
38883 [============================]
Finished setting permissions

# fwconsole start

Running FreePBX startup…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
38883 [============================]
Finished setting permissions
Starting Asterisk…
[----->----------------------] 34 secs

Looks like it will fail.

]# fwconsole restart
Asterisk not currently running
Running FreePBX shutdown…

UCP Node Server is not running

Running FreePBX startup…
Running Asterisk pre from Sysadmin module
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for XXXX9703
Checking Vpn server
Starting Asterisk…
[--------------->------------] 1 min

[Exception]
Unable to connect to Asterisk. Did it start?

restart [-i|–immediate] [–] []…

asterisk is running and can’t stop it.

fwconsole stop

Running FreePBX shutdown…

UCP Node Server is not running

[Whoops\Exception\ErrorException]
fclose(): 71 is not a valid stream resource

stop [–pre] [–post] [-i|–immediate] [-m|–maxwait [MAXWAIT]] [–] []…

Try moving both of them to the tmp folder as suggested.

Run

fwconsole ma refreshsignatures

Try restarting fwconsole

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.