Latest Upgrade Leads To Web GUI Breaking?

are you by any chance running in the development mode having installed with symlinks from the install directory?

The webroot is not defined in that file, it is defined in indirectly by the line:

require_once(’/var/www/html/admin/bootstrap.php’);

that is part of /etc/freepbx.conf

Let me know on how you are installed because I have run into this issue and have tried to fix it in various places, but the issue was because the include was done in one place based off of a dirname(FILE) that resolved to the symlink location and in another place by the use of $amp_conf variables pointing to /var/www/html/admin. I’ve tried to find the various culprits and make the changes but an already installed system may still fail. You should also try re-forcing the install from module_admin.

anyhow … let me know how it is installed, if not through symlinks I may want to take a peek at the system since I am trying to track these down. Even with symlinks which is a development mode I’d like to track them down and fix them though in that mode, not really being a “supported” installation mode, it’s not as concerning though a good way to find and attack the culprits.

hmm though re-reading your post (and the fact that I’m not quite awake) it looks like this may be something different. $amp_conf should never be undefined??? It get’s configured in bootstrap.php and should be available everywhere.

Looking at the code:

require_once(dirname(FILE) . ‘/functions.inc.php’);
$bootstrap_settings[‘framework_functions_included’] = true;

//now that its been included, use our own error handler as it tends to be much more verbose.
if ($bootstrap_settings[‘freepbx_error_handler’]) {
$error_handler = $bootstrap_settings[‘freepbx_error_handler’] === true ? ‘freepbx_error_handler’ : $bootstrap_settings[‘freepbx_error_handler’];
if (function_exists($error_handler)) {
set_error_handler($error_handler, E_ALL & ~E_STRICT);
}
}

//include database conifguration
if (!@include_once(getenv(‘FREEPBX_CONF’) ? getenv(‘FREEPBX_CONF’) : ‘/etc/freepbx.conf’)) {
include_once(’/etc/asterisk/freepbx.conf’);
}

// connect to database
require_once(dirname(FILE) . ‘/libraries/db_connect.php’); //PEAR must be installed

//keep old values as well so that we have the db settings handy
// get settings
$freepbx_conf =& freepbx_conf::create();

// passing by reference, this means that the $amp_conf available to everyone is the same one as present
// within the class, which is probably a direction we want to go to use the class.
//
$bootstrap_settings[‘amportal_conf_initialized’] = false;
$amp_conf =& $freepbx_conf->parse_amportal_conf("/etc/amportal.conf",$amp_conf);

I don’t see how $amp_conf COULD be defined before functions gets included.

Adding: die(var_dump($amp_conf)); after that shows:

[“AMPWEBROOT”]=> &string(13) “/var/www/html”

So it’s loading it fine, just too alte.

As for installation:

FreePBX x64 iso straight from the website, as of about two weeks ago I believe.

We just rolled the 64bit a week ago and it is Beta. What upgrades did you do as there have been no upgrades for the 64bit ISO yet so I am confused.

Tony

I had the same problem upgrading a 2.10 beta system. I think it was the second beta release. Last night I run the Module Admin and updated and bang it broke. I did a reinstall from scratch and upgraded again and the same thing. This is my test system at home and I don’t have access to it right now.

Same issue there.

2 days ago, I installed AsteriskNow to have a quick test platform then I upgraded to asterisk 1.8 and finaly upgraded FreePBX to the latest beta.

Today I did a module update and voila, GUI is gone and I have the following errors running amportal:

PHP Notice: Undefined index: AMPWEBROOT in /var/www/html/admin/functions.inc.php on line 14
PHP Warning: require_once(/admin/libraries/freepbx_conf.class.php): failed to open stream: No such file or directory in /var/www/html/admin/functions.inc.php on line 30
PHP Fatal error: require_once(): Failed opening required ‘/admin/libraries/freepbx_conf.class.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/functions.inc.php on line 30

