FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » NNTP import SQL Error 1366: Incorrect string value (NNTP import SQL Error 1366: Incorrect string value)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
NNTP import SQL Error 1366: Incorrect string value [message #168155] Tue, 12 February 2013 16:06 Go to next message
iniglobero is currently offline  iniglobero   Spain
Messages: 10
Registered: February 2013
Karma: 0
Junior Member
FUDforum: 3.0.4 PHP 5.2.14 on windows with database MySQL, when importing news form NNTP server it only import one then "1366: Incorrect string value: '\xF3nicos...' for column 'subject' at row 1" , the curious thing is that the one imported OK also has accent in the subject and causes no problem.
Database UTF8, tables UTF8 , subject column UTF8 in php.ini set default charser utf-8.

Any clue how can I solve it?
Thanks!!
Re: NNTP import SQL Error 1366: Incorrect string value [message #168159 is a reply to message #168155] Wed, 13 February 2013 10:34 Go to previous messageGo to next message
iniglobero is currently offline  iniglobero   
Messages: 10
Registered: February 2013
Karma: 0
Junior Member
FudForum 3.0.4 nntp import , I updated PHP to 5.4.11
Server windows PHP 5.4.11
When importing news with the script nntp.php it imports some more news and then SQL error 1366 incorrect string in column login when inserting user, it has imported 7 more news and the error is now in user insert no in mesagge insert, but now there is no SQL sentence in log, so can't test it in mysql query browser.

Any clue to avoid this invalid characters in login name of new users created from news?
Thanks.
Re: NNTP import SQL Error 1366: Incorrect string value [message #168163 is a reply to message #168155] Fri, 15 February 2013 08:37 Go to previous messageGo to next message
iniglobero is currently offline  iniglobero   Spain
Messages: 10
Registered: February 2013
Karma: 0
Junior Member
Solved:
I've make a change in FUDForum/include/theme/default/users_reg.inc including the field login in the HTML_fields function to avoid strange characters also in login


function html_fields()

{
foreach(array('login', 'name', 'location', 'occupation', 'interests', 'bio') as $v) {

if ($this->{$v}) {

$this->{$v} = char_fix(htmlspecialchars($this->$v));

}

}

}

Re: NNTP import SQL Error 1366: Incorrect string value [message #168170 is a reply to message #168163] Sun, 17 February 2013 19:06 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Thanks, should this change be committed and included into the next release?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NNTP with ssl can't connect
Next Topic: HTML in Messages imported from News
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 17:53:21 GMT 2024

Total time taken to generate the page: 0.02173 seconds