Updates = Blank Web Pages

There were some updates available for my 2.10 box tonight, to I applied them. Everything seemed to go fine, but when I clicked the return link, I was greeted with a blank web page. I rebooted the box, amportal, etc no luck.

Looking at the error_log in /var/log/httpd the error that seems to be causing the problem is…

[Mon Apr 02 19:54:34 2012] [error] [client 192.168.25.137] PHP Fatal error: require_once() [function.require]: Failed opening required ‘/var/www/html/admin/libraries/api.class.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/functions.inc.php on line 128

In looking in /var/www/html/admin/libraries, there is no api.class.php file, which would explain a lot.

Can anyone tell me either how to fix this, or where to get this file to put it in place?

Thanks

asterisk version 1.8.10.0
Freepbx 2.10

on the web gui I get
Error: Did not receive valid response from server
XHR response code: 200 XHR responseText: undefined jQuery status: parsererror

I commented out the line in /var/www/html/admin/functions.inc.php that called for api.class.php…

foreach ($class as $this_class) switch($this_class){
//case ‘Api’:
// require_once($dirname . ‘/libraries/api.class.php’);
// break;

then I got an error because router.class.php couldn’t be loaded. It also doesn’t exist, so I commented out that line in the same switch block…

//case ‘Router’:
// require_once($dirname . ‘/libraries/router.class.php’);
// break;

and now at least the pages load, but with no style at all. So I go back to erro_log and I now have this error…

[Mon Apr 02 20:21:59 2012] [error] [client 192.168.25.137] File does not exist: /var/www/html/admin/assets/css/mstyle_autogen_1326926386.css, referer: http://MYFREEPBXSERVER/config.php

Hello All,

I am seeing on one of the boxes we updated today the same results.
Blank admin pages, default landing page loads.

I believe these are the 3 updates and logically I think the Framework is the one in question.

FreePBX Framework 2.10.0.2 FreePBX Online upgrade available (2.10.0.3)
Call Flow Control 2.10.0.1 FreePBX Online upgrade available (2.10.0.2)
Conferences 2.10.0.4 FreePBX Online upgrade available (2.10.0.5)

The only error in the error log appears to be:
[Mon Apr 02 20:22:28 2012] [error] [client 211.211.211.1] PHP Fatal error: require_once() [function.require]: Failed opening required ‘/var/www/html/admin/libraries/api.class.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/functions.inc.php on line 128, referer: http://your.servername.com/

Not sure how I can backout of the updated module.

Same exact thing here.

On the style “free” pages I managed to get loaded by commenting out the lines for api.clss.php and router.class.php, I spotted the “Apply Changes” link still hanging out from the upgrades. I clicked it and I now have my styles back.

However, if I uncomment the api.class and router.class lines in functions.inc, I still get blank pages.

I tried to run the module_admin in attempts to downgrade the framework module back…below is the output

./module_admin
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/l ibraries/api.class.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/functions.inc.php on line 128

Upgraded from 1.810.210.57-1 to 1.811.210.57-1 and have the same results as above. I would say to hold off on the upgrade until this gets fixed. I downgraded the FreePBX Framework to 2.10.0.2 and now I am back up running. Definitely something wrong in Framework 2.10.0.3

Same issue here…
How do I downgrade back?

XHR response code: 200 XHR responseText: undefined jQuery status: parsererror

How did you downgrade?

How to fix :frowning:

Updated 1 box left others alone until the issue is fixed

There’s an upgrade to framework 2.10.04 this morning that appears to fix this issue. The lines that I commented out appear to be removed now.

How do you get the update if you cant get to the web interface? I tried yum update, nothing there.
Thank you!!

Yes we fixed this last night. Just update your modules in FreePBX.

From the command line do a

sudo -u asterisk /var/lib/asterisk/bin/module_admin upgradeall

Than do the following to force a reload

sudo -u asterisk /var/lib/asterisk/bin/module_admin reload

I get the following error when trying the solution.

[[email protected] ~]# sudo -u asterisk /var/lib/asterisk/bin/module_admin upgradeall
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/libraries/api.class.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/functions.inc.php on line 128

thank you again for everything you do for the community!

tbagalini, read my second post (3rd post in the thread). I commented out the lines that were causing the problems in /var/www/html/admin/functions.inc.php. I was then able to load the web pages (albeit with no styles). Find the “Apply Config” link and you’ll get your styles back, then do the upgrades as normal.

For that matter, commenting out the lines should get around the error in the command line update.

What a HUGE help - you are GREAT! it works!

It is also easier to see what is happening if you enable php errors to be displayed. This is off by default

I am using the FreePBX distro, but others should be similar

  1. vi /etc/php.ini
  2. Search for display_errors and set to on. Remember to turn it back off once you’ve fixed the problem. (you can also do this by viewing the error log)
  3. Restart httpd ( service httpd restart if you are using centos / rhel)
  4. Try to reload the FreePBX admin page. You will see what file & line has the error.
  5. Comment out that line. In my case it was /var/www/html/admin/functions.inc.php lines 128 & 188
  6. Keep refreshing and commenting out errors until the page reloads
  7. When freepbx admin panel finally loads, look for Apply Config in the upper right of the page
  8. After applying the config the files were replaced automatically and the admin panel then loaded correctly.
  9. Remember to edit /etc/php.ini and set display_errors = off.
  10. Go back to module admin and check for updates.

Now everything is working fine.