xoops forums

ahooi

Just popping in
Posted on: 2005/5/23 21:44
ahooi
ahooi (Show more)
Just popping in
Posts: 13
Since: 2005/2/15
#1

MRBS Installation problem...

Hi,

i'm trying to install MRBS in xoops, but I'm getting the following error message. What should i do to resolve the problem? Thanks...


Invalid default value for 'id'

Unable to install mrbs. Error(s):

computercoli

Just popping in
Posted on: 2005/5/30 6:47
computercoli
computercoli (Show more)
Just popping in
Posts: 1
Since: 2005/5/30
#2

Re: MRBS Installation problem...

Yeah I had that same problem. I have to give you fair warning though: I'm not a MySQL expert (or an expert of XOOPS or the MRBS module for that matter) and the following directions can be very deadly. But, of course, it worked for me so I think it might be valuable to you or some anonymous script-kiddie that happens to pass by.

The problem lies with mysql. Depending on your version of mysql, some syntax and format for column defintion may cause your server heart failure. In MRBS the following format is used to define the id columns of each of the systems tables when the database is created:

id int DEFAULT '0' NOT NULL auto_increment

For some reasons some versions of MySQL are fine with this definition or may even require it (I'm not sure, I don't feel like getting a different version of MySQL just to find out). I don't know if this is a bug or not, but it seems to me that its just poor syntax. The lack of a value when creating a row can't assign the value of 0 and the next auto increment value to the same cell. Perhaps some MySQL expert would be kind enough to pop his/her head in here and give us the low down on this problem.

THE BOTTOM LINE:
Open the mysql.sql file under /mrbs/sql/ and delete the DEFAULT '0' part of each of the id column definition.
Example:

id int DEFAULT '0' NOT NULL auto_increment,
becomes
id int NOT NULL auto_increment,

Your going to have to do this about 4 times since each table has its own id column in mrbs