Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account
Author Message
Snipe3D
New Member
New Member



Joined: Mar 07, 2005
Posts: 9

PostPosted: Mon Mar 07, 2005 3:59 pm Reply with quote

Running: PNP-Nuke (platinum) 7.6
Module's Name: CNB Your Account
Module's Version: 4.4.0 b2

When I try to log in, I get a
Fatal error: Call to undefined function: yacookiecheckresults() in bah/modules/Your_Account/index.php on line 229.

I do get logged in to the system, because if i reenter the URL it brings me to my profile, and logs me in just fine, but its a pest to circumvent that error page.


the function is defined in /includes/cookiecheck.php, and index.php does include it, (i even tried to hardcode the path), but it still fails to recognize that it has been defined.








also a side problem, it is impossible to log out without deleting my cookies first, it just leaves me logged in after i click on log out. Are these possibly linked? Solutions for both?

Thanks
 
View user's profile Send private message
Snipe3D







PostPosted: Mon Mar 07, 2005 4:05 pm Reply with quote

Read a post further down and by chance saw the fix for the logout bug.


Im at a loss to why they commented out the actual log out process itself....




1 bug down, 1 to go. Any ideas?
 
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Mon Mar 07, 2005 5:39 pm Reply with quote

This is the block I use. Without seeing which one you are using I can't be of much help. But maybe you can pick out something by comparing. (One of the old NSN blocks I'm sure)

Code:


if (stristr("block-User_Info.php", $_SERVER['SCRIPT_NAME'])) { Header("Location: index.php"); }
require_once("mainfile.php");
include_once("modules/Your_Account/includes/constants.php");
if (!defined('CNBYA'))   { echo "CNBYA protection"; exit; }
include_once("modules/Your_Account/includes/functions.php");

global $prefix, $db, $admin, $user, $redirect, $mode, $f, $t, $nukeurl, $cookie, $user_prefix, $anonymous, $ya_config, $articlecomm, $lang;
$ya_config = ya_get_configs();
$content = "";

/* Modify the variables below to change the arrow colors. Block is set for 2 colors only. */
$arrow1 = "images/arrow-blk.gif";     /* Section arrows (modules) */
$arrow2 = "images/arrow-sil.gif";     /* Sub-Section arrows (account options) */

// User Login

