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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 11:06 Go to next message
iniglobero is currently offline  iniglobero   Spain
Messages: 10
Registered: February 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 05:34 Go to previous messageGo to next message
iniglobero is currently offline  iniglobero   
Messages: 10
Registered: February 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 03:37 Go to previous messageGo to next message
iniglobero is currently offline  iniglobero   Spain
Messages: 10
Registered: February 2013
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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 14:06 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Thanks, should this change be committed and included into the next release?
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Mon Oct 23 07:39:26 EDT 2017

Total time taken to generate the page: 0.00590 seconds