Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) v2.5.x
Author Message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Fri Nov 03, 2006 4:08 pm Reply with quote

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...
 
View user's profile Send private message
Tao_Man
Involved
Involved



Joined: Jul 15, 2004
Posts: 252
Location: OKC, OK

PostPosted: Fri Nov 03, 2006 4:28 pm Reply with quote

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.

_________________
------------------------------------------
To strive, to seek, to find, but not to yield!
I don't know Kara-te but I do know cra-zy, and I WILL use it! 
View user's profile Send private message Visit poster's website
hitwalker







PostPosted: Fri Nov 03, 2006 4:54 pm Reply with quote

yeah i deffinately need more coffee.
its not edit templates but it shows how they look...

yeah i can fix it like you did but its important to fix the ...why...this happens..
 
webservant
Worker
Worker



Joined: Feb 26, 2006
Posts: 206
Location: Springfield, MA

PostPosted: Fri Nov 03, 2006 8:40 pm Reply with quote

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?

_________________
Awaiting His Shout
Webservant - GraciousCall.org
Romans 8:28-39 
View user's profile Send private message Visit poster's website AIM Address
hitwalker







PostPosted: Sat Nov 04, 2006 6:21 am Reply with quote

well thats basically the same error i got...
but i suggest you do it like Tao_Man did..
 
webservant







PostPosted: Sat Nov 04, 2006 9:00 am Reply with quote

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&trade; Admin</a>\n";
CloseTable();
include("footer.php");

?>
 
webservant







PostPosted: Sat Nov 04, 2006 9:42 am Reply with quote

Perhaps a little history will help us understand the problem.

Here is my installation and upgrade path that may have effected these fields:

RN 2.02.00 --> RN 2.02.02 --> NSN 2.4.2pl9 --> NSN 2.05.00 --> NSN 2.05.02 --> NSN 2.05.03

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.
 
XenoMorpH
Hangin' Around



Joined: Jan 23, 2004
Posts: 37
Location: Netherlands

PostPosted: Sat Nov 04, 2006 12:49 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website
FireATST
RavenNuke(tm) Development Team



Joined: Jun 12, 2004
Posts: 654
Location: Ohio

PostPosted: Sun Nov 05, 2006 7:31 am Reply with quote

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.
 
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
webservant







PostPosted: Sun Nov 05, 2006 8:03 am Reply with quote

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. Cheers
 
FireATST







PostPosted: Sun Nov 05, 2006 9:16 am Reply with quote

ahhh...thanks webservant, I missed your earlier explaination. I think it is working correctly also as far as I have been able to determine so far.....Smile
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sun Nov 05, 2006 12:06 pm Reply with quote

Works for me despite the errors and creates the new indices np.
 
View user's profile Send private message Send e-mail
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) v2.5.x

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©