I'm having this issue with links. This script I'm working with has an admin panel and its giving me troubles. By clicking on the first link, its logging me out of the admin panel: <div id="nav"> <div class="nav_right"></div> <ul class="navMenu"> <li>[COLOR=red]<a href="<?=$site_url?>/admin">Admin Home</a>[/COLOR]</li> <li><a href="?action=manage">Media</a></li> <li><a href="?action=manage_cats">Categories</a></li> <li><a href="?action=manage_pages">Pages</a></li> <li><a href="?action=manage_users">Users</a></li> <li><a href="?action=manage_links">Links</a></li> <li><a href="?action=comments">Comments</a></li> <li><a href="?action=settings">Settings</a></li> </ul> <div class="nav_left"></div> </div> Code (markup): What other options do I got to code this so it doesn't log me out? I have it setup differently like so but it still does the logout thing: <div id="up_header"> <div id="logo"> <div id="siteName"> [COLOR="Red"]<a href="<? echo "$site_url"?>">PH Arcade</a>[/COLOR] </div> Code (markup):
No matter what kind/style of links you are adding, they should not affect session data ! In case if it happens, probably your landing page ( link target ) uses an incomplete verification ( which resets all your current session information ).
Ensure that you are not going from a non-www domain (google) to a www (www.google) because the session data will NOT be the same.
Doesn't change anything. Its not. Which means it'll be near impossible to search through and find the problem as this script has like 100 files to it. I may have to hand this to a pro.
I can help you for a very fair price. Hit me up. I have experience at debugging and analysis of code.
I would suggest checking the pages that log you out for a database connection. If your db name, user name or password are typed wrong (or just missing), this will log you out. Or if that is working, you may not have it set up to keep you logged in. A lot of scripts just use session_start(); To keep the session alive. If this is missing, you likely only need to make a few changes for it to work.
Heck no. I got $2000 in the business so far and I'm not willing to spend a dime more! Of course I welcome you to do it for the love of helping others. Since I can't handle the pressure of making the whole new version I hired someone to do it. When they were "so called" finished absolutely worked right and I had to go through it all. This is one of the last issues I've got. That looks to be the problem. I put this sesson_start(); in the following line(its probably wrong): </head> <?php include ('../config.php'); include ('includes/admin.php'); $userid = intval($_COOKIE['ava_userid']); session_start(); ?> <body> Code (markup): Maybe its right, maybe not. I tried with the { as well but no luck. Starting from yesterday I noticed that anytime I edit and reupload this particular file it ends up locking me online for a couple of hours. It won't let me logout of the site. Could this error be evidence of where the problem is?
This is really hard to diagnose without the additional code. Do you have something that displays whether people are logged in or not? Like "You are logged in as xxx" Does that display when you enter the admin page? Or just that you do not have the proper credentials? The source of the log out almost has to be it not continuing with the registered session. So you are missing a couple lines of code somewhere on the page. Hard to tell without knowing what the config and admin includes contain.
I will help you for free, please message me. I know what is wrong now. Simply IM me. I will do it free.
session_start() shouldn't be used after sending headers (which are sent ones you send output - like HTML, so session_start() should be before any output) also, $userid = intval($_COOKIE['ava_userid']); doesn't seem much secure. cookies can be edited on the client side, it should be verified by keeping the password (hashed) in the cookie too, or using sessions for storing the user id.