| 6:04 pm on Apr 14, 2006 (gmt 0)|
are you using session_destroy() when you are testing?
| 7:54 pm on Apr 14, 2006 (gmt 0)|
You should check to make sure you are not outputting any whitespace before you call session_start() on your pages.
This could cause the symptoms you are describing.
| 5:43 am on Apr 15, 2006 (gmt 0)|
are you using subdomains?
if so, yo need to do this on the scripts in the subdomain:
| 7:29 am on Apr 15, 2006 (gmt 0)|
How about starting with your double curly brackets I noticed when it is supposed to be just one. }}
| 10:48 am on Apr 15, 2006 (gmt 0)|
Firstly let me say how grateful I am to all those who have replied here for taking the time and consideration to reply- You guys really are the unsung heroes of the webmaking world and are totally integral to the success or failure of countless ventures across the globe these days. You all know that I am sure, but if you need any help I can give drop me a line- I am very good with photoshop, avid editing, Premiere, After Effects, stuff like that.
Anyway it seems like the white space could have been the problem. I have deleted it all (being an arty type for whom none of this comes n aturally in the slightest my pages were littered with white space to help me make sense of it all!) Thus far on brief testing it is looking promising.
If any of you know and have the time to explain I would be very interested why 'nothing' (i.e. white space) can cause a promlem in the computer world?
Anyway thanks very much for you time and help BUT I may be back!
| 1:17 pm on Apr 15, 2006 (gmt 0)|
session_start () doesn't allow you to have any outputs before it runs (at least I faced so). White space is also seen as an output.
I am sure some one can give you more detailed response on this.
| 3:08 pm on Apr 15, 2006 (gmt 0)|
it is only "nothing" outside of your php tags
before <?php or after?>
that counts as output and causes headers to be sent to your browser.
A blank line is not nothing, it consists of a linefeed or carriage return, or both.
| 1:24 pm on Apr 16, 2006 (gmt 0)|
I am afraid after an initial euphoria the problem has not gone away. It is simply that random. There is now no white space anywhere on any pages.
My admin_auth.inc.php file is like this:
if ($_SESSION['auth'] ==''¦¦$_SESSION['password'] =='')
$redirect = $_SERVER['PHP_SELF'];
header ("Refresh: 2;URL=index.php?redirect=$redirect");
$notlogged= "!YOU ARE CURRENTLY NOT LOGGED IN!<br> we are redirecting you, hang on...<br>(if your browser doesnt redirect you in 10 seconds <a href=\'admin_login.php?redirect=$redirect\'>click here<a/>)";
is there anything wrong with that? I even see that the details that this code looks for is in the session array after I get tracked back sometimes! (via a print_r use for testing). It is just totally baffling. I'll set someone up a login and you can see for yourselfs if it helps?
| 1:39 pm on Apr 16, 2006 (gmt 0)|
You are including this page. What about the page including the file, doesn't it contain white space outputs?
| 1:43 pm on Apr 16, 2006 (gmt 0)|
looking at it a bit more today the problem seems to be that the pages are randomly unable to retrieve the session data from wherever it is. Sometimes I can wander around the site with no problem, sometimes I get the you are not logged in error but if I click back (having disabled the redirect line for testing) and try the exact page again sometimes it retrieves the info, sometimes not. Sometimes when I click back the session array is empty sometimes not. I am guessing this must be a server problem, is it common? and what do I have to ask the hosts to do to fix it if it is their fault?
| 1:47 pm on Apr 16, 2006 (gmt 0)|
pressing refresh on the page also retrieves the session array properly around 60% of the time...