PDA

View Full Version : cpsession table RESOLVED!


keharris53
08-09-2016, 07:04 AM
Hello, well I did it. Accidentally deleted my cpsession table from mysql db. How do I replace it? Thought I could do it with my backup, but no such luck. I found this in the mysql-schema file, but really don't know what values I need. My vb tables don't use a prefix. Any ideas?

$schema['CREATE']['query']['cpsession'] = "
CREATE TABLE " . TABLE_PREFIX . "cpsession (
userid INT UNSIGNED NOT NULL DEFAULT '0',
hash VARCHAR(32) NOT NULL DEFAULT '',
dateline INT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (userid, hash)
)
";
I'm sure this needs to be modified, but I've no idea how. Thanks!

Paul M
08-09-2016, 07:50 AM
Just removing the php code should do it ;

CREATE TABLE cpsession (
userid INT UNSIGNED NOT NULL DEFAULT '0',
hash VARCHAR(32) NOT NULL DEFAULT '',
dateline INT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (userid, hash)
)

keharris53
08-09-2016, 12:23 PM
I entered that into the Query window in phpmyadmin and received "Missing value in the form" message. I should also have indicated that I'm using 3.8.4 Patch Level 2...
Thanks for the quick reply!

Okay, found the fix:

CREATE TABLE `cpsession` (
`userid` int(10) unsigned NOT NULL DEFAULT '0',
`hash` varchar(32) NOT NULL DEFAULT '',
`dateline` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`userid`,`hash`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1;