forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: tobyc on October 02, 2005, 02:32:53 pm

Title: Error on installing.
Post by: tobyc on October 02, 2005, 02:32:53 pm
PHP Version :  5.0.4
MySQL Version : 5-04 Beta
OS: Windows XP SP2

When installing coppermine 1.4 on the above platform I get the following error message, I pressume it has something to do with the part in red any ideas?:

mySQL Error: Invalid default value for 'mtime' on query '

CREATE TABLE cpg140_pictures ( pid int(11) NOT NULL auto_increment, aid int(11) NOT NULL default '0', filepath varchar(255) NOT NULL default '', filename varchar(255) NOT NULL default '', filesize int(11) NOT NULL default '0', total_filesize int(11) NOT NULL default '0', pwidth smallint(6) NOT NULL default '0', pheight smallint(6) NOT NULL default '0', hits int(10) NOT NULL default '0', mtime datetime NULL default '', ctime int(11) NOT NULL default '0', owner_id int(11) NOT NULL default '0', owner_name varchar(40) NOT NULL default '', pic_rating int(11) NOT NULL default '0', votes int(11) NOT NULL default '0', title varchar(255) NOT NULL default '', caption text NOT NULL, keywords varchar(255) NOT NULL default '', approved enum('YES','NO') NOT NULL default 'NO', galleryicon int(11) NOT NULL default '0', user1 varchar(255) NOT NULL default '', user2 varchar(255) NOT NULL default '', user3 varchar(255) NOT NULL default '', user4 varchar(255) NOT NULL default '', url_prefix tinyint(4) NOT NULL default '0', randpos int(11) NOT NULL default '0', pic_raw_ip tinytext, pic_hdr_ip tinytext, lasthit_ip tinytext, PRIMARY KEY (pid), KEY owner_id (owner_id), KEY pic_hits (hits), KEY pic_rate (pic_rating), KEY aid_approved (aid,approved), KEY randpos (randpos), KEY pic_aid (aid), position INT(11) NOT NULL default '0', FULLTEXT KEY search (title,caption,keywords,filename) ) TYPE=MyISAM'
Title: Re: Error on installing.
Post by: kegobeer on October 02, 2005, 11:31:20 pm
There is no support for the beta version.  There are no known problems when installing 1.4.x, so I don't think this is a valid bug report.

If you want support, please use the stable (1.3.5) version.
Title: Re: Error on installing.
Post by: tobyc on October 03, 2005, 11:19:29 am
I would say its a valid bug, downgraded mysql to 4.1 and it works fine...
Title: Re: Error on installing.
Post by: artistsinhawaii on October 03, 2005, 11:28:44 am
I would say its a valid bug, downgraded mysql to 4.1 and it works fine...

Ah, but a bug with which? Beta Mysql? or Beta Cpg1.4.x?

I think it was Confusius who said, "Mo' beta to avoid judgin' beta on a beta."

Sounds more like backward compatibiity issues with mysql5.x, maybe a register_long_arrays = On type error?  <shrug>  Seems to be a lot of that going on even with 1.3.x.

Dennis
Title: Re: Error on installing.
Post by: DJMaze on October 03, 2005, 02:14:40 pm
I thought there was a rule as well to only report bugs on the latest beta, MySQL is at version 5.0.13 :P
Title: Re: Error on installing.
Post by: Joachim Müller on October 03, 2005, 02:22:02 pm
Using mysql beta versions is not recommended at all unless you really, really know your way around in mysql extremely well. Posting a bug report on the coppermine forums is completely invalid. Report your bug @ mysql if you like.
Title: Re: Error on installing.
Post by: Andi on October 28, 2005, 08:07:29 pm
Hi :)

a Betatester of our pragmaMx-Port has the same Problem.
He uses MySQL-Version: 5.0.6.

Here is the fast and easy solution:
Edit file sql/schema.sql at line #118
change
Code: [Select]
  mtime datetime NULL default '',
to:
Code: [Select]
  mtime datetime NULL default NULL,

the complete sql-statement is then:
Quote
CREATE TABLE CPG_pictures (
  pid int(11) NOT NULL auto_increment,
  aid int(11) NOT NULL default '0',
  filepath varchar(255) NOT NULL default '',
  filename varchar(255) NOT NULL default '',
  filesize int(11) NOT NULL default '0',
  total_filesize int(11) NOT NULL default '0',
  pwidth smallint(6) NOT NULL default '0',
  pheight smallint(6) NOT NULL default '0',
  hits int(10) NOT NULL default '0',
  mtime datetime NULL default NULL,
  ctime int(11) NOT NULL default '0',
  owner_id int(11) NOT NULL default '0',
  owner_name varchar(40) NOT NULL default '',
  pic_rating int(11) NOT NULL default '0',
  votes int(11) NOT NULL default '0',
  title varchar(255) NOT NULL default '',
  caption text NOT NULL,
  keywords varchar(255) NOT NULL default '',
  approved enum('YES','NO') NOT NULL default 'NO',
  galleryicon int(11) NOT NULL default '0',
  user1 varchar(255) NOT NULL default '',
  user2 varchar(255) NOT NULL default '',
  user3 varchar(255) NOT NULL default '',
  user4 varchar(255) NOT NULL default '',
  url_prefix tinyint(4) NOT NULL default '0',
#  randpos int(11) NOT NULL default '0',
  pic_raw_ip tinytext,
  pic_hdr_ip tinytext,
  lasthit_ip tinytext,
  PRIMARY KEY  (pid),
  KEY owner_id (owner_id),
  KEY pic_hits (hits),
  KEY pic_rate (pic_rating),
  KEY aid_approved (aid,approved),
#  KEY randpos (randpos),
  KEY pic_aid (aid),
  position INT(11) NOT NULL default '0',
  FULLTEXT KEY search (title,caption,keywords,filename)
) TYPE=MyISAM;