mysql - Can't save php serialized string, error on ";" semicolon char -
i´m trying import sql file mysql server 5.5, keep getting error:
you have error in sql syntax; check manual corresponds mysql server version right syntax use near ''a:10:{i:0' and query:
insert `preferences` values ('system','active_plugins','a:10:{i:0;s:16:\"voting/index.php\";i:1;s:26:\"social_bookmarks/index.php\";i:2;s:25:\"profile_picture/index.php\";i:3;s:26:\"lz_theme_options/index.php\";i:4;s:21:\"google_maps/index.php\";i:5;s:17:\"youtube/index.php\";i:6;s:18:\"facebook/index.php\";i:7;s:23:\"lz_demo_theme/index.php\";i:8;s:25:\"cars_attributes/index.php\";i:9;s:20:\"lz_firephp/index.php\";}','string'), so i'm thinking it's encoding problem, because throwing error right on semicolon, checked, utf-8. strangest thing if run same query through phpmyadmin or navycat or mysqlworkbench no error thrown, when processed server.
ok, found problem was, not mysql, not php, no hidden chars, i´m dealing open source cms´s, , code plugin cms, using existing method cms uses import same file, have seen method meny times, , knew had break big sql file in separate querys run each of querys, , breaking sql on every ";", breaking serialized string in parts too, why getting this:
''a:10:{i:0' as error, query ended there, when should not.
thanks lots help, hope lack of atention servers others well! rsrs
Comments
Post a Comment