MySQL Forums
Forum List  »  PHP

Re: Newby needs some help - collation/charset ?
Posted by: Marvin Miller
Date: December 18, 2013 05:37PM

Rick James Wrote:
-------------------------------------------------------
> > Quick off-topic question, is it possible to just
> convert the dB to InnoDB and the forum will work?
>
>
> I don't know specifics about that software, but it
> is very likely that it will be oblivious to the
> change.
> ALTER TABLE foo ENGINE=InnoDB;

Perfect - and thanks! Once I get to the bottom of this thing I'll do another dB backup and try changing it over to InnoDB

>
> > This I don't understand. MySQL errors used to
> display
>
> Sorry, can't explain that.

New info on that one...(below)

>
> > Here's the thing, the SQL INSERT command that it
> coughs on when running through the web browser
> (PHP) actually works fine when directly entered
> via MySQL workbench.
>
> Possibly a character set difference during the
> connection.
>
> > I used to be on 5.3.24 and I've confirmed the
> php file works, now on 5.4.14 and nada....
>
> Which interface are you using? mysql_? mysqli_?
> PDO? You move away from mysql_ if that is what
> you are using. In particular, note:
> mysql_set_charset, versus
> mysqli_set_charset

Using mysql_

We're really narrowing this issue down, so we're making very good progress. On my webserver I have the ability to run several different versions of PHP. So I regressed the forum back to the PHP version that it used to work well on for testing purposes and tried to fire the script again.

This time the script failed but the MySQL error box now contains the error message! So it seems with the newer PHP version I get no error message and with the older release, I do. Either way, we now have an error message to work with! :)

mySQL query error: INSERT INTO ibf_mods (title,sub_title,category,compatible,version,author,email,mod_token,install_date,mod_dir,howto,codechange) VALUES ('Resize Images','Passt übergroße Images an die Fensterbreite oder eine fixe Skinbreite an oder zeigt sie in einem Frame','Major Mod','Invision Power Board 1.3','2.8.0','Peter','Peter@ibforen.de','mod_resize_images','1387404381','resize_images','sources/mods/resize_images/mod_resize_images_howto.htm','[COMMENT]

...at this point the text to be inserted follows for about 3 pages or so...it's a lot...

and then we get to the actual error message;

mySQL error: Incorrect string value: '\xFCbergr...' for column 'sub_title' at row 1
mySQL error code:
Date: Wednesday 18th 2013f December 2013 02:06:21 PM

sub_title only appears twice in the entire query. Once in the query itself and the actual data for sub_title insert appears to be this;

\\\'sub_title\\\' => \\\'Erzeuge deine eigenen BBCodes und Buttons im ACP und speichere sie in der Datenbank\\\',

I have no idea where the reported \xFCbergr comes from that it's reporting. I did a search of the entire query for bergr and nothing...

Options: ReplyQuote


Subject
Written By
Posted
Re: Newby needs some help - collation/charset ?
December 18, 2013 05:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.