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™ v2.4.x
Author Message
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Tue Mar 14, 2006 1:08 pm Reply with quote

installed nuke sentinal on 7.7 and get a blank page when i go to account the forums account works fine and everything else seems to be working just the account wondering if anyone can help me. The line is:-

[Tue Mar 14 19:04:52 2006] [error] PHP Parse error: syntax error, unexpected T_FUNCTION in /home/deltas00/public_html/index/modules/Your_Account/index.php on line 792


what i have in that is

Code:
in function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {


and the rest of it is

Code:
function mail_password($username, $code) {

   global $nsnst_const, $sitename, $adminmail, $nukeurl, $user_prefix, $db, $module_name;
   $username = substr($username, 0, 25);
   $username = htmlspecialchars($username); //SecurityReason Fix 2005 - sp3x
   $sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'";
   $result = $db->sql_query($sql);
   if($db->sql_numrows($result) == 0) {
      include("header.php");
      OpenTable();
      echo "<center>"._SORRYNOUSERINFO."</center>";
      CloseTable();
      include("footer.php");
   } else {
  if(!defined("NUKESENTINEL_IS_LOADED")) {
    $host_name = $_SERVER['REMOTE_ADDR'];
  } else {
    $host_name = $nsnst_const['remote_ip'];
  }


in function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {

      $row = $db->sql_fetchrow($result);
      $user_email = htmlentities($row['user_email']);
      $user_password = $row[user_password];
                $user_password = htmlspecialchars(stripslashes($user_password));
      $areyou = substr($user_password, 0, 10);
      if ($areyou==$code) {
         $newpass=makepass();
         $message = ""._USERACCOUNT." '$username' "._AT." $sitename "._HASTHISEMAIL."  "._AWEBUSERFROM." $host_name "._HASREQUESTED."\n\n"._YOURNEWPASSWORD." $newpass\n\n "._YOUCANCHANGE." $nukeurl/modules.php?name=$module_name\n\n"._IFYOUDIDNOTASK."";
         $subject = ""._USERPASSWORD4." $username";
         mail($user_email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion());
         /* Next step: add the new password to the database */
         $cryptpass = md5($newpass);
         $query = "UPDATE ".$user_prefix."_users SET user_password='$cryptpass' WHERE username='$username'";
         if (!$db->sql_query($query)) {
            echo ""._UPDATEFAILED."";
         }
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Tue Mar 14, 2006 2:34 pm Reply with quote

did you edited that file for sentinel?
 
View user's profile Send private message
ANTH
PostPosted: Tue Mar 14, 2006 2:40 pm Reply with quote

yes it telt me to:-

Code:
#-----[ FIND ]------------------------------------------ 

# This appears twice in this function
  $host_name = $_SERVER['REMOTE_ADDR'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
  if(!defined("NUKESENTINEL_IS_LOADED")) {
    $host_name = $_SERVER['REMOTE_ADDR'];
  } else {
    $host_name = $nsnst_const['remote_ip'];
  }


in function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {
#
 
hitwalker
PostPosted: Tue Mar 14, 2006 2:42 pm Reply with quote

well ...it shows that you have to edit it at 2 places in the your_account.
you had to ad $nsnst_const twice..

Did you do that?
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9453
Location: Arizona

PostPosted: Tue Mar 14, 2006 6:28 pm Reply with quote

Thats right. It sounds like $nsnst_const was not added to the function call or made global within the function where the parse error is occurring.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
ANTH
PostPosted: Wed Mar 15, 2006 1:29 am Reply with quote

Thanks for your help guys but ive fixed it i put in an extra line by mistake silly me.

this shouldent have been there
in function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {

but thanks for your help still Very Happy
 
hitwalker
PostPosted: Wed Mar 15, 2006 4:22 am Reply with quote

i have no clue what your talking about,or your giving wrong info...as i understand it your taking out lines that should be there.
whatever you have with function login,it should be this.....first part..

Code:
function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {

    global $nsnst_const, $setinfo, $user_prefix, $db, $module_name, $pm_login, $prefix;
    $user_password = htmlspecialchars(stripslashes($user_password));
    include("config.php");
    $sql = "SELECT user_password, user_id, storynum, umode, uorder, thold, noscore, ublockon, theme, commentmax FROM ".$user_prefix."_users WHERE username='$username'";
    $result = $db->sql_query($sql);
    $setinfo = $db->sql_fetchrow($result);
    $forward = ereg_replace("redirect=", "", "$redirect");
    if (ereg("privmsg", $forward)) {
        $pm_login = "active";
    }
 
ANTH
PostPosted: Wed Mar 15, 2006 10:27 am Reply with quote

if you look at the first post and the rest of it code this line should not be there its in the wrong place i copied it from the readme by accident

in function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {
 
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™ v2.4.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 ©