Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)
Author Message
tangoman
Involved
Involved



Joined: Aug 06, 2005
Posts: 301

PostPosted: Mon Aug 22, 2005 2:27 pm Reply with quote

Bob...What happens if you click on the same country twice, (by mistake, or in my case, I have only downloaded 2 of the United Kingdom selections, but there are 4 and I cannot remember which 2 I HAVE inported already....Hence if I import everything now, I will duplicate 2 of these?


Also....Strangely, when I did import ONLY the 2 UK selections...ALL 248 countries were imported into the country listing without me doing anything else...Is this correct?

_________________
I am using PHPNuke Version 7.6 with patch 3.0, CNB YA 4.4.2, NukeSentinel(tm) 2.3.2 and Nuke Royal. 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Mon Aug 22, 2005 2:40 pm Reply with quote

Tangoman, let us know what happens when you import the same country twice.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Mon Aug 22, 2005 2:50 pm Reply with quote

Tangoman

don´t import usa part 4 twice. Rolling Eyes

I got an awful long list when I added usa 4 several times:

Part4 usa
198.89.64.0 - 198.89.84.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.89.128.0 - 198.89.227.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.90.0.0 - 198.90.4.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.90.8.0 - 198.90.13.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.90.16.0 - 198.90.19.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.90.32.0 - 198.90.72.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.90.128.0 - 198.91.13.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.91.16.0 - 198.91.20.255 _AB_OVERLAPS nuke_nsnst_ip2country
198.91.32.0 - 198.91.41.255 _AB_OVERLAPS nuke_nsnst_ip2country
-------------------------cut-------------------------------------------------



Thanks Bob !

I did´t know this:Import Data:"As long as your browser is java enabled you should not need to use this button".I thought thats an error.
 
View user's profile Send private message
tangoman







PostPosted: Mon Aug 22, 2005 3:41 pm Reply with quote

Thanks for the advanced warning Susann.

So Bob...

What should I do in the situation I have explained above?

Is it possible to delete this information, EASILY, if you have imported the same country twice?

And how comes when I did import ONLY the 2 UK selections, ALL 248 countries were imported into the country listing without me doing anything else...Is this correct?
 
tangoman







PostPosted: Mon Aug 22, 2005 6:36 pm Reply with quote

Thanks for the advanced warning Susann.

So Bob...

What should I do in the situation I have explained above?

Is it possible to delete this information, EASILY, if you have imported the same country twice?

And how comes when I did import ONLY the 2 UK selections, ALL 248 countries were imported into the country listing without me doing anything else...Is this correct?
 
BobMarion
Former Admin in Good Standing



Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Mon Aug 22, 2005 6:53 pm Reply with quote

tangoman wrote:
Bob...What happens if you click on the same country twice, (by mistake, or in my case, I have only downloaded 2 of the United Kingdom selections, but there are 4 and I cannot remember which 2 I HAVE inported already....Hence if I import everything now, I will duplicate 2 of these?


Also....Strangely, when I did import ONLY the 2 UK selections...ALL 248 countries were imported into the country listing without me doing anything else...Is this correct?


It should at the bottom say something like:
"United Kingdom - Part 2 Added"

In version 2.4.0 it will clear the country then re-add it but in the 2.3.x version you will get a list of ranges that didn't import because they are already in there.

_________________
Bob Marion
Codito Ergo Sum
http://www.nukescripts.net 
View user's profile Send private message Send e-mail Visit poster's website
BobMarion







PostPosted: Mon Aug 22, 2005 6:55 pm Reply with quote

tangoman wrote:
Thanks for the advanced warning Susann.

So Bob...

What should I do in the situation I have explained above?

Is it possible to delete this information, EASILY, if you have imported the same country twice?

And how comes when I did import ONLY the 2 UK selections, ALL 248 countries were imported into the country listing without me doing anything else...Is this correct?


The list of 248 countries is added when you installed NukeSentinel(tm). This is why I said in another thread I need to move the "Country Listing" link out of the "Ip to Country" menu. It's causing confusion that it shouldn't.
 
tangoman







PostPosted: Mon Aug 22, 2005 7:14 pm Reply with quote

I think I finally understand...


To confirm, you are saying that the countries listed in the 'Country Listing' would have been installed with the initialy installation of Sentinel and the reason I did not see them initially, is because you see this information by clicking on the 'IP to Country' link, but this is not active until you go through the 'Import Data' menu and proceedure?...All correct Bob?
 
tangoman







PostPosted: Mon Aug 22, 2005 7:21 pm Reply with quote

BobMarion wrote:

It should at the bottom say something like:
"United Kingdom - Part 2 Added"



Where should I now be looking for this?...(Understand that I am saying the installation of ONLY 2 countries was done 24 hours ago, but I think you are advising what will be indicated immdiately after the installation of any data is completeled)...So how do I now see exactly which countries/options have already been imported.
 
BobMarion







PostPosted: Mon Aug 22, 2005 7:45 pm Reply with quote

tangoman wrote:
I think I finally understand...


To confirm, you are saying that the countries listed in the 'Country Listing' would have been installed with the initialy installation of Sentinel and the reason I did not see them initially, is because you see this information by clicking on the 'IP to Country' link, but this is not active until you go through the 'Import Data' menu and proceedure?...All correct Bob?

Yes Smile
 
BobMarion







PostPosted: Mon Aug 22, 2005 7:47 pm Reply with quote

tangoman wrote:
BobMarion wrote:

It should at the bottom say something like:
"United Kingdom - Part 2 Added"



Where should I now be looking for this?...(Understand that I am saying the installation of ONLY 2 countries was done 24 hours ago, but I think you are advising what will be indicated immdiately after the installation of any data is completeled)...So how do I now see exactly which countries/options have already been imported.


Start the import process over and when you import those two again you will see a list that you can ignore. What I normally do when i install it for a client is i delete the country file from the import directory after I import each one. that way if i have to stop and go back to it later i know just where i need to start again Smile
 
tangoman







PostPosted: Mon Aug 22, 2005 8:20 pm Reply with quote

I am just wondering...

Am I only able to install the countries one at a time by highlighting one?

Also, I just highlighted a country and while it was loading the data, the page times out and gave me a 'blank'/'page not found' message...What should I do now?...I tried a second country and it did the same and continues to do so...What gives?

How do I know if the data was completely and sucessfully installed or if only some of the data was installed etc?

What should I do?

Finally for now, what is the difference between adding a country by clicking 'Import Data' followed by 'Import to IP2Country' and selecting the country from the list, OR clicking 'IP to Country' followed by 'IP 2 Country Add' and selecting a country from the list?...

....One thing I do note is that where, in the 'Import to IP2Country' country list there is 4 UK options/countries and 5 USA options/countries, in the 'IP 2 Country Add' country list there is not...There seems no logic here?!
 
BobMarion







PostPosted: Mon Aug 22, 2005 10:28 pm Reply with quote

k, open admin/modules/nukesentinel/ABImportIP2Country.php and find:
Code:
@set_time_limit( 600 );


Change it to:
Code:
set_time_limit( 1200 );


This will double the time out limit unless your server doesn't support setting it in a script. In which case we will have to do a little customizing as follows.

Find:
Code:
        $test = $db->sql_numrows($db->sql_query("SELECT * FROM `".$prefix."_nsnst_ip2country` WHERE (`ip_lo` = '$grabline[0]' AND `ip_hi` = '$grabline[1]') OR (`ip_lo` <= '$grabline[0]' AND `ip_hi` >= '$grabline[0]') OR (`ip_lo` <= '$grabline[1]' AND `ip_hi` >= '$grabline[1]')"));

        if (!$test) {
          $datainserted = False;
          $datainserted = $db->sql_query("INSERT INTO `".$prefix."_nsnst_ip2country` VALUES('$grabline[0]', '$grabline[1]', '$grabline[2]', '$grabline[3]', '$grabline[4]')");
          if (!$datainserted) {
            echo "<b>$grabline[ip_lo] - $grabline[ip_hi] "._AB_NOTINSERTED." ".$prefix."_nsnst_ip2country</b><br>\n";
            $importmess = "";
          }
        } else {
          echo "<i>$grabline[ip_lo] - $grabline[ip_hi] "._AB_OVERLAPS." ".$prefix."_nsnst_ip2country</i><br>\n";
          $importmess = "";
        }


Change to:
Code:
//        $test = $db->sql_numrows($db->sql_query("SELECT * FROM `".$prefix."_nsnst_ip2country` WHERE (`ip_lo` = '$grabline[0]' AND `ip_hi` = '$grabline[1]') OR (`ip_lo` <= '$grabline[0]' AND `ip_hi` >= '$grabline[0]') OR (`ip_lo` <= '$grabline[1]' AND `ip_hi` >= '$grabline[1]')"));

//        if (!$test) {
          $datainserted = False;
          $datainserted = $db->sql_query("INSERT INTO `".$prefix."_nsnst_ip2country` VALUES('$grabline[0]', '$grabline[1]', '$grabline[2]', '$grabline[3]', '$grabline[4]')");
          if (!$datainserted) {
            echo "<b>$grabline[ip_lo] - $grabline[ip_hi] "._AB_NOTINSERTED." ".$prefix."_nsnst_ip2country</b><br>\n";
            $importmess = "";
          }
//        } else {
//          echo "<i>$grabline[ip_lo] - $grabline[ip_hi] "._AB_OVERLAPS." ".$prefix."_nsnst_ip2country</i><br>\n";
//          $importmess = "";
//        }


This will remove the checking for overlaps which is the leading cause of time outs. Version 2.4.0 doesn't use this anymore because of that fact.
 
tangoman







PostPosted: Mon Aug 22, 2005 10:38 pm Reply with quote

Ok Bob,

I will give that last suggestion a go soon.

But first, I just want to bring the latest posting I have made to your attention:


[ Only registered users can see links on this board! Get registered or login! ]


I am not sure if there is a database problem here, which may be causing the problem in that posting just quoted, and the problem of the 'Import Data' function timing out too...Is it possible they are related?

I do note however, that there does not appear to be any obviosu database errors showing.

Please can you also explain how I will know if the data was completely and sucessfully installed (or not), at the time I received a 'blank screen'/'This page is not available' message, while trying the 'Import Data' process earlier on?

Finally, there is also this point...

Quote:
What is the difference between adding a country by clicking 'Import Data' followed by 'Import to IP2Country' and selecting the country from the list, OR clicking 'IP to Country' followed by 'IP 2 Country Add' and selecting a country from the list?...

....One thing I do note is that where, in the 'Import to IP2Country' country list there is 4 UK options/countries and 5 USA options/countries, in the 'IP 2 Country Add' country list there is not...There seems no logic here?!
 
BobMarion







PostPosted: Mon Aug 22, 2005 11:07 pm Reply with quote

Clicking on "IP to Country Listing" results in the listing of the ipranges in the database:
Image

Clicking on "Country Listing" results in the listing of the 248 countries in the database:
Image

Countries are just that Country names and c2c's, where IP to Country is the ip range(s) that are assigned to the countries around the world.

As far as the 'blank screen' it means there is an error somewhere and if you set the value in your config.php file to show the php errors it will tell what the error is on that blank screen. Why you would get 'This page is not available' I can not tell you. It sounds like a hosts default message which may be steming from the time out.


Last edited by BobMarion on Mon Aug 22, 2005 11:09 pm; edited 1 time in total 
tangoman







PostPosted: Mon Aug 22, 2005 11:09 pm Reply with quote

Ok Bob...

So for some very strage and miraculous reason, without me changing any code, (as you just advised above), when I just tried one last time to import a country from the list on the the 'Import to IP2Country' page, the process appeared to be sucessfull!!!

Very weird!!!

The process ended with all the IP's that were imported being displaed below 'the line' and read like this:
United Kingdom 4 added!


--------------------------------------------------------------------------------
212.119.11.64 - 212.119.11.87 overlaps another range in nuke_nsnst_ip2country
212.119.11.96 - 212.119.11.119 overlaps another range in nuke_nsnst_ip2country
212.119.11.128 - 212.119.11.175 overlaps another range in nuke_nsnst_ip2country
212.119.11.192 - 212.119.11.199 overlaps another range in nuke_nsnst_ip2country
212.119.11.208 - 212.119.31.255 overlaps another range in nuke_nsnst_ip2country
212.120.136.16 - 212.120.136.63 overlaps another range in nuke_nsnst_ip2country
212.120.136.176 - 212.120.136.191 overlaps another range in nuke_nsnst_ip2country
212.120.137.0 - 212.120.137.63 overlaps another range in nuke_nsnst_ip2country
212.120.137.160 - 212.120.137.175 overlaps another range in nuke_nsnst_ip2country
212.120.137.224 - 212.120.137.255 overlaps another range in nuke_nsnst_ip2country
212.120.141.0 - 212.120.141.31 overlaps another range in nuke_nsnst_ip2country
212.120.146.128 - 212.120.146.143 overlaps another range in nuke_nsnst_ip2country


212.120.150.32 - 212.120.150.47 overlaps another range in nuke_nsnst_ip2country
212.120.152.0 - 212.120.152.31 overlaps another range in nuke_nsnst_ip2country
212.120.152.112 - 212.120.152.191 overlaps another range in nuke_nsnst_ip2country
212.120.153.128 - 212.120.154.127 overlaps another range in nuke_nsnst_ip2country
212.120.155.0 - 212.120.155.15 overlaps another range in nuke_nsnst_ip2country
212.120.155.32 - 212.120.155.47 overlaps another range in nuke_nsnst_ip2country



ETC.............



This DOES mean that the installation was successfull...Correct?

What does 'overlaps another range in nuke_nsnst_ip2country' man?...Is it something I need to worry about?




I any of a

Thanks...But what could be causeing the problem of me no receiving a 'page not found'/blank page error when I click on 'Backup DB' Icon on the 'Administration Menu' page/panel?

(PS I know it is not related to the Sentinel 'Import Data' problems I have been having as that has miraculously begun to work again)
 
BobMarion







PostPosted: Mon Aug 22, 2005 11:19 pm Reply with quote

In other words you had already imported those ip ranges so it didn't add them a second time.

[cuote]Thanks...But what could be causeing the problem of me no receiving a 'page not found'/blank page error when I click on 'Backup DB' Icon on the 'Administration Menu' page/panel? [/quote]
See your other post I replied to about this.
 
tangoman







PostPosted: Mon Aug 22, 2005 11:24 pm Reply with quote

So what you are saying is that although half was through the importing of the country the first time I received an 'error page', the IP's did actually transfer OK!...Correct?


What is your recommendation on importing these countries..Would you advise to import them all?...I do not understand whay there is just not one button that would allow you to import all the countries in one go?...Why would someone not want to download them all?
 
tangoman







PostPosted: Wed Aug 24, 2005 6:47 am Reply with quote

Bob,

Although on the odd attempt you advise of changing the 'time out' duration does work, the 'Import Data' fuction has still be failing to work more times that not. To confirm, after waiting for the data to load/import an error message is recieved which is a white page (Not a Nuke specific error page), and the text reads 500 error.

Anyhow,because of this, I thought I would try the other (more major) code change you advise of. Wherease before, on the odd occasion I WAS able to import data sucessfully it took about 30 se3conds for my page to 'refresh' as say the import was sucessfull, the page now refreshes in circa 5 seconds and advised that the porcess was sucessfull....A major (positive) change/result you would think, but I am not sure of the intergrity of this report!!!....This is because, I do also notice that when a country is now added (successfully), the only mesage I receive is, (for example):


________________________________________________

Iceland added!

________________________________________________


I cant remember exactly, but I think previously , there was also confiirmation of all the IP's added...Can you confirm this and advise if the new code I have added changes this and if I should or should not worry etc.

Moreover, in the tracked IP list, there are still a couple of users with a yellow square and ? even though that particularl country has now been added, (according to the message received after trying to 'import data')
 
BobMarion







PostPosted: Thu Sep 01, 2005 10:21 am Reply with quote

Tangoman,

Upgrade to NukeSentinel(tm) 2.4.0b and it will cure the time out problems you are having.

Once upgraded goto the "Import to IP2Country" and import all countries. The new table indexing and a couple of code changes speed this process up tremdously Smile

Quote:
Moreover, in the tracked IP list, there are still a couple of users with a yellow square and ? even though that particularl country has now been added, (according to the message received after trying to 'import data')

Any ip that is tracked prior to it's ip2c range being added to the database will show the ? until you run the "Update Tracked IP's" from the IP to Country menu. The tracked ip's store the country staticly until you force an update.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)

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 ©