Topic: PunBB reported: Unable to insert search index words

When posting a topic or replying in russian this error occures:

File: DRIVE LETTER:\usphere\upload\include\search_idx.php
Line: 150
PunBB reported: Unable to insert search index words
Database reported: Duplicate entry '' for key 1 (Errno: 1062)

Than later when I look at the results of the reply I see blank field instead of the reply.  I am using russian language pack, everithing seems fine with translation but the error does not appear when I use regular engish language pack.  If you have any advice or information to resolve this it will be really helpfull.

Re: PunBB reported: Unable to insert search index words

Ok i solved the problem already, if anybody will face it in the future let me know right in this topic.  It was a bug in russian language pack.

Re: PunBB reported: Unable to insert search index words

Could you perhaps tell me what the problem with the russion language pack was so that I can fix it?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: PunBB reported: Unable to insert search index words

Hi there, I have the same problem in forum in french.

The error message I had is :

File: /home/.sites/88/site252/web/forums/fr/include/search_idx.php
Line: 150

PunBB reported: Unable to insert search index words 

Database reported: Duplicate entry 'occupé' for key 1 (Errno: 1062)

I tried to rebuild search index but I got the same error message.

It seems like the program is not able to manage words with accent like 'occupé'.

It's a forum migrated from PHPBB to PUNBB 1.1.5 with the migration tool, and updated to PUNBB 1.2

Everything is working well except this problem that happens when the program is truing to update the search word store.

Thanks for your help.

Re: PunBB reported: Unable to insert search index words

I am unable to reproduce this. saad: Could you perhaps pop in on IRC? #punbb on quakenet.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6

Re: PunBB reported: Unable to insert search index words

I installed exactly the same forum on another server, and it works fine. The only difference between my two servers is the version of mysql server.

The version of mysql in the server that works is 4.1.8
and the version of mysql in the server that doesn't works is 4.0.16

is it possible that the trouble comes from the mysql server configuration ?
is there any specific configuration on mysql server to make it accent unsensitive ?

Thanks.

Re: PunBB reported: Unable to insert search index words

Problem solved. Thanks to saad for giving me access to the database so that I could find the problem. Here's what was wrong.

The search_words table contains a list of all words that occur in the forum posts and subjects. The MySQL type of the column that contains the words is "VARCHAR(20) BINARY NOT NULL". The BINARY attribute makes sure that MySQL stores the string exactly as it was inserted (e.g. as a byte string and not a character string) and disregards any locale or collate settings when comparing/sorting. That way, regardless of locale/collation, 'été' will always be different from 'ete'. Anyway, saad had installed the forum on his Windows machine (using MySQL 4.0) and then used a utility called Navicat to transfer the database to the server (using MySQL 4.1). However, in MySQL 4.1, the BINARY attribute was replaced with a new column type called VARBINARY. MySQL 4.1 still supports the 4.0 way of creating these columns, but I'm guessing Navicat didn't properly handle the conversion from 4.0 to 4.1. So, just adding the BINARY attribute via phpMyAdmin fixed the problem.

Now wasn't that fun? smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB reported: Unable to insert search index words

http://dev.mysql.com/doc/mysql/en/news-4-1-8.html

The server was interpreting CHAR BINARY and VARCHAR BINARY columns from 4.0 tables as having the BINARY and VARBINARY data types. Now they are interpreted as CHAR and VARCHAR columns that have the binary collation of the column's character set. (This is the same way that CHAR BINARY and VARCHAR BINARY are handled for new tables created in 4.1.)

You mean this?

Re: PunBB reported: Unable to insert search index words

Yes, it's related to that, but now that I read it, I just don't understand it smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB reported: Unable to insert search index words

also, when you downgrade as I from 4.1 to 4.0 don`t forgive to set a BINARY atrribute there...
Thank you Rickard for info.

11

Re: PunBB reported: Unable to insert search index words

Thanks! I had this problem and solved it adding the binary atribute to the word field big_smile

12

Re: PunBB reported: Unable to insert search index words

worked for me too.

13

Re: PunBB reported: Unable to insert search index words

I've just done a fresh install and I've got this problem with MySQL 4.1 and italian chars.
I can't understand if I've to change the field type. From VARCHAR to VARBINARY?
If I have to, I think this is a bug or an installation note not written anywhere smile

chali, Rickard, what is the BINARY attribute? Here the only attribute I can find are UNSIGNED, UNSIGNED ZEROFILL and ON UPDATE CURRENT_TIMESTAMP.

P.

Re: PunBB reported: Unable to insert search index words

paulo: Read my post above starting with "Problem solved".

"Programming is like sex: one mistake and you have to support it for the rest of your life."

15

Re: PunBB reported: Unable to insert search index words

Rickard wrote:

paulo: Read my post above starting with "Problem solved".

Sorry if I can't understand on what to do because, as I stated, I don't have on my phpMyAdmin the BINARY attribute but only UNSIGNED & Co.-.
Maybe you've ment to change the field type (as opposed to "attribute") from VARCHAR to BINARY? (Doing so seems I've got no error)

Ty,
P.

Re: PunBB reported: Unable to insert search index words

Yes, that's what I meant.

"the BINARY attribute was replaced with a new column type called VARBINARY"

"Programming is like sex: one mistake and you have to support it for the rest of your life."