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

 Exception

Can not modify bosssecretary_group.id_group column::
/var/www/html/admin/libraries/utility.functions.php

	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:

Exception
/­var/­www/­html/­admin/­libraries/­utility.functions.php205
5. die_freepbx
/­var/­www/­html/­admin/­modules/­bosssecretary/­install.php104
4. include_once
/­var/­www/­html/­admin/­libraries/­modulefunctions.class.php2461
3. module_functions _doinclude
/­var/­www/­html/­admin/­libraries/­modulefunctions.class.php2413
2. module_functions _runscripts
/­var/­www/­html/­admin/­libraries/­modulefunctions.class.php1963
1. module_functions install
/­var/­www/­html/­admin/­page.modules.php284
0. include
/­var/­www/­html/­admin/­config.php391 

and also:

Server/Request Data
SCRIPT_URL 	/admin/config.php
SCRIPT_URI 	http://10.134.63.4/admin/config.php
HTACCESS 	on
HTTP_HOST 	10.134.63.4
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_ACCEPT_LANGUAGE 	en-US,en;q=0.5
HTTP_ACCEPT_ENCODING 	gzip, deflate
HTTP_REFERER 	http://10.134.63.4/admin/config.php?display=modules
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
HTTP_CONNECTION 	keep-alive
CONTENT_LENGTH 	0
PATH 	/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE 	<address>Apache/2.2.15 (CentOS) Server at 10.134.63.4 Port 80</address>
SERVER_SOFTWARE 	Apache/2.2.15 (CentOS)
SERVER_NAME 	10.134.63.4
SERVER_ADDR 	10.134.63.4
SERVER_PORT 	80
REMOTE_ADDR 	10.134.63.21
DOCUMENT_ROOT 	/var/www/html
SERVER_ADMIN 	[email protected]
SCRIPT_FILENAME 	/var/www/html/admin/config.php
REMOTE_PORT 	58305
GATEWAY_INTERFACE 	CGI/1.1
SERVER_PROTOCOL 	HTTP/1.1
REQUEST_METHOD 	POST
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 ) )
POST Data
empty
Files
empty
Cookies
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
Session
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 ) )
DASHBOARD_FREEPBX_BRAND 	FreePBX
langdirection 	ltr
UCP_isMobile 	
UCP_isTablet 	
UCP_login_token 	40b71714dcfacbf1188636b4221dc41a
Environment Variables
empty
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:
http://git.freepbx.org/projects/FPBXCN/repos/bosssecretary/browse/install.php#104

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.

tx

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 ?