Reload failed because retrieve_conf encountered an error: 255

I can’t apply configuration since upgrading modules today… help…

This is the error shown in the icky orange box:

[code]exit: 255

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 = elastix456
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = eLaStIx.asteriskuser.2oo7
PHP Fatal error: Call to a member function output() on a non-object in /var/www/html/admin/extensions.class.php on line 303

1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details. [/code]

And when I run at the CLI, I get this:

[code][[email protected] ~]# /var/lib/asterisk/bin/retrieve_conf

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
PHP Warning: include_once(modules/voicemail/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 22
PHP Warning: include_once(): Failed opening ‘modules/voicemail/functions.inc.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 22
PHP Warning: include_once(modules/dictate/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 23
PHP Warning: include_once(): Failed opening ‘modules/dictate/functions.inc.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 23
PHP Warning: include_once(modules/languages/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 24
PHP Warning: include_once(): Failed opening ‘modules/languages/functions.inc.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 24
PHP Warning: include_once(modules/findmefollow/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 25
PHP Warning: include_once(): Failed opening ‘modules/findmefollow/functions.inc.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/modules/bulkextensions/functions.inc.php on line 25
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 = elastix456
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = eLaStIx.asteriskuser.2oo7
PHP Fatal error: Call to a member function output() on a non-object in /var/www/html/admin/extensions.class.php on line 303
[[email protected] ~]#[/code]

After uninstalling the Bulk Extensions module, the file missing errors disappeared, but the last one that it causing it not to reload remains.

So the question remains… what is this error?

and this is what appears at that point in the file:

[code] //var_dump($ext);

                                            $output .= "exten => ".$extension.",".
                                                    $ext['basetag'].
                                                    ($ext['addpri'] ? '+'.$ext['addpri'] : '').
                                                    ($ext['tag'] ? '('.$ext['tag'].')' : '').
                                                    ",".$ext['cmd']->output()."\n";
                                    }[/code]

The line containing the “output” directive is line 303.

Check line 405 of file /var/www/html/admin/extensions.class.php that it contains function output().

As for the other error, that is a bug. If you install bulkextensions without voicemail module you get the above error. I will file a ticket for that.

What version of php do you have? Run php -v from a shell and post the result here.

I checked line 405 and it contains:

I uninstalled the bulkextensions module already, so that part is solved.

As for php version…

[[email protected] ~]# php -v PHP 5.1.6 (cli) (built: Jan 13 2010 17:13:05) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies [[email protected] ~]#

This is running on an Elastix 1.4.29 on Centos (fully yummed as of today) and we are running on 32-bit proc.

what did you upgrade from and to.

This error usually occurs when a module is using an extensions class that has not yet been defined in extensions.class.php.

It’s usually a result of the framework’s version of functions.inc.php not being up to date of what the module may expect as a lot of times the modules don’t put dependencies on what framework versions are required, especially during betas (they expect you to upgrade everything.)

I just tested my install of Elastix, yum update and then an update of FreePBX. No errors at all. Check that FreePBX is up to date in Module Admin.

Something is different on your system. This is not happening to other users and there are well over 1000 2.7 installations running already.

Do a diff of your version of /var/www/html/admin/extensions.class.php vs. what is in the SVN repository for the same:

http://www.freepbx.org/v2/svn/freepbx/freepbx/amp_conf/htdocs/admin/extensions.class.php

That will show if the issue is there. Then it’s a question of what kept you from getting the correct one assuming that is where the issue is. This file gets brought in through the “framework module.”

I do not know what version we had before, but I know that we keep all FreePBX modules and all yum updates current within a week or two.

As of the occurrence of this issue, all updates were completed, including the move to the beta FreePBX. (I always follow the upgrade tool’s instructions to the letter.)

This is certainly not behavior that I would expect from FreePBX, so I’m really not sure what to do. We have no customizations and all updates have been completed via the module admin or via yum.

“PHP Fatal error: Call to a member function output() on a non-object in /var/www/html/admin/extensions.class.php on line 303”

Only occurs if I set an inbound route to a fax but forget to add a destination for voice calls

http://www.freepbx.org/trac/ticket/4098

That was to early, I just tested the scenario on an upgraded FreePBX 2.6 to 2.7. Installed the fax module, and only selected destination for fax and it worked.

So I closed the ticket as worksforme, have you tried to uninstall the fax module and install it again?

OK so also encounter the same issue here and this is what I came up with after digging and troubleshooting some…
While it may look like the issue is in the bulk load and unloading it may resolve the problem this is not what is the underlying bug (from what I can see)

Currently you can create a inboud DID route and then forget, neglect or for what ever reason fail to select a default destination for that route, why you would want a DID without a destination is beyond me but for whatever reason it works and you can skip it.

Now if you turn on the FAX DETECTION for that inbound DID route and then neglect to put a default destination in for voice calls… BAM reload bombs hard.

There is a prompt that pops up telling you if you fail to put a default destination for faxes that this is manditory and will not let you continue… Is it as simple as putting this check in also for the default voice destination or if some one has a vaild reason for not having a default voice destination can a “null” destination be added or something similar?

Dave Meade
Lumin-x Technical Services
~ why get the rest when you can get Lumin-x!