retrieve_conf failing, will pay for solution

I did a fresh install on my new server, restored backup from old server, and cannot apply configuration changes.
retrieve_conf failing
updated all freepbx modules,
retrieve_conf is still failing, (Reload failed because retrieve_conf encountered an error: 11)
reading through other threads, tried to run retrieve_conf on command line as root, here is the result, same as when running it from free pbx
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = amp111
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 131
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 131
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 131
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
Please update your modules and reload Asterisk by browsing to your server.

Any help would be appreciated, I need to get this server up.

was the backup done on the same version of FreePBX that you are trying to restore to?

The backup was done on version 2.3.1, so, a different version.
I had to use a higher version of CentOS dues to hardware compatibility, and thus a higher version of trixbox and freePBX. Am I hosed or is there a workaround?

I upgraded the 2.3.1 system to 2.4, did a backup, tried restore again, same thing.

If I do a fresh install on the second server, and freepbx is the same version, must asterisk and trixbox be the same version, or can I backup from one system and restore to the other?
after doing the second restore I get this error now
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = amp111
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: array_keys(): The first argument should be an array in /var/www/html/admin/extensions.class.php on line 209
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/extensions.class.php on line 209
Please update your modules and reload Asterisk by browsing to your server.

here is the line where it would be failing
foreach (array_keys($this->_exts[$section]) as $extension) {
foreach (array_keys($this->_exts[$section][$extension]) as $idx) {

					$ext = $this->_exts[$section][$extension][$idx];
					
					//echo "[$section] $extension $idx\n";
					//var_dump($ext);
						
					$output .= "exten => ".$extension.",".
						$ext['basetag'].
						($ext['addpri'] ? '+'.$ext['addpri'] : '').
						($ext['tag'] ? '('.$ext['tag'].')' : '').
						",".$ext['cmd']->output()."\n";
				}
				if (isset($this->_hints[$section][$extension])) {
					foreach ($this->_hints[$section][$extension] as $hint) {
						$output .= "exten => ".$extension.",hint,".$hint."\n";
					}
				}
			}