I’ve been trying to get the phpbb3 & zen cart integration to work.
I’ve had some errors in the default SQl zen cart comes with. First I was getting an error about an invalid column name in the phpbb_user_groups table (specifically the group_description column not existing). Once I fixed that, I got a very cryptic “1062 Duplicate entry ” for key 2″ error every time I tried to create a new user.
Here’s how to fix BOTH of these problems:
Problem 1 – “column group_description does not exist”:
Edit line 196 in store>includes>classes>class.phpbb.php. Change “group_description” to “group_desc”
Problem 2 – 1062 Duplicate entry ” for key 2:
Edit line 187 (in the same file as in Problem 1). Change it from:
(user_id, username, user_password, user_email, user_regdate)
to:
(user_id, username, user_password, username_clean, user_email, user_regdate)
Edit line 189. Change it from:
(‘” . (int)$user_id . “‘, ‘” . $nick . “‘, ‘” . md5($password) . “‘, ‘” . $email_address . “‘, ‘” . time() .”‘)”;
to:
(‘” . (int)$user_id . “‘, ‘” . $nick . “‘, ‘” . md5($password) . “‘, ‘” . $nick . “‘, ‘” . $email_address . “‘, ‘” . time() .”‘)”;
phpbb requires that each user have a unique “username_clean”. This is the second “key” in the table requirements. The first creates an index on user_id, the second requires username_clean be UNIQUE, the third creates an INDEX on user_birthday, and so on. In fact, at NO POINT do they EVER REQUIRE THE USERNAME TO BE UNIQUE! WHAT????? yep. It’s username_clean that must be unique. zen cart doesn’t even try and insert anything into username_clean, it just tries to make the username (this makes no sense at all!!!).
Feel free to comment if you have any insights/questions!
Tags: database, error 1062, phpbb, phpbb3, zen cart
ChomperStomp
Hallelujah Button
Status-bar Calculator
Andy Harris' Books
Outer Spice Web Company
Paul Irish's Blog
The Daily WTF
yayQuery Podcast
Hello People,
I am new member here
I just discovered this place and so far i have found lots of good information here.
I’m looking forward to connecting and contributing to the forum.
So , how are you going tocelebrate this Easter Vacation?