MyBB Community Forums

Full Version: whenever i am trying to change zip file attachment dize , getting sql error !
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i just wanted to change the max file size of zip file is from 1024 kb to 2048 and it shows me tge sql error. Nad yes i am in latest mybb version.

[Image: Screenshot-2021-08-09-19-33-59-082-com-a...chrome.jpg]


so that i deleted that extension and tried to re added zip filr manually. but again comes this error.

[Image: Screenshot-2021-08-09-19-05-54-656-com-a...chrome.jpg]
Detals about the sql error may help.
run below query on database from phpmyadmin :

alter table mybb_attachtypes add forcedownload tinyint(1) NOT NULL default '0' AFTER enabled
notic : change table prefix with your prefix
my forum wasn't a live public forum that's why i re installed my forum and with totally new pure mybb i faced with same error.

(2021-08-09, 01:46 PM)Mostafa.Shiraali Wrote: [ -> ]run below query on database from phpmyadmin :

alter table mybb_attachtypes add forcedownload tinyint(1) NOT NULL default '0' AFTER enabled
notic : change table prefix with your prefix

yup , this solved my problem , Thankbyou so much , anyway i am curious that waht was the problem , please don't mind , what was the problem ?
(2021-08-09, 02:08 PM)PARADOXP Wrote: [ -> ]yup , this solved my problem , Thankbyou so much , anyway i am curious that waht was the problem , please don't mind , what was the problem ?

This field was not added in the mybb update you made
Seems the installer is wrong: the forcedownload is not present, it only exists in upgrade52.php.
$tables[] = "CREATE TABLE mybb_attachtypes (
  atid int unsigned NOT NULL auto_increment,
  name varchar(120) NOT NULL default '',
  mimetype varchar(120) NOT NULL default '',
  extension varchar(10) NOT NULL default '',
  maxsize int(15) unsigned NOT NULL default '0',
  icon varchar(100) NOT NULL default '',
  enabled tinyint(1) NOT NULL default '1',
  `groups` TEXT NOT NULL,
  forums TEXT NOT NULL,
  avatarfile tinyint(1) NOT NULL default '0',
  PRIMARY KEY (atid)
) ENGINE=MyISAM;"

So with a fresh install, the updater is not called and the field is not created.
I recently installed the latest version as a NEW install. Went to change the attachment sizes in a non-public, zero plugin install of the forum and received the same exact error. If this hasn't been officially reported, may be a good thing to do?

I ran the SQL query mentioned and it worked!
Thanks!