if (is_user($user)) {
    $memname = $cookie[1];
    $content .= ""._BWEL.", <b>$memname</b><br>\n";
    $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> <a href=\"modules.php?name=Your_Account&op=edituser\">Update Account</a><br>\n";
    $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> <a href=\"modules.php?name=Your_Account&op=edithome\">Update Home</a><br>\n";
       if ($articlecomm == 1) {
    $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> <a href=\"modules.php?name=Your_Account&op=editcomm\">Update Comments</a><br>\n";
    }
    $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> <a href=\"account-logout.html\">Logout</a><br>\n";   
    if(is_active("WebMail")) {
   $content .= "<img src=$arrow1 height=\"9\" width=\"14\"> <a href=\"modules.php?name=WebMail\"><b>"._WEBMAIL."</b></a><br>\n";
   }
    if(is_active("Private_Messages")) {
        list($uid) = $db->sql_fetchrow($db->sql_query("select user_id from ".$user_prefix."_users where username='$memname'"));
        $newpms = $db->sql_numrows($db->sql_query("select privmsgs_to_userid from ".$prefix."_bbprivmsgs where privmsgs_to_userid='$uid' and (privmsgs_type='1' OR privmsgs_type='5')"));
        $savpms = $db->sql_numrows($db->sql_query("select privmsgs_to_userid from ".$prefix."_bbprivmsgs where privmsgs_to_userid='$uid' and privmsgs_type='3'"));
        $oldpms = $db->sql_numrows($db->sql_query("select privmsgs_to_userid from ".$prefix."_bbprivmsgs where privmsgs_to_userid='$uid' and privmsgs_type='0'"));
        $totpms = $newpms + $oldpms + $savpms;
        $content .= "<img src=$arrow1 height=\"9\" width=\"14\"> <a href=\"messages.html\"><b>"._BPM.":</b></a><br>\n";
        $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> "._BUNREAD.": <b>$newpms</b><br>\n";
        $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> "._BREAD.": <b>$oldpms</b><br>\n";
        $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> "._BSAVED.": <b>$savpms</b><br>\n";
        $content .= "<img src=$arrow2 height=\"9\" width=\"14\"> "._BTT.": <b>$totpms</b><br>\n<br>\n";
    }
       if(is_active("Journal")) {
   $content .= "<img src=$arrow1 height=\"9\" width=\"14\"> <a href=\"journal.html\"><b>"._JOURNAL."</b></a><br>\n";
   }
} else {
    mt_srand ((double)microtime()*1000000);
    $maxran = 10 * intval($ya_config['codesize']);
    $random_num = mt_rand(0, $maxran);
    $content .= ""._BWEL.", <b>$anonymous</b><br>\n<br>\n";
    $content .= "<table border=0 cellpadding=1 cellspacing=1>\n";
    $content .= "<tr><form action=\"modules.php?name=Your_Account&op=login\" method=\"post\">\n";
    $content .= "<td>"._BNICK.":&nbsp;&nbsp;<input type=\"text\" name=\"username\" size=\"10\" maxlength=\"".$ya_config['nick_max']."\"><br>\n";
    $content .= ""._BPASS.":&nbsp;<input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"".$ya_config['pass_max']."\"><br>\n";
     if (extension_loaded("gd") AND ($ya_config['usegfxcheck'] == 2 OR $ya_config['usegfxcheck'] == 4 OR $ya_config['usegfxcheck'] == 5 OR $ya_config['usegfxcheck'] == 7)) {
        $content .=""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' height='20' width='140' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
        $content .=""._TYPESECCODE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"".$ya_config['codesize']."\" MAXLENGTH=\"".$ya_config['codesize']."\"><br>\n";
        $content .="<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
    }
    $content .="<input type=\"hidden\" name=\"redirect\" value=$redirect>\n";
    $content .="<input type=\"hidden\" name=\"mode\" value=$mode>\n";
    $content .="<input type=\"hidden\" name=\"f\" value=$f>\n";
    $content .="<input type=\"hidden\" name=\"t\" value=$t>\n";
    //$content .="<input type=\"hidden\" name=\"op\" value=\"login\">\n";
    $content .= "<input type=\"submit\" value=\""._BLOGIN."\"> (<a href=\"modules.php?name=Your_Account&amp;op=new_user\">"._BREG."</a>) (<a href=\"modules.php?name=Your_Account&amp;op=pass_lost\">"._LOST."</a>)\n";
    $content .= "</form></td>\n";
    $content .= "</tr>\n";
    $content .= "</table>\n<br>\n";
}

// Server Stats
$Today = date("D M d Y");
$Time = date("h:i:s");
$Offset = date("O");
$content .= "<img src=$arrow1 height=\"9\" width=\"14\"> <b><u>"._BSERV.":</u></b><br>\n";
$content .= "<big><b>&middot;</b></big><b>$Today</b><br>\n";
$content .= "<big><b>&middot;</b></big> "._BTM.": <b>$Time</b><br>\n";
$content .= "<big><b>&middot;</b></big> "._GMT.": <b>$Offset</b>\n";
?>

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
sixonetonoffun







PostPosted: Mon Mar 07, 2005 5:41 pm Reply with quote

I should mention the only reason I used the require_once for mainfile.php if I was finding a lot of globals not working on the right column without it and this is the top right block on my site.
 
Snipe3D







PostPosted: Mon Mar 07, 2005 5:46 pm Reply with quote

it isnt just the login block that brings up the error. its your_account/index.php itself, it occurs on any login (via the forum login, etc etc)
 
Snipe3D







PostPosted: Mon Mar 07, 2005 6:14 pm Reply with quote

I went in to the my account configuration and disabled the "cookie check (beta)" option, and the error went away.

Drawbacks of me disabling this?
 
sixonetonoffun







PostPosted: Mon Mar 07, 2005 8:20 pm Reply with quote

None really but its a nice little option to have for the users. I've tested the Platinum install a while back without any issues like that but if you have the 2.9 updates maybe the code for this didn't get updated?
Instead of:
Code:


if ($forum_admin == 1) {
    include_once("../../../modules/Your_Account/includes/mainfileend.php");
} elseif ($inside_mod == 1) {
    include_once("../../modules/Your_Account/includes/mainfileend.php");
} else {
    include_once("modules/Your_Account/includes/mainfileend.php");
}


use this...

  if (defined('FORUM_ADMIN')) {
         @include_once("../../../modules/Your_Account/includes/mainfileend.php");
     } elseif (defined('INSIDE_MOD')) {
         @include_once("../../modules/Your_Account/includes/mainfileend.php");
     } else {
         @include_once("modules/Your_Account/includes/mainfileend.php");
     }


This only applies if you have the updates applied obviously.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account

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 ©