Downloading framework 2847320 of 2847320 (100%)
Untarring…Done.
installing files to /var/www/html…done
installing files to /var/lib/asterisk/bin…done
installing files to /var/lib/asterisk/agi-bin…done
Checking for upgrades…No further upgrades necessary
framework file install done, removing packages from module
file/directory: /var/www/html/admin/modules/framework/amp_conf removed successfully
file/directory: /var/www/html/admin/modules/framework/upgrades removed successfully
file/directory: /var/www/html/admin/modules/framework/libfreepbx.install.php removed successfully
framework installed successfully
but when you try and apply it, you get the following:
Reload failed because retrieve_conf encountered an error: 255
exit: 255
PHP Parse error: syntax error, unexpected T_FUNCTION in /var/lib/asterisk/bin/retrieve_conf on line 677
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.
Restoring a backup clears the error, but of course you are back to 2.6 - Has anyone else seen this?
I had the exact same error as GSnover. The PHP code referred to on line 677 appears to only be valid in PHP 5.3.
array_walk_recursive($funclist,
function($a) use (&$functions) { $functions[] = $a; });
I was able to restore the previous version of retrieve_conf to get rid of the error and provide a temp work-around, but I guess the better fix is for me to upgrade from PHP 5.1 to 5.3.
Thanks for this. We are having this same issue and are unable to upgrade from PHP 5.1.6, to 5.3 presently. I want to make sure I understand this workaround and am hoping you can assist.
In our retrieve_conf at line 676 & 677 is:
(Line 676) array_walk_recursive($funclist,
(Line 677) function($a) use (&$functions) { $functions[] = $a; });
Are you saying to do this?
(Line 676) array_walk_recursive($funclist,
(Line 677) <?php
(Line 678) $functions = array();
(Line 679) function flat($a) {global $functions; $functions[] = (Line 680) $a; }
(Line 681) array_walk_recursive($funclist, ‘flat’);
(Line 682) ?>
Please forgive the noob question, don’t work in PHP very often… Thank you!
@psynosis - if your not comfortable in php, DO NOT use this work around. If php53 is not available to you, restore your pbx from a backup and stay on FreePBX 2.10 for the time being.
We went ahead and changed this in the latest FreePBX Framework to play nice with PHP 5.1 and 5.2 but long term I suggest you get updated to 5.3 for support reasons.