FreePBX | Register | Issues | Wiki | Portal | Support

Errors after Upgrade to 14

freepbx
configuration
Tags: #<Tag:0x00007fb905d2dbb8> #<Tag:0x00007fb905d2d9b0>

(Eric Pace) #1

After performing an upgrade, I get errors.

PHP Fatal error:  Class 'PDO' not found in /var/www/html/admin/libraries/BMO/Database.class.php on line 17
Whoops\Exception\ErrorException: Class 'PDO' not found in file /var/www/html/admin/libraries/BMO/Database.class.php on line 17
Stack trace:
  1. () /var/www/html/admin/libraries/BMO/Database.class.php:17

This is the main error and the one causing the most trouble. It seems that the upgrade process says the server does not have internet connection, but I was able to ping out, ping via dns, perform wget, and everything else that I could think of.

Looking through the log from /var/log/post_sngupdate is where I saw the line saying unable to detect an internet connection.

I am a big time newbie when it comes to FreePBX and honestly quite the beginner with Linux as well, so I am not sure what to do.

When I do the route -n I see my ipaddress and my default gateway and everything looks good.

Any help would be appreciated.


(Eric Pace) #2

Ok, I got the internet problem resolved so that our Phones are currently working at least. However, the GUI does not work and I can’t get anything else going due to the following errors after putting in amportal a ma list:

 amportal a ma list

Please wait...
PHP Fatal error:  Class 'PDO' not found in /var/www/html/admin/libraries/BMO/Database.class.php on line 17
/usr/sbin/amportal: line 44: Whoops\Exception\ErrorException:: command not found

PHP Fatal error:  Call to undefined function posix_getpwuid() in /var/lib/asterisk/bin/gen_amp_conf.php on line 6
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exist. Attempting to create it with:
  'mkdir -p '

mkdir: missing operand
Try 'mkdir --help' for more information.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

I am really confused as to where to go from here now.


(Andrew Nagy) #3

yum install php56w-pdo php56w-cli php56w-process


(Eric Pace) #4

Thanks, that got the PDO installed. Now I am getting the following after doing an amportal a m.

amportal a m

Please wait...
PHP Fatal error:  Uncaught exception 'PDOException' with message 'could not find driver' in /var/www/html/admin/libraries/BMO/Database.class.php:133
Stack trace:
#0 /var/www/html/admin/libraries/BMO/Database.class.php(133): PDO->__construct('mysql:host=loca...', 'freepbxuser', 'c9bb8ecab454fdc...')
#1 /var/www/html/admin/libraries/BMO/FreePBX.class.php(69): FreePBX\Database->__construct(Object(FreePBX))
#2 /var/www/html/admin/bootstrap.php(139): FreePBX->__construct(Array)
#3 /etc/freepbx.conf(9): require_once('/var/www/html/a...')
#4 Command line code(5): include_once('/etc/freepbx.co...')
#5 {main}

Next exception 'Exception' with message 'could not find driver::could not find driver' in /var/www/html/admin/libraries/utility.functions.php:204
Stack trace:
#0 /var/www/html/admin/libraries/BMO/Database.class.php(136): die_freepbx('could not find ...', Object(PDOException))
#1 /var/www/html/admin/libraries/BMO/FreePBX.class.php(69): FreePBX\Database::__construct(Object(FreePBX))
#2 /var/www/html/admin/bootstrap.php(139): FreePB in /var/www/html/admin/libraries/utility.functions.php on line 204
/usr/sbin/amportal: line 44: Whoops\Exception\ErrorException:: command not found

/var/lib/asterisk/bin/freepbx_engine: line 119: Exception:: command not found
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exist. Attempting to create it with:
  'mkdir -p '

mkdir: missing operand
Try 'mkdir --help' for more information.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

It looks like there is apparently a lot that needs to have been done in the upgrade that did not happen.


(Andrew Nagy) #5

yum install php56w-mysqlnd


(Eric Pace) #6

Great, now apparently there is a problem in the freepbx_engine as it is apparently missing a command. After another amportal a m I get this:

 amportal a m

Please wait...
/usr/sbin/amportal: line 44: 0: command not found

/var/lib/asterisk/bin/freepbx_engine: line 119: 0: command not found
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exist. Attempting to create it with:
  'mkdir -p '

mkdir: missing operand
Try 'mkdir --help' for more information.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

