I’m recieving the following error when trying to update to the latest Phone Apps module (13.0.22) on the Edge track.
PDOException (23000)
HELP
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'key' cannot be null
/var/www/html/admin/modules/userman/Userman.class.php
if(is_bool($value)) {
$value = ($value) ? 1 : 0;
}
$type = is_array($value) ? 'json-arr' : null;
$value = is_array($value) ? json_encode($value) : $value;
$sql = "REPLACE INTO ".$this->userSettingsTable." (`uid`, `module`, `key`, `val`, `type`) VALUES(:id, :module, :setting, :value, :type)";
$sth = $this->db->prepare($sql);
$sth->execute(array(':id' => $uid, ':module' => $module, ':setting' => $setting, ':value' => $value, ':type' => $type));
$this->moduleUserSettingsCache = array();
return true;
tm1000
(Andrew Nagy)
2
There is more to this error please screenshot
I couldn’t fit the whole thing into a screen shot but here is the complete error.
PDOException (23000)
HELP
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'key' cannot be null
/var/www/html/admin/modules/userman/Userman.class.php
if(is_bool($value)) {
$value = ($value) ? 1 : 0;
}
$type = is_array($value) ? 'json-arr' : null;
$value = is_array($value) ? json_encode($value) : $value;
$sql = "REPLACE INTO ".$this->userSettingsTable." (`uid`, `module`, `key`, `val`, `type`) VALUES(:id, :module, :setting, :value, :type)";
$sth = $this->db->prepare($sql);
$sth->execute(array(':id' => $uid, ':module' => $module, ':setting' => $setting, ':value' => $value, ':type' => $type));
$this->moduleUserSettingsCache = array();
return true;
Server/Request Data
HTACCESS on
HTTP_HOST 192.168.50.50
HTTP_CONNECTION keep-alive
CONTENT_LENGTH 0
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
HTTP_ORIGIN http://192.168.50.50
HTTP_ACCEPT */*
HTTP_REFERER http://192.168.50.50/admin/config.php?display=modules
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.8
HTTP_COOKIE lang=en_US; bannerMessages=%5B%22a4d178810ebe0e99039e46d3c791635838f62e6a%22%2C%22398a36e81759f50d332308019dd244ae063138d8%22%5D; searchHide=1; __utma=86314200.1885114888.1438880504.1443010905.1443552322.97; PHPSESSID=j33qsi6dui5qslgtc4nkng8v61
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE <address>Apache/2.2.15 (CentOS) Server at 192.168.50.50 Port 80</address>
SERVER_SOFTWARE Apache/2.2.15 (CentOS)
SERVER_NAME 192.168.50.50
SERVER_ADDR 192.168.50.50
SERVER_PORT 80
REMOTE_ADDR 192.168.50.8
DOCUMENT_ROOT /var/www/html
SERVER_ADMIN root@localhost
SCRIPT_FILENAME /var/www/html/admin/config.php
REMOTE_PORT 37153
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD POST
QUERY_STRING display=modules&action=process&quietmode=1&online=1&modules%5Brestapps%5D%5Baction%5D=install&modules%5Brestapps%5D%5Btrack%5D=stable
REQUEST_URI /admin/config.php?display=modules&action=process&quietmode=1&online=1&modules%5Brestapps%5D%5Baction%5D=install&modules%5Brestapps%5D%5Btrack%5D=stable
SCRIPT_NAME /admin/config.php
PHP_SELF /admin/config.php
REQUEST_TIME 1460565789
GET Data
display modules
action process
quietmode 1
online 1
modules Array ( [restapps] => Array ( [action] => install [track] => stable ) )
POST Data
empty
Files
empty
Cookies
lang en_US
bannerMessages ["a4d178810ebe0e99039e46d3c791635838f62e6a","398a36e81759f50d332308019dd244ae063138d8"]
searchHide 1
__utma 86314200.1885114888.1438880504.1443010905.1443552322.97
PHPSESSID j33qsi6dui5qslgtc4nkng8v61
Session
langdirection ltr
module_name modules
module_page modules
AMP_user ampuser Object ( [username] => pbxadmin [id] => 22 [password:ampuser:private] => 29a2ee3b14a8116c48921dd4bbdcb3305954662b [extension_high:ampuser:private] => [extension_low:ampuser:private] => [sections:ampuser:private] => Array ( [0] => * ) [mode:ampuser:private] => usermanager [deptname] => [_lastactivity] => 1460565789 )
FOP2 Array ( [context] => )
FOP2Manager Array ( [fop2version] => 2.30.04 )
CDRSTATS Array ( [extension] => 'SIP/100','SIP/101','SIP/102','SIP/103','SIP/104','SIP/105','SIP/107','SIP/108','SIP/106','SIP/110','SIP/111','SIP/112','SIP/113','SIP/114','SIP/115','SIP/116','SIP/117' [start] => 2016-03-01 00:00:00 [end] => 2016-04-02 23:59:59 )
fwmsg Array ( [last_dest] => ext-group,600,1 )
Environment Variables
empty
Registered Handlers
0. Whoops\Handler\PrettyPageHandler
tm1000
(Andrew Nagy)
5
Cool thanks!!! Fix is in restapps v13.0.23
1 Like
Awesome!! You guys are fast!! lol
1 Like
johnens
(John V)
7
Most excellent. Working here now too. Thanks for the quick fix!
1 Like
tm1000
(Andrew Nagy)
8
Usually just need the left side bar because it’s got the traceback.
Good to know!! I’m learning everyday lol Just figured out the code tags. I’ll be sure to include the traceback in future posts.