Forum Moderators: coopster
When I tested it here, with an IIS they work without problems and they also were working in the hosting server few days ago.
The last modification I made to the pages was yesterday. I added a java script to validate forms. Didn't chek if the pages were working fine before that. So I don't know if the problem is because of the java script modification or if there's something wrong with the provider's hosting server.
I guess the java script should not interfere with the PHP variables... The fact that the pages are working without problems in my server makes me beleive this.
I have no idea of what to do. Tryed initializing the session manually adding "session_start();" to the pages, but didn't work.
PLEASE HELP ME!
That needs to be the first line of PHP code for each page that requires access to the session vars.
Have you tried printing one of the session vars to screen just to see if it's actually there? Somewhere around here I think jatar_k had a nice code block that would allow you to print out all of the session variables. I'll see if I can find it.
I didn't answer your concern just took it a little OT.
First thing to do is approach this calmly and systematically. Only try one thing at a time to isolate the problem. Some thoughts on a way to approach this.
I doubt it is the javascipt, but never leave any stone unturned. I just wouldn't start with this.
The first thing that comes to mind is "Tryed initializing the session manually adding "session_start();" to the pages"
Was it not on the pages before? That could cause a problem. Did you ptu it right at the top of your code?
First thing, try that snippet of code I popped in above. Try it with your pages as is and record the results then add the session_start() to one page (preferably the one from the prevuious page) and try it again and see if the results change.
Then come back and explain to us what happened (error messages, whether the session was there, whether session data was there, etc) and we can go from there.
I already talk with the provider, says everything is ok with the server (damn) and leave a php test page for me to see that session variables are working (and they are).
I didn't have the session_start() before, thought that they configured PHP to do it automatically (as I did here). Not sure if I put it at the first line...
Well.. thanks again. I'll be back soon.