Jump to content
MakeWebGames

Sessions And Login Redirection


kiz5000

Recommended Posts

Hi ive just had a problem pop out of no where and was just wondering if anyone on here knows the problem or has experienced it before.

I was just browsing my game when suddenly a blank white page appeared and it looked as if the site had gone down. I went to down for everyone or just me.com and it says my website was running fine.

So then i entered my url but it still just loads the blank white page every time. I then decided to try enter /login.php which then loaded my site fine.

So after abit of looking around it noticed that the code is in the globlals.php which detects if the session user is logged in or not, if they are it will show there details on the index.php if not then it will send them to the login.php

This seems to sort have stopped working, the confusing thing is that some computers will load the website fine by just entering the domain and some wont load unless i enter domain/login.php

For example my laptop loads it as a blank white page and so does my mobile phone. My back up computer seems to load it fine but then my computer down stairs which has never been on the website before so wont have any session with it will not load either.

So basically its doing its job with some computers and sending them to the login.php so they can login, but then with other computers it will just load a blank white page.

I have contacted host and they say the server and sessions are working fine. Ive ran out of ideas now and my current fix is that i have uploaded a index.html which directs them straight to login.php whether they were logged in or not. Any body else seen this before?

Edited by kiz5000
Link to comment
Share on other sites

I remember you were using ravan mafia script so that could be the reason

Thanks for the reply. How do you think this could be the problem? Are the scripts sessions connected the Ravans server in anyway? It is pretty odd how its done it out of no where :confused:

Link to comment
Share on other sites

Yes, here is the code. Also what puzzles me is the fact that i cant find the "loggedin" variable anywhere in the database or in any other scripts. Its only ever used in this one bit of code but seems to have been working fine for the past 3 months

if($_SESSION['loggedin']==0){ header("Location: login.php");exit; }

$userid=$_SESSION['userid'];

Edited by kiz5000
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...