Author |
Message |
mega-G
New Member


Joined: Nov 03, 2003
Posts: 4
|
Posted:
Mon Nov 03, 2003 8:15 am |
|
I know theres no problem in the site info block code as it clearly works
But for some reason the security code doesnt show up when your not logged in.... and heres the kicker.. but it shows up on the admin login page, and then when signed in as admin, the code shows on the site info block as well.
However if i log out of admin.... the security code on the block disappears again.
http://www.tobeconfirmed.net is my site addy.
also, if i right click > properties on the broken security code to find out what code should be displayed, and then type that in to log in, i get diverted to 'You are trying to access a restricted area.We are Sorry, but this section of our site is for Registered Users Only'. I.... knowing the very minimum needed to know about php to run a nuke site, cannot understand what is going on
any help will be greatly appreciated
megaG |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Nov 03, 2003 8:34 am |
|
The admin login uses a different script than the user does. User login is handles through modules/Your_Account/index.php. Have you modified that script at all? If so, try replacing it with the original scripts. If you have not modified it, check all files that get included in the main() routine which I believe are header.php and footer.php and any files that they may call. Check for a blank line at the top or the bottom of all those scripts. |
|
|
|
 |
mega-G

|
Posted:
Mon Nov 03, 2003 9:40 am |
|
Im pretty sure that i hadnt modified the your_account/index.php file, but to be certain i uploaded the standard 6.5 file for it, but still getting problems with the security code.
Er about having blank lines in the code.... im not sure
Quote: | <?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("header.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
require_once("mainfile.php");
##################################################
# Include some common header for HTML generation #
##################################################
$header = 1;
function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>$sitename $pagetitle</title>\n";
include("includes/meta.php");
include("includes/javascript.php");
if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
include("includes/my_header.php");
echo "\n\n\n</head>\n\n";
themeheader();
}
online();
head();
include("includes/counter.php");
global $home;
if ($home == 1) {
message_box();
blocks(Center);
}
?> |
Is what dreamweaver spouts at me Thats the header.php file. |
|
|
|
 |
Raven

|
Posted:
Mon Nov 03, 2003 9:44 am |
|
As I said, you need to check all files that get 'included' and look for blank lines before the opening <? or after the closing ?>. |
|
|
|
 |
mega-G

|
Posted:
Mon Nov 03, 2003 9:56 am |
|
ok ive checked all the related files, one file had a buggy space, but i deleted it and uploaded the fixed file.
Still having the same problem though :-/ |
|
|
|
 |
mega-G

|
Posted:
Mon Nov 03, 2003 10:55 am |
|
PROBLEM FIXED
Quote: | FIXED!: I had the Your Account setting to Registered Members only.. makes sense right? You don't need to see that if you are a visitor.. but I guess the login and registration modules kinda parse their data throught that php file... Your_Account.php. Set that module to Visitors and all is well.
|
i found that on nukecops after hours of sifting through many many posts about buggy security keys etc, and realised i had done that myself just the other day.
While trying to cut down on the number of links in my main block, i put your account module set to hidden and viewable only by registered members. LOL how random is that :s
ty for ur help tho raven, you were much quicker to reply than most
megaG |
|
|
|
 |
Raven

|
Posted:
Mon Nov 03, 2003 3:26 pm |
|
Yep - that will do it too  |
|
|
|
 |
|