(Andrew Nagy) #7

Dont use amportal. We dont use it anymore, havent for a while… Look at fwconsole.


(Eric Pace) #8

Ok, I typed fwconsole list and got the following:

fwconsole list
0

System Admin 13.0.74.5
Copyright 2017 by Schmoozecom, Inc., All rights reserved

By installing, copying, downloading, distributing, inspecting or using
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at
www.schmoozecom.com/cmeula

Is this supposed to give me options?


(Andrew Nagy) #9

Yes however I see the first (of probably many) errors.

Rm -Rf /var/www/html/admin/modules/sysadmin

Now try it again.


(Eric Pace) #10
Rm -Rf /var/www/html/admin/modules/sysadmin
-bash: Rm: command not found

It looks like I have something else going on as well.


(Andrew Nagy) #11

Sorry rm should be lower case.

rm -Rf /var/www/html/admin/modules/sysadmin


(Eric Pace) #12
fwconsole list
0

EndPoint Manager 13.0.109
Copyright 2017 by Schmoozecom, Inc., All rights reserved

By installing, copying, downloading, distributing, inspecting or using
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at
www.schmoozecom.com/cmeula

Do I remove this one as well? Maybe go through and remove each of these modules that show up like this?


(Andrew Nagy) #13

yes but you would have to know the raw name.

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


(Eric Pace) #14

Ok, I got rid of all of those and can now get the list of commands from fwconsole. I just tried running fwconsole start to see if it would start my GUI and I get the following error:

Unable to run Pre-Asterisk hooks, because Asterisk is already running on PID 1894 and has been running for 2 hours, 4 minutes, 22 seconds



  [Exception]
  Unable to locate the FreePBX BMO Class 'Endpoint'A required module might be
   disabled or uninstalled. Recommended steps (run from the CLI): 1) fwconsol
  e ma install endpoint 2) fwconsole ma enable endpoint



start [--pre] [--post] [--skipchown] [args1] ... [argsN]

(Andrew Nagy) #15

Well right you still need to install them back

fwconsole ma download sysadmin endpoint


(Eric Pace) #16

It downloaded just fine, but now any command goes back to showing this:

0

System Admin 13.0.74.5
Copyright 2017 by Schmoozecom, Inc., All rights reserved

By installing, copying, downloading, distributing, inspecting or using
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at
www.schmoozecom.com/cmeula

(Andrew Nagy) #17

Ok delete those again. You didnt get upgraded to freepbx 14.

mysql
use asterisk;
select * from admin where variable = ‘version’;


(Eric Pace) #18
+----------+-------------+
| variable | value       |
+----------+-------------+
| version  | 13.0.192.16 |
+----------+-------------+
1 row in set (0.00 sec)

Yeah, looks like it did not actually upgrade me


(Andrew Nagy) #19
mysql
use asterisk;
UPDATE admin SET value = '14.0.1alpha1' WHERE 'variable' = 'version';

fwconsole ma upgrade framework

mysql
use asterisk;
select * from admin where variable = 'version';

(Eric Pace) #21

That first Update command you put there did not update anything, since you had the variable without quotes in the select, I ran it without quotes and it worked. I now show the variable version as 14.0.1.4 and then I downloaded the sysadmin and endpoint modules and I can still access the list.

I checked the list of modules, sysadmin was disabled pending upgrade and so was endpoint, so I tried fwconsole ma upgrade sysadmin endpoint and got the following:

fwconsole ma upgrade sysadmin endpoint
No repos specified, using: [standard,commercial,extended] from last GUI settings

Downloading module 'sysadmin'
Processing sysadmin
Verifying local module download...Verified
Extracting...Done
Download completed in 7 seconds
Unable to install module sysadmin:
 - PHP Component Zend Guard Loader is required but missing from you PHP installation.
Updating Hooks...Done
Downloading module 'endpoint'
Processing endpoint
Verifying local module download...Verified
Extracting...Done
Download completed in 2 seconds
Detected Missing Dependency of: sysadmin 13.0.69
Found local Dependency of: sysadmin 14.0.7.22
Installing Missing Dependency of: sysadmin 13.0.69
The following error(s) occured:
 - PHP Component Zend Guard Loader is required but missing from you PHP installation.
Unable to resolve dependencies for module endpoint:
Updating Hooks...Done
Updating Hooks...Done