Admin page reports Retrieve conf failed to copy file(s) from a module's agi-bin dir

I am using Ubuntu Server 10.04.1 LTS with Asterisk 1.8.0 from a ppa repository with Freepbx 2.8.0.4. I have everything working, but this error message persists.

Retrieve conf failed to copy file(s) from a module’s agi-bin dir:
Added 8 seconds ago
(retrieve_conf.CPAGIBIN)

If I execute “/var/lib/asterisk/bin/retrieve_conf”, the following is output:

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 = /usr/share/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 = XXXXXXX
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = XXXXXXX
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
Notice: no Queues defined
Notice: no Conferences defined
Table does not exist: parkinglot
Notice: no sip trunks defined
Notice: no iax trunks defined
Notice: no AMP Users defined

I have changed permissions on all directories involved to 777 with no change. Anyone have any ideas?

I downloaded the latest extentions.class.php from here http://www.freepbx.org/trac/browser/freepbx/trunk/amp_conf/htdocs/admin/libraries/extensions.class.php?rev=10713, amd then replaced the one in /var/www/freepbx/admin after backing up the original. I ran a diff on the two and found this:

< if (is_array($this->_exts[$section][$extension])) foreach (array_keys($this->_exts[$section][$extension]) as $idx) {

                                  foreach (array_keys($this->_exts[$section][$extension]) as $idx) {

1289,1294c1289
< global $version; // Asterisk Version
< if (version_compare($version, “1.4”, “lt”)) {
< return “SetMusicOnHold(”.$this->data.")";
< } else {
< return “Set(CHANNEL(musicclass)=”.$this->data.")";
< }

          return "SetMusicOnHold(".$this->data.")";

After replacing the file, all is well and retrieve_conf runs successfully.