Author |
Message |
ANTH
Regular


Joined: May 27, 2005
Posts: 62
|
Posted:
Tue Mar 14, 2006 1:08 pm |
|
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."";
}
|
|
|
|
|
 |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Tue Mar 14, 2006 2:34 pm |
|
did you edited that file for sentinel? |
|
|
|
 |
ANTH

|
Posted:
Tue Mar 14, 2006 2:40 pm |
|
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

|
Posted:
Tue Mar 14, 2006 2:42 pm |
|
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: 9457
Location: Arizona
|
Posted:
Tue Mar 14, 2006 6:28 pm |
|
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! |
|
|
 |
ANTH

|
Posted:
Wed Mar 15, 2006 1:29 am |
|
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  |
|
|
|
 |
hitwalker

|
Posted:
Wed Mar 15, 2006 4:22 am |
|
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

|
Posted:
Wed Mar 15, 2006 10:27 am |
|
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) { |
|
|
|
 |
|