versions: IIS 5, MySQL 5.0.15-nt, PHP 5.05. I get the following error after clicking the [Install] button on the _install.php page (after entering host/user/pass/db, gallery name/user/pass):
Invalid default value for 'compression'
CREATE TABLE `plogger_config` ( `max_thumbnail_size` int(11) NOT NULL default '0', `max_display_size` int(11) NOT NULL default '0', `thumb_num` int(11) NOT NULL default '0', `admin_username` varchar(64) NOT NULL default '', `admin_password` varchar(64) NOT NULL default '', `admin_email` varchar(50) NOT NULL default '', `date_format` varchar(64) NOT NULL default '', `compression` int(11) NOT NULL default '', `default_sortby` varchar(20) NOT NULL default '', `default_sortdir` varchar(5) NOT NULL default '', `gallery_name` varchar(255) NOT NULL default '', `allow_dl` smallint(1) NOT NULL default '0', `allow_comments` smallint(1) NOT NULL default '1', `allow_print` smallint(1) NOT NULL default '1', `truncate` int(11) NOT NULL default '12', `square_thumbs` tinyint default 1, `feed_num_entries` int(15) NOT NULL default '15', `rss_thumbsize` int(11) NOT NULL default '400', `feed_title` text NOT NULL, `use_mod_rewrite` tinyint NOT NULL default '0', `comments_notify` tinyint NOT NULL default '1', `feed_language` varchar(255) NOT NULL default 'en-us' ) Type=MyISAM DEFAULT CHARACTER SET UTF8
-
I used phpMyadmin 2.64 to create db "plogger" before I ran the _install.php, and it does create plogger_albums and plogger_collections tables, but errors on the _config table.
So, I dropped the db, and started over. Created the database... blanked-out the plog-config.php... searched the forum, didn't find anything related... and changed line 162 in _install.php from this: `compression` int(11) NOT NULL default '', to this: `compression` int(11) NOT NULL,
I really don't know what I'm doing with mysql, but figured I'd try. That did add _albums, _collections, _comments, _config, and _pictures tables. I see it added "75" as the value for compression in _config table. _install.php proceeded to admin login, then to plog-upload.php page. I clicked on "Manage", tried to add a collection and got another error:
Field 'thumbnail_id' doesn't have a default value INSERT INTO plogger_collections (`name`,`description`,`id`,`path`) VALUES ('collection1', 'collection1 description', '', 'collection1')
I messed around a bit more, but couldn't get it to work. Problem seems db related. Could it be a compatibility issue with mysql 5? any ideas? Thanks!
First, I would have suggested changing: `compression` int(11) NOT NULL default '', to `compression` int(11) NOT NULL default '0', I suspect mySQL was angry that you told it the column would be "NOT NULL", then gave it null ('') as the default value. You wouldn't be happy either. ;) My install, somewhat curiously, has "0" as the default. Not a great default; your 75 makes more sense. However, I would suggest '0' for the _install.php value. You know mySQL won't kick it back.
As for your second problem, I would suggest changing thumbnail_id in plogger_albums to a default of 0; with luck, that will solve the other error. However, this seems that it was a systemic problem, like the files got tranferred as binary or something, and you lost all of the zeros.
Either that, or the database didn't get set up properly initially, and everything went pear-shaped. Either way, a fresh install sounds like a good start. If that doesn't work, reply, and I'm sure Mike or someone else might have a better solution.