2
Contributors
10
Replies
41
Views
1 Year
Discussion Span
Last Post by berserk
0

Define "fully loading."

Are we talking about a page built dynamically with AJAX? All server side? Are you doing redirects inside your script when you change to the new page? Just a refresh? Is it with all pages or just specific pages? If specific pages, are you doing something to the session on those pages? Are you sure session_start() is the very first line of every php page?

Your question has so... so many variables. Either give some example code to look at, give an example page to see if we can replicate, or be a bit more specific please.

Side note: nothing wrong with your setup. Who cares that you're using MySQL with a Windows server? ;-) As long as it works, and works for you, the setup is irrelevant.

Edited by ryantroop

0

i will try to give an answer to every variable, im a bit tired lol so try to bare with me if something sounds weird

The pages are all built server side
i am doing href redirects through an html navigation bar i built
its not on a refresh that doesnt seem to hurt anything for some reason
it si all the pages, no matter where im coming from
and yes i use a sec_session_start function at the top of every page literally EVERY page

and the reason i said that about the platform is because i went to a convention not to long ago and got some serious dirty looks and commetns for using what is essentially open source on a microsoft platform.

finally, thank you for the quick response! :D

0

are the href's absolute path or relative path urls? If absolute, are they consistent? (http/s, www or no www? Same domain or sub domain?).

You will always have purists and evangelists for one thing or another. Let them howl and cry foul. If you stuff works, it works. Don't let fanboys dictate your life choices unless you want to be a fanboy yourself (which is also ok).

Edited by ryantroop

0

the hrefs are relative paths

I try my best to be neutral about those subjects because no matter which side you pick you will always end up pissing someone off in the end. I prefer linux though but mainly because its free and the community (like daniwebs) is great ^ u ^

0

Ok.. so how are the pages "not fully loaded" when you navigate? I assume the hrefs are just attached to anchor tags?

0

they are, and please excuse my lack of detail but ill describe this the best i can.

when clicking the href link and going to another page, while the new page is loading before it begins loading the new page i have time to click another link which will cause it to pause for a second and then it will kick me out, or at least i know my sessions are being destroyed which is causing the kick

0

I have a very old and very slow server :/ i always thought that was normal since im running on such old hardware and slow disks

1

Well, it very well can be old hardware... but.. anyway...

Things that destroy sessions:

-302 server side (a redirect from code).
-Non relative links.
-session_destroy()
-overriding the $_SESSION superglobal (say, assigning it as a variable, and not just a member of the super global. ex: $_SESSION = NULL instead of $_SESSION["User"] = NULL).
-Pretty much anything that sets a header before session_start() is called (which means, in that fancy dancy session function you have, it may be doing some work that happens twice before session_start() actually get called or completed.)

Lastly.. it is entirely possible that your hardware is so strangely slow that by clicking a link before the script has finished executing the next page that a redirect header is output (you will have to check your network activity), and thus destroying your current session by putting a new on that is set after the header is output.

If it's none of that, it might require a peek at your code to see what's up :-/ Or a server configuration...

0

i think those first few items might be what im looking for, i never really thought to look back through the function i created but now i feel like i need to revisit it. Ill keep you posted on any updates, again thank you so much for your assistance! :D

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.