somedude Posted August 11, 2009 Share Posted August 11, 2009 Hi everyone, thanks for taking the time to read this.Anyway, I have been working on a side project for the past year. At two different points in the program a meta refresh reopens the current windowand re-sizes the window. It all works with no problem on hostmonster, but I triedto give the program to a friend of mine that has their site hosted at 1and1.comand right at the moment of the meta refresh it seems like all Session's are lost.Since it works perfect on Hostmonster, I think maybe it is a setting on 1and1.com?But what setting? I was searching around google and I found a post saying that sessions are always lost during meta refresh.But then why is there no problem at hostmonster?If anyone has any idea please post it. This is driving me crazy Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2009 Share Posted August 11, 2009 Whoever said sessions are always lost during meta refresh doesn't know what they're talking about. Meta refreshes are actually the way to refresh while explicitly keeping the session. A header refresh will lose the session before a meta refresh will. This site, and many others, use a meta refresh "thank you" page after logging in. Are you refreshing to a different domain or subdomain? Sessions won't carry across domains. Link to comment Share on other sites More sharing options...
somedude Posted August 11, 2009 Author Share Posted August 11, 2009 Whoever said sessions are always lost during meta refresh doesn't know what they're talking about. Meta refreshes are actually the way to refresh while explicitly keeping the session. A header refresh will lose the session before a meta refresh will. This site, and many others, use a meta refresh "thank you" page after logging in. Are you refreshing to a different domain or subdomain? Sessions won't carry across domains.I was thinking the same thing.. I actually got the idea from the meta refresh on this site very site a while ago.The refresh re opens the same file, and if the session is set one thing happens, if not it asks you for a nameand to press connect.on 1and1.com, after the refresh it still loads the view that shows up when the session isn't set. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2009 Share Posted August 11, 2009 When you log in and a session gets created, examine the session cookie in your browser and see what the parameters are. Link to comment Share on other sites More sharing options...
somedude Posted August 11, 2009 Author Share Posted August 11, 2009 When you log in and a session gets created, examine the session cookie in your browser and see what the parameters are.ok, I will post the results after I can do that later today. I don't have access to the server at the moment.thank you very much for the fast reply. Link to comment Share on other sites More sharing options...
somedude Posted August 12, 2009 Author Share Posted August 12, 2009 I got a chance to mess around with the code today and I got it working.It turned out to be nothing to do with sessions at all.. uniqid() was not working..$a = uniqid();echo $a;outputs nothing.anyway.. I just made my unique key a different way and it works fine..But I am just wondering if that is because of a server setting? If so, which one? Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted August 12, 2009 Share Posted August 12, 2009 uniqid() is not a predefined function so unless you have defined the function somewhere it will output a warning.EDIT:Never mind, please ignore this Link to comment Share on other sites More sharing options...
somedude Posted August 12, 2009 Author Share Posted August 12, 2009 uniqid() is not a predefined function so unless you have defined the function somewhere it will output a warning.it works fine on my server though, I never had to define it before.. Anyway, I'm not doubting you.. just saying it's weird how it works on my server. Link to comment Share on other sites More sharing options...
Ingolme Posted August 12, 2009 Share Posted August 12, 2009 It is actualy a native PHP function:http://php.net/uniqid Link to comment Share on other sites More sharing options...
justsomeguy Posted August 12, 2009 Share Posted August 12, 2009 You might need to set the second parameter for uniqid to true, check the notes on the manual page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.