Problem installing - error message on install [SOLVED]

Permalink 1 user found helpful
Hi,

I am trying to install Concrete5 to a site, however when it finishes doing the database, I get the following error (when it comes to setting the file/page permissions):

Call to a member function getGroupID() on a non-object in /var/www/html/concrete/models/file_set.php on line 259


I have taken the installations from both C5 and sourceforge in case of problems with the download, but still get the same issues. Has anyone else run into an issue like this?

Thanks,

Dan

 
simonfishley replied on at Permalink Reply
simonfishley
I have run into the same problem today installing a test site of Concrete5.

My server is a VM on Proxmox running Debian 6, Apache 2, PHP 5.3.

Error is the same:

Fatal error: Call to a member function getGroupID() on a non-object in /var/www/concrete5/concrete/models/file_set.php on line 259
simonfishley replied on at Permalink Reply
simonfishley
Hi Danives,

Have you made any progress here? I have not found any resources online explaining how to get around this.

Simon
Danives replied on at Permalink Reply
Nope, no progress as of yet. I can only assume its something to do with the server setup that is causing the issue as I've been able to install C5 successfully elsewhere, but I have no idea what the difference is.
simonfishley replied on at Permalink Reply
simonfishley
Hey Dan

Can I ask what platform you are running on?

Simon
Danives replied on at Permalink Reply
Dump says:

Linux version 2.6.32-220.13.1.el6.x86_64 (mockbuild@c6b6.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Tue Apr 17 23:56:34 BST 2012

I didn't set up the server myself - preconfigured one. Have made sure PHP etc. was installed (which is 5.3.3).

Going to try and dig a little deeper.
Danives replied on at Permalink Reply
Hey,

Solved it - mysql configuration error; check you my.cnf file for the 'auto_increment_increment' value and make sure its set to be 1.

D
Danives replied on at Permalink Best Answer Reply
EDIT: Answer at the bottom, but I leave the rest here to preserve the process

Okay, so a bit of digging shows lines 198 and 199 are the culprits (ish):

$g2 = Group::getByID(REGISTERED_GROUP_ID);
$g3 = Group::getByID(ADMIN_GROUP_ID);


Both of these are not returning valid objects, while

$g1 = Group::getByID(GUEST_GROUP_ID);


Is returning as a valid object. So it would suggest that the two groups aren't getting created, or being found. However a quick look in the database shows the groups all in there.

However my groups ids are 1, 11, and 21 in the database, which dont't correspond to the static number values:

REGISTERED_GROUP_ID = 2
ADMIN_GROUP_ID = 3

So I *think* what is probably happening, is either that a PHP math addition is going wrong (1+1 = 11, 2+1 = 21) or something even more strange.

Will carry on hunting, but this is the best lead I have so far

EDIT:

Looking at the table structure, it seems that the autoincrement ID has been set to be 22

CREATE TABLE IF NOT EXISTS `Groups` (
  `gID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gName` varchar(128) NOT NULL,
  `gDescription` varchar(255) NOT NULL,
  `gUserExpirationIsEnabled` int(1) NOT NULL DEFAULT '0',
  `gUserExpirationMethod` varchar(12) DEFAULT NULL,
  `gUserExpirationSetDateTime` datetime DEFAULT NULL,
  `gUserExpirationInterval` int(10) unsigned NOT NULL DEFAULT '0',
  `gUserExpirationAction` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`gID`),
  UNIQUE KEY `gName` (`gName`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;


EDIT 2

In fact *all* of the tables have an auto-increment of 22...

EDIT 3

I was wrong - not all tables have an auto-increment of 22, it seems that once data is entered into the tables, the auto-increment value is changed from 1 to 22 somehow. The initial database creation makes all the tables correctly.

EDIT 4

I was being a bit dumb with the auto-increment stuff; that just shows the next number to increment to. However, it does look like the IDs are increasing by 10 each time, as opposed to 1 each time, which is why the auto-increment is at 22 when there are only 3 items there.

EDIT 5 [SOLVED]

Seems that the mysql installation had it's 'auto_increment_increment' set to be 10. This is why everything incremented by that amount. I changed the 'my.cnf' file (in /etc) and took it down to 1, and everything installed without issue.

I don't know why whoever set up this server, did that. Unless it was to mess with me.
simonfishley replied on at Permalink Reply
simonfishley
Thanks for the info Dan. My main DB server is replicating with another master and I can't change the increment value to 1 (currently 2) without breaking that. I installed a separate SQL server and the install has worked.
rjscanlon replied on at Permalink Reply
Just in case this helps anyone else, I managed to overcome this problem without needing to use an alternative setup and while maintaining my Master Master replication. I simply installed the site once (and got the above error) then went into the Groups table to see what auto increment ID numbers were being set for the registered group and admin group. I then edited /concrete/config/base.php to change the hard coded IDs for REGISTERED_GROUP_ID and ADMIN_GROUP_ID to the values from the database. Then I emptied the database and ran the install again. The second time around my site installed fine.

Rich