FreePBX | Register | Issues | Wiki | Portal | Support

FreePBX 13 BETA GUI Updater


(Neil Townsend) #21

Happy to do that, but what do you mean by, “proceed manually”? I’m probably sounding dim here …


(Andrew Nagy) #22

fwconsole moduleadmin upgrade core
fwconsole moduleadmin upgrade backup
fwconsole moduleadmin upgradeall


(Neil Townsend) #23

Thanks, will do, I’ll report issues (if any) here.


(Neil Townsend) #24

This might help. First command (moduleadmin upgrade core) output:

No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting core download…
Processing core
Downloading…
2287402/2287402 [============================] 100%
Finished downloading
Extracting…Done
Module core successfully downloaded
PHP Fatal error: Cannot redeclare superfecta_hook_core() (previously declared in /home/neil/git/Caller-ID-Superfecta/functions.inc.php:3) in /home/neil/git/Caller-ID-Superfecta/functions.inc.php on line 47
Whoops\Exception\ErrorException: Cannot redeclare superfecta_hook_core() (previously declared in /home/neil/git/Caller-ID-Superfecta/functions.inc.php:3) in file /home/neil/git/Caller-ID-Superfecta/functions.inc.php on line 47
Stack trace:

  1. () /home/neil/git/Caller-ID-Superfecta/functions.inc.php:47

For reference, although the path is different, I’m pretty sure that is an in sync version of Superfecta/functions.inc.php - I’ll check.


(Andrew Nagy) #25

That’s your issue. You have an unsupported dev version of superfecta loaded. So the functions are all being loaded twice. This isn’t something we can account for.


(Andrew Nagy) #26

No. The issue is that you have superfecta files in AMPWEBROOT that are referenced to /home and are being loaded twice.


(Neil Townsend) #27

Really? I thought that the error said that both declarations were in the same file (lines 3 and 47 of /home/neil/…/functions.inc.php


(Andrew Nagy) #28

They are in the same file. This is how PHP works it has to do with paths for include, basically it’s saying include functions.inc.php from /var/www AND /home, they are the same file but PHP doesnt know that. You have file symlinked and they are being loaded twice. Doesn’t matter if they are the same file. They are being loaded twice. save your changes into superfecta git and checkout superfecta git into /var/www/html/admin/modules and you won’t have this problem.


(Neil Townsend) #29

Wow - learn something new every day. I’ll unpick this and press on, thanks for your help,


(Andrew Nagy) #30

This is why include_once and require_once are unreliable as they work based on paths.


(Neil Townsend) #31

Got it. Knew there was a reason not to like them.


(Neil Townsend) #32

Interesting that it works in normal use though - I’ve done all my development work this way so far!


(Andrew Nagy) #33

There are only two supported ways to do development on FreePBX. Using devtools or checking out directly into /var/www/html/admin/modules

Anything else is unsupported and will have issues.


(Neil Townsend) #34

Learning point #2. Sorry I missed that until now.


(Neil Townsend) #35

I post with a bit of trepidation now, but

a) module admin upgrade worked.

b) module admin backup resulted in:

No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting backup download…
Processing backup
Downloading…
336904/336904 [============================] 100%
Finished downloading
Extracting…Done
Module backup successfully downloaded

[Whoops\Exception\ErrorException]
Missing argument 2 for Backup::__construct(), called in /var/www/html/admin/libraries/BMO/Self_Helper.class.php on line 125 and defined

ma [-f|–force] [-d|–debug] [–format="…"] [-R|–repo="…"] [args1] … [argsN]

ls -al in /var/…/libraries/BMO/Self_Helper.class.php gives:

-rwxrwxr-x 1 asterisk asterisk 8162 Aug 19 11:01 Self_Helper.class.php

so I’m guessing that that is v.13 code?


(Andrew Nagy) #36

No self_helper is part of 12. Sorry the upgrader does this for you automatically. I forgot you have to first disable backup then upgrade it.


(Neil Townsend) #37

Oddly:

root@raspbx:~# /var/lib/asterisk/bin/fwconsole moduleadmin disable backup
The following error(s) occured:

  • Module not enabled: cannot disable

but then …

root@raspbx:~# /var/lib/asterisk/bin/fwconsole moduleadmin upgrade backup
No repos specified, using: [standard,extended,unsupported] from last GUI settings

Starting backup download…
Processing backup
Verifying local module download…Verified
Extracting…Done
Module backup successfully downloaded
Generating CSS…Done
Module backup successfully installed
Updating Hooks…Done

So, somehow in the process of failing it had disabled backup, which meant it then worked!


(Neil Townsend) #38

OK, all done. I presume that I can now go to the web interface? Or are there more commands or perhaps a reboot needed?


(Neil Townsend) #39

@tm1000 This may well be due to the rather messy process I’ve got this far, but when I try to take the next obvious step, fwconsole r, I get the following failure message:

root@raspbx:~# /var/lib/asterisk/bin/fwconsole r
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Whoops\Exception\ErrorException: Invalid argument supplied for foreach() in file /var/www/html/admin/modules/featurecodeadmin/functions.inc.php on line 100
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/featurecodeadmin/functions.inc.php:100
  2. Whoops\Run->handleError() /var/www/html/admin/modules/featurecodeadmin/functions.inc.php:100
  3. featurecodeadmin_check_destinations() /var/www/html/admin/libraries/usage_registry.functions.php:145
  4. framework_check_destination_usage() /var/www/html/admin/libraries/usage_registry.functions.php:340
  5. framework_list_problem_destinations() /var/lib/asterisk/bin/retrieve_conf:733

Looking at the code, I would guess at the following sequence:

  1. featurecodeadmin_check_destinations() has been called with dest=true
  2. (line 82 of featurecodeadmin/functions.inc.php) it calls featurecodeadmin_destinations() and that function returns not an array (null, at a guess).
  3. (line 91) $results it set to that value
  4. (line 100) $results is used to seed foreach, which then fails

Obviously this is my hypothesis, but if I re-run with a var_dump($results), it says that $results is NULL at line 100.

If I disable the featurecodeadmin module, the reload works fine, if I enable it again the error returns.

Happy for you tell me this is all due to my earlier errors, but thought you should know of this possible failure route.


(Andrew Nagy) #40

Fixed in featurecodeadmin v13.0.3