as i updated a friends sentinel i got the following error...
- Alter nuke_nsnst_tracked_ips failed
- Alter nuke_nsnst_tracked_ips failed
- Alter nuke_nsnst_tracked_ips failed
but UPDATE nsnst_config was succesfull..
any idea on the nsnst_tracked_ips ?
And another thing i noticed...
when i try out to edit the templates i get the black screen of banned,im not as im logged in as admin....but makes editing impossible...
I got the same errors when I upgraded, I droped the table and recreated it from the full install package. Don't know about the blocks with the templates, I don't have that problme, i don't have an edit template, but view template and show souce works just fine.
Joined: Feb 26, 2006 Posts: 206 Location: Springfield, MA
Posted:
Fri Nov 03, 2006 8:40 pm
I have two systems - a development copy of our website, and the live website.
I got the same errors on my development system. So, when I went to update my live system, I added numbers to the the error messages. Here are the operations that failed. (BTW - I upgraded from 2.5.02).
$result = $db->sql_query("ALTER TABLE `".$prefix."_nsnst_tracked_ips` DROP INDEX `user_agent`");
if(!$result) { echo "- Alter ".$prefix."_nsnst_tracked_ips failed6<br />\n"; $message = ""; }
$result = $db->sql_query("ALTER TABLE `".$prefix."_nsnst_tracked_ips` DROP INDEX `refered_from`");
if(!$result) { echo "- Alter ".$prefix."_nsnst_tracked_ips failed7<br />\n"; $message = ""; }
$result = $db->sql_query("ALTER TABLE `".$prefix."_nsnst_tracked_ips` DROP INDEX `page`");
if(!$result) { echo "- Alter ".$prefix."_nsnst_tracked_ips failed9<br />\n"; $message = ""; }
Do I also need to drop and recreate the table, or is this error survivable?
Joined: Feb 26, 2006 Posts: 206 Location: Springfield, MA
Posted:
Sat Nov 04, 2006 9:00 am
Hmmm...
I hacked the install.php script from the full package and created a fixnsn.php script that drops the Tracked IP table and recreates it. Then I used phpMyAdmin to compare the structure between my development system and my life system. I'm not seeing a difference (except for cardinality) in the indices.
Development:
Code:
Indexes:
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 0 tid
ip_addr INDEX None ip_addr
ip_long INDEX None ip_long
user_id INDEX None user_id
username INDEX None username
user_agent INDEX None user_agent 255
refered_from INDEX None refered_from 255
date INDEX None date
page INDEX None page 255
c2c INDEX None c2c
Live:
Code:
Indexes:
Keyname Type Cardinality Action Field
PRIMARY PRIMARY 22844 tid
ip_addr INDEX 4568 ip_addr
ip_long INDEX 4568 ip_long
user_id INDEX 5 user_id
username INDEX 5 username
user_agent INDEX 846 user_agent 255
refered_from INDEX 56 refered_from 255
date INDEX 22844 date
page INDEX 7614 page 255
c2c INDEX 77 c2c
If you want, here is the code of the fixnsn.php script:
Code:
<?php
$pagetitle = $pagename.": Install";
include("header.php");
title("$pagetitle");
OpenTable();
echo "Operation Status!<br />\n";
echo "<hr />\n";
$message = "Everything seems to have completed successfully :)<br />\n";
$result = $db->sql_query("DROP TABLE `".$prefix."_nsnst_tracked_ips`");
if(!$result) { echo "- Drop ".$prefix."_nsnst_tracked_ips failed<br />\n"; $message = ""; }
$result = $db->sql_query("CREATE TABLE `".$prefix."_nsnst_tracked_ips` (`tid` int(10) NOT NULL auto_increment, `ip_addr` varchar(15) NOT NULL default '', `ip_long` INT(10) unsigned NOT NULL default '0', `user_id` int(11) NOT NULL default '1', `username` varchar(60) NOT NULL default '', `user_agent` text NOT NULL, `refered_from` TEXT NOT NULL, `date` int(20) NOT NULL default '0', `page` text NOT NULL, `x_forward_for` varchar(32) NOT NULL default '', `client_ip` varchar(32) NOT NULL default '', `remote_addr` varchar(32) NOT NULL default '', `remote_port` varchar(11) NOT NULL default '', `request_method` varchar(10) NOT NULL default '', `c2c` char(2) NOT NULL default '00', PRIMARY KEY (`tid`), KEY `ip_addr` (`ip_addr`), KEY `ip_long` (`ip_long`), KEY `user_id` (`user_id`), KEY `username` (`username`), KEY `user_agent` (`user_agent`(255)), KEY `refered_from` (`refered_from`(255)), KEY `date` (`date`), KEY `page` (`page`(255)), KEY `c2c` (`c2c`))");
if(!$result) { echo "- Create ".$prefix."_nsnst_tracked_ips failed<br />\n"; $message = ""; }
echo "$message<hr />\n";
echo "Operation Complete!<br />\n";
echo "Goto <a href=\"".$admin_file.".php?op=ABMain\">NukeSentinel™ Admin</a>\n";
CloseTable();
include("footer.php");
RN 2.02.00
Created user_agent without an index.
Did not have a refered_from field.
Created page without an index.
RN 2.02.02
Did not touch user_agent.
Did not have a refered_from field.
Did not touch page.
NSN 2.4.2pl9
Did not touch user_agent.
Did not have a refered_from field.
Deleted several rows of page based on LIKE values.
NSN 2.05.00
Did not touch user_agent.
Did not have a refered_from field.
Deleted several rows of page based on LIKE values
(same logic as in NSN 2.4.2pl9]
NSN 2.05.02
Did not touch user_agent.
Did not have a refered_from field.
NSN 2.05.03
Added a refered_from field.
Dropped the index on user_agent. [fails]
Dropped the index on refered_from. [fails]
Dropped the index on page. [fails]
Adds the index on user_agent.
Adds the index on refered_from.
Adds the index on page.
Sets the refered_from values to 'Before NukeSentinel(tm)'.
Looks like the problem is the script is dropping indices that don't exist.
Joined: Jan 23, 2004 Posts: 37 Location: Netherlands
Posted:
Sat Nov 04, 2006 12:49 pm
Yep, I had a similar problem....when I ran the update script, the mysql server had an overload or sumfn. Site would not run for several minutes.
When I checked the database with the update file, all changes do were made.
Humm, I received the same error message, but everything seems to be tracking in the tracked ip section correctly? I didn't make any changes to the DB at all. I didn't drop the table and recreate it. Is there something else Hitwalker you noticed not working in that section. I cleared all tracked ips and then just went through the site and it seemed to track me correctly as I went around. This is using the upgrade 2.5.03. I upgraded from 2.5.02.
Joined: Feb 26, 2006 Posts: 206 Location: Springfield, MA
Posted:
Sun Nov 05, 2006 8:03 am
I didn't drop and recreate the table on my live site either, and all seems to be working well, and the structure matches what is created by a drop and recreate.
If you look at my previous note, I think the error messages come from trying to drop indices that don't exist on user_agent, refered_from and page. The subsequent add index commands work. Those commands are good, defensive coding to set up for the add index that comes later. Rather than removing them, I'd just change the message to reduce the concern - either don't report the error at all, or report that it can be ignored if everything else goes well.
A few suggestions for improvement:
1) If the script reports its errors more specifically (e.g., "drop index on user_agent failed" vs "Alter nuke_nsnst_tracked_ips failed") the Admin has more information to verify whether or not things are broken before coming to the support forums. I know it's more work on the packaging, but it's a trade off for support calls.
2) If the script reports positive messages (e.g., "drop index on user_agent succeeded") then the Admin would readily see that the drop failure is not truly a concern.
Oh well, my $.02 The packaging is still awesome despite this minor bump in the road.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum