[Thu Dec 08 09:31:59 2011] [error] [client 172.16.3.97] 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
[Thu Dec 08 09:34:12 2011] [error] [client 172.16.3.97] PHP Notice: Undefined variable: amp_conf in /var/www/html/admin/functions.inc.php on line 14
[Thu Dec 08 09:34:12 2011] [error] [client 172.16.3.97] 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
[Thu Dec 08 09:34:12 2011] [error] [client 172.16.3.97] 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
[Thu Dec 08 09:34:16 2011] [error] [client 172.16.3.97] PHP Notice: Undefined index: AMPWEBROOT in /var/www/html/admin/functions.inc.php on line 14
[Thu Dec 08 09:34:16 2011] [error] [client 172.16.3.97] 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
[Thu Dec 08 09:34:16 2011] [error] [client 172.16.3.97] 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
I’ve “fixed” it in functions.inc.php, but I’m curious if anyone else was having this problem?
It seems to be that when the freepbx configuration gets loaded, it’s depending on AMPWEBROOT being defined, but it gets defined IN THAT FILE.
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.
//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);
}
}
// 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”
…
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.
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.
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!!!
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!!
(NB - obviously if more detailed system data is required from me, I’d be happy to provide all/any data upon request…
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
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.
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).