In log i have error:
Code: Select all
03/11/2008 04:56:19 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1364', SQL:"insert into weathermap_maps (configfile,titlecache,active,imagefile,htmlfile) VALUES ('test.conf','TEST','on','','')'
Code: Select all
mysql>
mysql> insert into weathermap_maps (configfile,titlecache,active,imagefile,htmlfile) VALUES ('test.conf','(no title)','on','','');
ERROR 1364 (HY000): Field 'filehash' doesn't have a default value
mysql> quit
Code: Select all
if (!in_array('weathermap_maps', $tables)) {
$sql[] = "CREATE TABLE weathermap_maps (
id int(11) NOT NULL auto_increment,
sortorder int(11) NOT NULL default 0,
active set('on','off') NOT NULL efault 'on',
configfile text NOT NULL,
imagefile text NOT NULL,
htmlfile text NOT NULL,
titlecache text NOT NULL,
filehash varchar (40) NOT NULL, <=== THIS !!!!
warncount int(11) NOT NULL default 0,
config text NOT NULL, <===== AND THIS !!!!
PRIMARY KEY (id)
) TYPE=MyISAM;";
}
filehash varchar (40) NOT NULL and config text NOT NULL is new in table, but in insert in weathermap-cacti-plugin-mgmt.php (450-453) not supported:
Code: Select all
$file = mysql_real_escape_string($file);
$title = mysql_real_escape_string($title);
$SQL = "insert into weathermap_maps (configfile,titlecache,active,imagefile,htmlfile) VALUES ('$file','$title','on','','')";
db_execute($SQL);