Mysql4 to Mysql5 update default value errors

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
abumslife
Registered User
Posts: 192
Joined: Thu Apr 10, 2003 8:26 pm

Mysql4 to Mysql5 update default value errors

Post by abumslife » Thu Feb 17, 2011 3:08 pm

i'm running 3.0.8 and this is the initial error i got when i tried to post a new Thread
General Error
SQL ERROR [ mysql4 ]

Field 'post_edit_reason' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_posts (forum_id, poster_id, icon_id, poster_ip, post_time, post_approved, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, post_username, post_subject, post_text, post_checksum, post_attachment, bbcode_bitfield, bbcode_uid, post_postcount, post_edit_locked, topic_id) VALUES (19, 2, 0, '174.25.192.92', 1297915853, 1, 1, 1, 1, 0, '', 'test', 'test', '098f6bcd4621d373cade4e832627b4f6', 0, '', '3e6b2mgm', 1, 0, 32411)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 1985
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 1137
CALL: submit_post()
after some searching i ran across this documentation to fix the forums from mysql updates a host might have done.. http://www.phpbb.com/kb/article/doesnt- ... lue-errors

when i ran this script
# Table: 'phpbb_posts'
ALTER TABLE phpbb_posts
MODIFY post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
MODIFY topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY poster_ip varchar(40) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY post_username varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
MODIFY post_text mediumtext NOT NULL COLLATE utf8_bin,
MODIFY post_checksum varchar(32) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY bbcode_bitfield varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY bbcode_uid varchar(8) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_edit_reason varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
DROP INDEX post_username,
ADD KEY post_username (post_username),
DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
i get this error
#1091 - Can't DROP 'post_username'; check that column/key exists
all of the other scripts ran fine
Last edited by Noxwizard on Fri Feb 18, 2011 3:48 pm, edited 1 time in total.
Reason: Changed topic icon

abumslife
Registered User
Posts: 192
Joined: Thu Apr 10, 2003 8:26 pm

Re: Mysql4 to Mysql5 update default value errors

Post by abumslife » Thu Feb 17, 2011 8:14 pm

after looking around my site some more for more errors... i found it's showing my old styles... ones i don't have uploaded anymore... if i delete them they are gone until i leave ACP and come back... then they reappear again...

edit:
also, any changes i do to my site aren't shown...

styles>themes>subsilver2>edit>stylesheet.css

changed to this
#wrapheader {
min-height: 120px;
width: 940px;
margin: auto;
height: auto !important;
height: 120px;
/* background-image: url('./images/background.gif');
background-repeat: repeat-x;*/
padding: 0 25px 15px 25px;
/* padding: 0;*/
}

#wrapcentre {
margin: auto;
/* margin: 15px 25px 0 25px;*/
width: 940px;
}

#wrapfooter {
text-align: center;
margin: auto;
clear: both;
width: 940px;
}

and it doesn't do anything

abumslife
Registered User
Posts: 192
Joined: Thu Apr 10, 2003 8:26 pm

Re: Mysql4 to Mysql5 update default value errors

Post by abumslife » Fri Feb 18, 2011 4:35 am

i'm still hoping for some help or at least some guidance... thanks

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10344
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: Mysql4 to Mysql5 update default value errors

Post by Noxwizard » Fri Feb 18, 2011 6:35 am

For the SQL error, just remove this part from the query:

Code: Select all

DROP INDEX post_username,
For the old styles, have you refreshed the theme? That will reload the stylesheet from the file. (Styles --> Themes --> Refresh)
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

abumslife
Registered User
Posts: 192
Joined: Thu Apr 10, 2003 8:26 pm

Re: Mysql4 to Mysql5 update default value errors

Post by abumslife » Fri Feb 18, 2011 1:27 pm

thank you sir... everything seems to be working

Locked

Return to “[3.0.x] Support Forum”