Unsupported bosssecretary module not installable in FreePBX 13

I’ve upgraded a 2.11 system to FreePBX 13 and have a problem with installation of the unsupported bosssecretary module. I’m not a programmer - so I’m kindly asking for help how to try fixing this - does this module need recompiling from source or does it try to access invalid variables?

It gives following error during installation via Module Admin


Can not modify bosssecretary_group.id_group column::

	if(is_object($extended_text) && method_exists($extended_text,"getMessage")) {
		$e = $extended_text;
		$extended_text = htmlentities($e->getMessage());
		$code = $e->getCode();
		throw new \Exception($text . "::" . $extended_text,$code,$e);
	} else {
		$extended_text = htmlentities($extended_text);
		throw new \Exception($text . "::" . $extended_text);

further info:

5. die_freepbx
4. include_once
3. module_functions _doinclude
2. module_functions _runscripts
1. module_functions install
0. include

and also:

Server/Request Data
SCRIPT_URL 	/admin/config.php
HTTP_USER_AGENT 	Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
HTTP_ACCEPT 	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_COOKIE 	lang=en_US; guielToggle=%7B%22extensions%23UserManagerSettings%22%3Atrue%2C%22extensions%23VmXLocater%22%3Afalse%2C%22extensions%23iSymphonySettings%22%3Afalse%2C%22extensions%23ExtensionRouting%22%3Atrue%7D; searchHide=1; bannerMessages=%5B%22b21e830264d9368d9e9d6dfe2831c170f3b051bc%22%5D; local-type=upload; PHPSESSID=vpulkni819kop5prgfikc0qrg5; __utma=49849254.788681124.1481887311.1482093100.1482137719.9; __utmz=49849254.1481887311.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); sid=9c7b8071a10b6868df6d6bd64a509b70; __utmc=49849254; testing=1; _ga=GA1.1.788681124.1481887311
PATH 	/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE 	<address>Apache/2.2.15 (CentOS) Server at Port 80</address>
SERVER_SOFTWARE 	Apache/2.2.15 (CentOS)
DOCUMENT_ROOT 	/var/www/html
SERVER_ADMIN 	[email protected]
SCRIPT_FILENAME 	/var/www/html/admin/config.php
QUERY_STRING 	display=modules&action=process&quietmode=1&online=1&modules%5Bbosssecretary%5D%5Baction%5D=install&modules%5Bbosssecretary%5D%5Btrack%5D=stable
REQUEST_URI 	/admin/config.php?display=modules&action=process&quietmode=1&online=1&modules%5Bbosssecretary%5D%5Baction%5D=install&modules%5Bbosssecretary%5D%5Btrack%5D=stable
SCRIPT_NAME 	/admin/config.php
PHP_SELF 	/admin/config.php
REQUEST_TIME 	1482226049
GET Data
display 	modules
action 	process
quietmode 	1
online 	1
modules 	Array ( [bosssecretary] => Array ( [action] => install [track] => stable ) )
lang 	en_US
guielToggle 	{"extensions#UserManagerSettings":true,"extensions#VmXLocater":false,"extensions#iSymphonySettings":false,"extensions#ExtensionRouting":true}
searchHide 	1
bannerMessages 	["b21e830264d9368d9e9d6dfe2831c170f3b051bc"]
local-type 	upload
PHPSESSID 	vpulkni819kop5prgfikc0qrg5
__utma 	49849254.788681124.1481887311.1482093100.1482137719.9
__utmz 	49849254.1481887311.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
sid 	9c7b8071a10b6868df6d6bd64a509b70
__utmc 	49849254
testing 	1
_ga 	GA1.1.788681124.1481887311
module_name 	modules
module_page 	modules
AMP_user 	ampuser Object ( [username] => L3admin [id] => [password:ampuser:private] => 4d15abd1363123308f93cdda31033ac4b17e1f8a [extension_high:ampuser:private] => [extension_low:ampuser:private] => [sections:ampuser:private] => Array ( [0] => * ) [mode:ampuser:private] => database [opmode:ampuser:private] => [_deptname] => [_lastactivity] => 1482226049 )
calculated_max_calls 	0
netstats 	Array ( [eth0] => Array ( [tx] => Array ( [1481887385] => 609467 [1481887393] => 613587 ) [rx] => Array ( [1481887385] => 63143 [1481887393] => 65383 ) ) )
backup_restore_path 	/var/spool/asterisk/tmp/backuptmp-suser-1481889055-20161214-233128-1481754688-225202995.tgz
backup_restore_data 	Array ( [settings] => true [files] => Array ( [0] => /etc/asterisk [1] => /var/www ) )
langdirection 	ltr
UCP_login_token 	40b71714dcfacbf1188636b4221dc41a
Environment Variables
Registered Handlers

That is where the actual problem is. I don’t know WHAT it is, but it sounds like the SQL that’s being used to create the table is wrong.

1 Like

I used this link for installing boss secretary on V2.11, and retried this first after upgrade to V12 and then it was still functioning ok. But on V13 then I got above error. Maybe it has to to with Kernel update of V13 ? Should this module be recompiled ? I’m not familiar with php, so how this is to be done is not clear to me…

It’s coded in PHP, which is an interpreted language. Unless your program is using a feature that is no longer available in the current PHP, that isn’t it.

The problem, according to your error message, is that the install program is trying to change the definition of the column id_group in the bosssecretary_group table. This means your user (the one that’s connecting to the database for the column update) doesn’t have permission to update the table definition. This isn’t a problem with FreePBX, it’s a problem with the way that the install program is trying to access and update the database table definition.

I’ve never installed the package, so I can’t help you much more than that. The install program is trying to update the database and can’t. Check your database permissions on the MySQL database against the permission information in the install script.

Thanks a lot - I will check the permissions an try to fix it.

I’ve checked the bosssecretary tables in /var/lib/mysql/asterisk and they appear having the same permissions and read/write params as other modules. The user and group are “mysql”.

The bosssecretary install script is included below - and has user and group set to “asterisk” as permissions and read/write/execute params - just as all the other php module install scripts.

It’s also strange that the install script itself that creates the bosssecretary tables can’t access it afterwards . So is there any other permission to be set somewhere? The problem occurs at line 104, so I’m lost now :frowning:

bosssecretary install.php content:

Moderator Edit: Please do not post code in full without proper code tags.

Looks to me like that can be removed, as it’s trying to alter something that doesn’t need altering (it’s already int(10))

Looks like you are right :slight_smile: - I removed it and the install succeeds now.

I could then create a boss-secretary group via the GUI, but when pressing apply the I got an error that I’ve also seen in the logging during the process of upgrading from V12 to V13. And that’s why I tried to reinstall after all.

line 73 in the function.inc.php is trying to write the “chiefs” identity - which I normally leave blank.

But when filling in a chief then the apply is working without erro r!

However, when checking the mysql db I see now that some tables are missing : I only have the boss and chiefs tables, but no secretary, group and group_numbers_free tables as I had in V2.11. So I must have removed a bit too much in the install script :frowning:

Since I’m not a programmer I wonder if someone else could adapt the original install script as included in my previous post.


I have a big improvement now : after deleting the mysql bosssecretary tables before uninstalling the module I have restarted the system, which I did not before. Now all the tables are indeed created when doing the install, and the feature works fine :slight_smile:

Only error still present is that I can’t leave the “chiefs” empty, because then I get the same error as above. So looks like what has been deleted in the install script seem to cause this issue. Any ideas why ?