- Code: Select all
SQL ERROR [ mysql4 ] Field 'topic_last_poster_name' doesn't have a default value [1364] SQL INSERT INTO phpbb_topics (topic_poster, topic_time, topic_last_view_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (2, 1320058382, 1320058382, 6, 0, 1, 'testing', 'Quiff Boy', 'AA0000', 0, 0, 0) BACKTRACE FILE: includes/db/mysql.php LINE: 175 CALL: dbal->sql_error() FILE: includes/functions_posting.php LINE: 1964 CALL: dbal_mysql->sql_query() FILE: posting.php LINE: 1116 CALL: submit_post()
it's probably worth giving you a bit of background:
- the site was running phpbb2
- i uploaded a copy of phpbb3 to a new folder and ran the initial v3 installation
- i then logged into the fresh v3 as admin and imported the v2 forum data
- i then moved hosts, so i logged into phpmyadmin and exported an sql dump of the v3 tables and data
- on the new server i imported the sql dump, and then ftp'd up the v3 forum scripts
you can browse the forum ok, and can log in and out, but when you try to create a new post you get the above error
has something gone wrong with my export/import?
it looks to me like the export didnt define that table's default values. if that's the case, it may have omitted all the other default values for required fields... is there an sql script i could run to set them?
or is there something wrong with the phpbb installation? it was a fresh download of v3.0.9 from phpbb.com
if you want to see it in action you can have a look at http://www.leedsriots.co.uk/forum/
------------- Edit: -------------
just tried registering a new account and that throws the following similar error:
- Code: Select all
SQL ERROR [ mysql4 ] Field 'user_from' doesn't have a default value [1364] An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
it seems like during the export and import the default values where omitted from the sql dump
has anyone got an sql script that will recreate them?
------------- Second Edit: -------------
i found this, which i've run to generate the required sql. i then then the sql against the new db and it's fixed the problems
http://www.phpbb.com/kb/article/doesnt- ... ue-errors/
figured i'd update this post for others to see