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™
Author Message
CurtisH
Life Cycles Becoming CPU Cycles


Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Wed Mar 09, 2005 6:53 pm Reply with quote

Has anyone that was running Sentinel 2.1.3 and using HTTPAuth been able to get HTTPAuth working in Sentinel 2.2.0 ? I cannot even get the pop up (username password) request anymore, so I tried cgiauth to see if I could at least get that to work. when following the directions for cgiauth it disables the entire site for me.

HTTPAuth has worked for me in all versions of Sentinel until 2.2.0, not sure why

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
BobMarion
Former Admin in Good Standing


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

PostPosted: Wed Mar 09, 2005 9:34 pm Reply with quote

Contact me via email at webmaster(at)nukescripts(dot)net and we'll take a look see why it's not working.

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
Savent
Regular
Regular


Joined: Jun 30, 2003
Posts: 81

PostPosted: Wed Mar 09, 2005 11:58 pm Reply with quote

I also have the same exact problem, my HTTPAuth admin pop up worked fine with 2.1.3. It wont show up in 2.2.O. Please let me know if you all found a fix, thanks.

_________________
Only registered users can see links on this board! Get registered or login! [Online Arcade 340+ Games]
Image 
View user's profile Send private message Send e-mail Visit poster's website
CurtisH
PostPosted: Thu Mar 10, 2005 8:49 pm Reply with quote

Bob should review this to determine that it is ok but I found the following restores HTTPAuth functionality for my setup:

Open /includes/nukesentinel.php

FIND:

Code:
/*********************************************************************************************/

/* HTTP Auth code for admin.php protection.  Tried to make it a function call                */
/* but there are too many variables that would have to be globalized.                        */
/* This assumes that myprivatefile.php and basicauthfile.php are in the nuke root directory. */
/* Copyright 2004(c) Raven                                                                   */
/*********************************************************************************************/
if(ini_get("register_globals")) {
  $sapi_name = strtolower(php_sapi_name());
  $apass = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnst_admins WHERE password_md5=''"));
  if($apass > 0 AND $ab_config['http_auth'] == 1) {
    @require_once("admin/modules/nukesentinel/functions.php");
    absave_config("http_auth",'0');
  }
  if($ab_config['http_auth'] == 1 AND strpos($sapi_name,"cgi")===FALSE) {
    if (basename($_SERVER['PHP_SELF'], '.php')==$admin_file) {
      $allowPassageToAdmin = FALSE;
      $authresult = $db->sql_query("SELECT login, password_md5 FROM ".$prefix."_nsnst_admins");
      while ($getauth = $db->sql_fetchrow($authresult)) {
        if ($PHP_AUTH_USER==$getauth['login'] AND md5($PHP_AUTH_PW)==trim($getauth['password_md5'])) {
          $allowPassageToAdmin = TRUE;
          break;
        }
      }
      if (!$allowPassageToAdmin) {
        header("WWW-Authenticate: Basic realm=Protected");
        header("HTTP/1.0 401 Unauthorized");
        die(_AB_GETOUT);
      }
    }
  }
}


REPLACE WITH:

Code:
/*********************************************************************************************/

// HTTP Auth code for admin.php protection.  Tried to make it a function call
// but there are too many variables that would have to be globalized.
// This assumes that myprivatefile.php and basicauthfile.php are in the nuke root directory.
// Copyright 2004(c) Raven
/*********************************************************************************************/
$sapi_name = strtolower(php_sapi_name());
$apass = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnst_admins WHERE password_md5='' OR password=''"));
if($apass > 0 AND $ab_config['http_auth'] > 0) {
  require_once("admin/modules/sentinel/functions.php");
  absave_config("http_auth",'0');
}
if($ab_config['http_auth'] == 1 AND strpos($sapi_name,"cgi")===FALSE) {
  if (basename($_SERVER['SCRIPT_NAME'], '.php')=='admin') {
    $allowPassageToAdmin = FALSE;
    $authresult = $db->sql_query("SELECT login, password_md5 FROM ".$prefix."_nsnst_admins");
    while ($getauth = $db->sql_fetchrow($authresult)) {
      if ($PHP_AUTH_USER==$getauth['login'] AND md5($PHP_AUTH_PW)==trim($getauth['password_md5'])) {
        $allowPassageToAdmin = TRUE;
        break;
      }
    }
    if (!$allowPassageToAdmin) {
      header("WWW-Authenticate: Basic realm=Protected");
      header("HTTP/1.0 401 Unauthorized");
      die(_AB_GETOUT);
    }
  }
}
 
BobMarion
PostPosted: Thu Mar 10, 2005 10:12 pm Reply with quote

Curtis, that is exactly what I sent to you via email. The next day I got a second copy of your original email to me Sad Guess somewhere on hte net something went haywire Sad
 
CurtisH
PostPosted: Thu Mar 10, 2005 10:21 pm Reply with quote

Maybe so... For some reason my primary mail domain loses mail from this site and portedmods, maybe that is the case with yours as well. Sad

Anyway, problem resolved and Curt is happy happy! Smile

Thanks Bob for the fantastic software, I love it!
 
Savent
PostPosted: Fri Mar 11, 2005 12:12 am Reply with quote

Thanks guys it worked Smile
 
BobMarion
PostPosted: Fri Mar 11, 2005 10:59 pm Reply with quote

Curt, we're all on the same server if I'm not mistaken so it must be the reason.
 
CurtisH
PostPosted: Sat Mar 12, 2005 3:11 pm Reply with quote

Raven... Is my domain being blocked? I am not a spammer or anything like it. Could you please verify that mail to and from curtishancock.com is not blocked? And if it is could you possibly tell me why? Sad
 
CurtisH
PostPosted: Sat May 14, 2005 12:29 pm Reply with quote

d***, upgraded to 2.2.1 and followed the directions to the letter and HTTPAuth has stopped working yet again. I tried the above fix and THAT doesn't work either. Any suggestions?
 
CurtisH
PostPosted: Fri May 20, 2005 11:33 am Reply with quote

*polite bump*
 
BobMarion
PostPosted: Wed May 25, 2005 12:20 am Reply with quote

Email me. I've been so busy I haven't had much time to read forums Sad
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Wed May 25, 2005 6:36 am Reply with quote

CurtisHancock wrote:
Raven... Is my domain being blocked? I am not a spammer or anything like it. Could you please verify that mail to and from curtishancock.com is not blocked? And if it is could you possibly tell me why? Sad
Did your email issue resolve itself?
 
View user's profile Send private message
CurtisH
PostPosted: Wed May 25, 2005 8:04 am Reply with quote

Yes sir, it seems to have.

And Bob I will contact you via email this evening regarding my problem. I am sure if I upgraded my site to a newer version of nuke the problem would most likely resolve itself, but to be honest there is nothing in the newer versions that I want or need.
 
BobMarion
PostPosted: Fri May 27, 2005 1:07 am Reply with quote

How's the 2.2.1 file I sent you working? Want to make sure it solved your issues Smile
 
CurtisH
PostPosted: Fri May 27, 2005 6:00 am Reply with quote

I guess you didn't get my email. Sad It seems to be working perfectly! Thank you so much for helping resolve this issue. Smile
 
BobMarion
PostPosted: Sat May 28, 2005 12:19 am Reply with quote

Nope, but then again I had to take my pc down for a day to restore a ghost image. My wife downloaded something she should not have downloaded Smack
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™

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 ©