We just rolled the 64bit a week ago and it is Beta.

Well that explains that, I’ll keep that in mind and submit error reports to FreePBX, we’ll unlikely need 64-bit for awhile anyway (that is a hefty phone system). Looking at my ISO I grabbed it 11/29, so I pretty much grabbed your 64-bit beta immediately after primary release!

What upgrades did you do as there have been no upgrades for the 64bit ISO yet so I am confused.

Is there a place to get recent update logs from? I’m running this for testing so I did not really keep records of anything, and wasn’t aware x64 was beta.

I experienced this same problem today while testing out the x64 beta. The problem occurred after applying module updates this morning. I believe I installed:

framework 2.10.0beta2.6

There was also another updated module that I upgraded, but I can’t recall which one it was.

The bug is in FreePBX Modules not the Distro. Bryan and Philippe are working on fixing the module

As Tony says it was a FreePBX issue nothing to do with the distro.

I fixed this earlier today, problem is, if you ran into the bug then you can’t get to module_admin to fix it. I don’t think too many people stumbled into this as it was fixed within a couple hours of being reported, If you are still broken and can’t get yourself fixed let us know and we’ll try to help you.

Same problem as everyone has reported. But how does one fix it from the command line? Or through Webmin? Obviously cannot get to the FreePBX www system to fix there…

Please would someone, be so kind as to post a fix here, when it’s been figured out??? THANKS!!!

In /var/www/html/admin/functions.inc.php

Change:

$dirname = $amp_conf[‘AMPWEBROOT’] . ‘/admin’;

To:

$dirname = ‘/var/www/html/admin’;

This should get you into the ACP, and from there you can update the module (please correct me if I’m wrong).

Phew!

You are DA - MANNNN!!!

This “noob” (>Zeane<) has now *promoted you to “FANTASTICALLY-EXCELLENT” - Cheers Mate!! Not only does your [last post] WORK > PERFECTLY - was easy to follow/do (even for me), but most importantly, you response was most timely - which helped me out - BIG TIME!!

Very much appreciated… Thanks…

Anthony - Cape Town - [email protected] zeane.com

I reinstalled a 32 bit 1.8.210.57 beta distro and all seems well.

Yes the distro was not the issue and on install of the distro you would not have the problem only once you upgraded modules from FreePBX module admin.

(NB - obviously if more detailed system data is required from me, I’d be happy to provide all/any data upon request… :slight_smile:


1 >

Upgraded all the modules to the latest, after being able to get into
the GUI again. However, now on the " System Status Page", the
following error is being shown…

Cronmanager encountered 1 Errors

The following commands failed with the listed error

/var/lib/asterisk/bin/clean_calltracking.php (127)
Added 1 days, 15 hours, 50 minutes ago
(cron_manager.EXECFAIL)


2 >

When logged in with Admin , using the FREEpbx web GUI >> selecting the option from : “ADMIN MENU” >> “FOP Panel” >> (i.e. @ https://<my_asterisk_server>/admin/modules/fw_fop/)

Returns this error message…


Forbidden

You don’t have permission to access /admin/modules/fw_fop/ on this server.


Cheers,

    Anthony :-)

#2:

ls -l /var/www/html/admin/modules/
ls -l /var/www/html/admin/modules/fw_fop

So I can see permissions/ownership of fw_fop and it’s files, I’m curious…

As for #1, I’m not familiar enough to FreePBX to know where cron failures will be logged to.

I had the same.
I made the change at functions.inc.php as proposed above.
Then I managed to get inside the interface.

Then I upgraded the framework to latest beta 7.
But still
if i put it back to $dirname = $amp_conf[‘AMPWEBROOT’] . ‘/admin’;
I have again the same problem (white screen).

That’s strange because http://www.freepbx.org/trac/ticket/5465 is supposed to be fixed by FreePBX Framework 2.10.0beta2.7

Temporarily i fix it once more like proposed here, but how come it’s not fixed yet?