Mam lokalnie zainstalowanego Appserv w wersji 2.5.7 na platformie windows (2000). Chciałem zaktualizować statystyki do najnowszej wersji z wersji 4.0.
Przebieg aktualizacji:
1. Wrzucam do katalogu ze statystykami wszystkie nowe pliki nadpisując stare,
2. tworzę w folderze "conf" pusty plik o nazwie "config.php"
3. otwieram strone http://localhost/test/estats/,
4. domyślnie wybrana jest aktualizacja i mysql,
5. przechodzę do kroku 2 wybrane domyślnie są 3 środkowe opcje których nie zmieniam,
6. test połączenia z bazą działa poprawnie,
7. w debugerze jest (C:\AppServ\www\test\estats\db\MySQL\config.php: 3 Undefined index: PConnect)
8. przechodzę do kroku 3
9. w Kroku trzecim sa cyrki czyli:
monit, "Wystąpiły problemy podczas tworzenia struktury bazy danych! "
oraz drugi "Plik konfiguracyjny nie mógł zostać zapisany! "
niżej cała litania kodu do wykonania oraz dane do pliku config.php:
[code]START TRANSACTION;
CREATE TABLE `estats_configuration` (`name` varchar(50) NOT NULL, `value` text, `mode` tinyint(1) NOT NULL, PRIMARY KEY (`name`));
CREATE TABLE `estats_logs` (`time` int(11) NOT NULL, `log` smallint(6) NOT NULL, `info` text);
ALTER TABLE `estats_ignored` ADD COLUMN `type` tinyint(1) NOT NULL AFTER `ua`, ADD KEY (`ip`, `type`);
ALTER TABLE `estats_oses` ADD COLUMN `version` text NOT NULL AFTER `num`;
ALTER TABLE `estats_visitors` ADD COLUMN `proxy` varchar(50) NOT NULL AFTER `robot`, ADD COLUMN `proxyip` varchar(50) NOT NULL AFTER `proxy`;
ALTER TABLE `estats_sites` CHANGE COLUMN `adress` `address` text NOT NULL;
DELETE FROM `estats_oses`;
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 1902, 'XP');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 293, '98');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Linux', 17, '');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 7, '95');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 126, '2000');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 23, 'ME');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 13, '2003');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'Windows', 6, 'NT');
INSERT INTO `estats_oses` VALUES('2007-01-01', 'MacOS', 3, 'X');
INSERT INTO `estats_oses` VALUES('2007-01-01', '?', 3, '');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 6331, 'XP');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 903, '98');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 41, '2003');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 90, 'ME');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 378, '2000');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 1, '');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 27, 'NT');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 15, '95');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Linux', 47, '');
INSERT INTO `estats_oses` VALUES('2007-02-01', '?', 15, '');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'Windows', 6, 'Vista');
INSERT INTO `estats_oses` VALUES('2007-02-01', 'MacOS', 6, 'X');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 251, '2000');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 3624, 'XP');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Linux', 33, '');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 416, '98');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 40, 'ME');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 25, '2003');
INSERT INTO `estats_oses` VALUES('2007-03-01', '?', 8, '');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 15, 'NT');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 4, 'Vista');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Windows', 5, '95');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'MacOS', 2, 'X');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Mac', 1, '');
INSERT INTO `estats_oses` VALUES('2007-03-01', 'Symbian', 1, '');
INSERT INTO `estats_oses` VALUES('2007-04-01', '?', 9, '');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 104, '2000');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 166, 'XP');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Linux', 17, '');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 10, '98');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 2, 'ME');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 4, 'Vista');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 3, '2003');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'MacOS', 2, 'X');
INSERT INTO `estats_oses` VALUES('2007-04-01', 'Windows', 1, 'NT');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 118, '2000');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 118, '2000');
INSERT INTO `estats_oses` VALUES('2007-05-01', '?', 8, '');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 909, 'XP');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Linux', 14, '');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 90, '98');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 1, '95');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 7, '2003');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 2, 'Vista');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 9, 'ME');
INSERT INTO `estats_oses` VALUES('2007-05-01', 'Windows', 2, 'NT');
INSERT INTO `estats_oses` VALUES('2007-06-01', 'Windows', 1, '2000');
DELETE FROM `estats_visitors`;
DELETE FROM `estats_details`;
CREATE TABLE `estats_websearchers` (`date` date NOT NULL, `name` text NOT NULL, `num` int(11) NOT NULL);
INSERT INTO `estats_logs` VALUES(1169409567, 0, '4.0');
INSERT INTO `estats_configuration` VALUES('Antipixel', 'default/silver.png', 0);
INSERT INTO `estats_configuration` VALUES('CountPhrases', '0', 0);
INSERT INTO `estats_configuration` VALUES('CountRobots', '1', 0);
INSERT INTO `estats_configuration` VALUES('IgnoredIPs', '', 0);
INSERT INTO `estats_configuration` VALUES('Keywords', '', 0);
INSERT INTO `estats_configuration` VALUES('LogEnabled', '1', 0);
INSERT INTO `estats_configuration` VALUES('LogFile', '1', 0);
INSERT INTO `estats_configuration` VALUES('Monitor', '1', 0);
INSERT INTO `estats_configuration` VALUES('Monthly', '1', 0);
INSERT INTO `estats_configuration` VALUES('Referrers', '', 0);
INSERT INTO `estats_configuration` VALUES('SendHeaders', '1', 0);
INSERT INTO `estats_configuration` VALUES('StatsEnabled', '1', 0);
INSERT INTO `estats_configuration` VALUES('Time', '43200', 0);
INSERT INTO `estats_configuration` VALUES('Backups|profile', 'full', 0);
INSERT INTO `estats_configuration` VALUES('Backups|replacedata', '1', 0);
INSERT INTO `estats_configuration` VALUES('Backups|tablesstructure', '0', 0);
INSERT INTO `estats_configuration` VALUES('Backups|time', '0', 0);
INSERT INTO `estats_configuration` VALUES('Backups|usertables', '', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|browsers', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|cookies', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|flash', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|hosts', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|java', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|javascript', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|keywords', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|langs', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|oses', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|screens', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|referrers', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|robots', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|sites', '1', 0);
INSERT INTO `estats_configuration` VALUES('CollectData|websearchers', '1', 0);
INSERT INTO `estats_configuration` VALUES('Version', '4.5.09', 0);
INSERT INTO `estats_configuration` VALUES('LastReset', '1169409567', 0);
INSERT INTO `estats_configuration` VALUES('LastBackup', '0', 0);
INSERT INTO `estats_configuration` VALUES('UID', 'ea19de12c3965b88189e4ebb010431c6', 0);
INSERT INTO `estats_configuration` VALUES('RegenerateForAdmin', '1', 1);
INSERT INTO `estats_configuration` VALUES('DBCache|archive', '15', 1);
INSERT INTO `estats_configuration` VALUES('DBCache|detailed', '3', 1);
INSERT INTO `estats_configuration` VALUES('DBCache|general', '15', 1);
INSERT INTO `estats_configuration` VALUES('DBCache|technical', '15', 1);
INSERT INTO `estats_configuration` VALUES('DBCache|time', '15', 1);
INSERT INTO `estats_configuration` VALUES('AntyFlood', '2', 1);
INSERT INTO `estats_configuration` VALUES('BlockedIPs', '', 1);
INSERT INTO `estats_configuration` VALUES('CheckVersionTime', '600', 1);
INSERT INTO `estats_configuration` VALUES('DateFormat', 'd.m.Y H:i:s', 1);
INSERT INTO `estats_configuration` VALUES('Debug', '0', 1);
INSERT INTO `estats_configuration` VALUES('DefaultLang', 'en', 1);
INSERT INTO `estats_configuration` VALUES('DefaultPage', 'general', 1);
INSERT INTO `estats_configuration` VALUES('DefaultTheme', 'Silver', 1);
INSERT INTO `estats_configuration` VALUES('EditMode', '1', 1);
INSERT INTO `estats_configuration` VALUES('Header', 'Statystyki dla <a href=\"http://localhost\" tabindex=\"7\">localhost</a><br />\r\n<small>Dane zbierane od 02.06.2007</small>', 1);
INSERT INTO `estats_configuration` VALUES('IgnoredAmount', '30', 1);
INSERT INTO `estats_configuration` VALUES('LogsAmount', '50', 1);
INSERT INTO `estats_configuration` VALUES('Offset', '0', 1);
INSERT INTO `estats_configuration` VALUES('MaxAdminGroupOptions', '50', 1);
INSERT INTO `estats_configuration` VALUES('Maintenance', '0', 1);
INSERT INTO `estats_configuration` VALUES('Pass', '', 1);
INSERT INTO `estats_configuration` VALUES('RemeberTime', '1209600', 1);
INSERT INTO `estats_configuration` VALUES('TimeZone', 'UTC', 1);
INSERT INTO `estats_configuration` VALUES('WeekStartDay', '1', 1);
INSERT INTO `estats_configuration` VALUES('WhoisLink', 'http://www.ripe.net/fcgi-bin/whois?searchtext=[data]', 1);
INSERT INTO `estats_configuration` VALUES('Charts|defaultview', 'all', 1);
INSERT INTO `estats_configuration` VALUES('Charts|showlevels', '1', 1);
INSERT INTO `estats_configuration` VALUES('Charts|showtooltips', '1', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|amount', '30', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|period', '30', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|detailsamount', '30', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|keepalldata', '1', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|maxpages', '10', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|showdetails', '1', 1);
INSERT INTO `estats_configuration` VALUES('Detailed|showrobots', '1', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|browsers', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|cookies', '3', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|flash', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|hosts', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|java', '3', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|javascript', '3', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|keywords', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|langs', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|oses', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|referrers', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|robots', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|screens', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|sites', '30', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|vbrowsers', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|voses', '15', 1);
INSERT INTO `estats_configuration` VALUES('HowMany|websearchers', '15', 1);
INSERT INTO `estats_configuration` VALUES('Path|mode', '1', 1);
INSERT INTO `estats_configuration` VALUES('Path|prefix', 'index.php?path=', 1);
INSERT INTO `estats_configuration` VALUES('Path|separator', '?', 1);
INSERT INTO `estats_configuration` VALUES('Path|suffix', '', 1);
INSERT INTO `estats_configuration` VALUES('AdminPass', 'cb6aded852f8c47d7309894c8408e33d', 1);
INSERT INTO `estats_configuration` VALUES('LastClean', '2007060220', 1);
INSERT INTO `estats_logs` VALUES(1180814956, 1, 'From 4.0 to 4.5.09');
UPDATE `estats_oses` SET `name` = 'MacOS' WHERE `name` = 'Mac';
UPDATE `estats_cookies` SET `name` = 0 WHERE `name` = '_0';
UPDATE `estats_cookies` SET `name` = 1 WHERE `name` = '_1';
UPDATE `estats_java` SET `name` = 0 WHERE `name` = '_0';
UPDATE `estats_java` SET `name` = 1 WHERE `name` = '_1';
UPDATE `estats_javascript` SET `name` = 0 WHERE `name` = '_0';
UPDATE `estats_javascript` SET `name` = 1 WHERE `name` = '_1';
UPDATE `estats_flash` SET `name` = 0 WHERE `name` = '_0';
UPDATE `estats_flash` SET `name` = 1 WHERE `name` = '_1';
UPDATE `estats_flash` SET `name` = 2 WHERE `name` = '_2';
UPDATE `estats_flash` SET `name` = 3 WHERE `name` = '_3';
UPDATE `estats_flash` SET `name` = 4 WHERE `name` = '_4';
UPDATE `estats_flash` SET `name` = 5 WHERE `name` = '_5';
UPDATE `estats_flash` SET `name` = 6 WHERE `name` = '_6';
UPDATE `estats_flash` SET `name` = 7 WHERE `name` = '_7';
UPDATE `estats_flash` SET `name` = 8 WHERE `name` = '_8';
UPDATE `estats_flash` SET `name` = 9 WHERE