RE: [PHP] Session data getting lost

2003-09-18 Thread Rich Gray
* Thus wrote Rich Gray ([EMAIL PROTECTED]): Well a functon that doesn't work under certain conditions should be deprecated IMO ... I haven't used it for a long time now... this makes absolutly no sense. So if I use a function improperly, it should become deprecated? Er ...I'm not using

RE: [PHP] Session data getting lost

2003-09-18 Thread Rich Gray
* Thus wrote Rich Gray ([EMAIL PROTECTED]): So your telling me that all variables defined in the global scope are automatically added to the $_SESSION array...? Not true I think no. read the documentation, in full. you're right - I'm sorry I hadn't read it in full... The

Re: [PHP] Session data getting lost

2003-09-18 Thread - Edwin -
Hi, Rich Gray [EMAIL PROTECTED] wrote: Well a functon that doesn't work under certain conditions should be deprecated IMO Interesting comment... However, there are TONS of functions that wouldn't work unless the module/extension were enabled during compilation/runtime. A couple of examples:

RE: [PHP] Session data getting lost

2003-09-17 Thread Ruessel, Jan
] Session data getting lost --- Rich Gray [EMAIL PROTECTED] wrote: I'm running v4.2.3 on RedHat v7.0 and am getting some strange behaviour with the $_SESSION superglobal... ... It works fine on Win2K albeit v4.3.0 of PHP. Maybe you have register_globals enabled on your Linux server and not on your

RE: [PHP] Session data getting lost

2003-09-17 Thread Rich Gray
Chris Thanks for your answer which I'm sorry to say makes no sense to me given the code example I supplied ... can you explain to me why you think register globals being set to on for the Linux server will cause the $_SESSION superglobal array to lose data? Am I missing something obvious here?

RE: [PHP] Session data getting lost

2003-09-17 Thread Rich Gray
Jan Sorry - no that doesn't help - as you can see from the code snippet I posted the session_start() is at the very top of the code... Thx anyway. Rich You have to put session_start(); at the VERY TOP of your code. even before alle the html tags. Hope that helps! Jan --- Rich Gray [EMAIL

RE: [PHP] Session data getting lost

2003-09-17 Thread Jay Blanchard
[snip] ?php session_start(); $test = -1; . [/snip] I think you need to register test http://us3.php.net/session_register HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Session data getting lost

2003-09-17 Thread Rich Gray
Jay Thanks, but no I don't think so ... session_register() is deprecated ... Quote PHP manual: Caution: If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses

RE: [PHP] Session data getting lost

2003-09-17 Thread Jay Blanchard
[snip] Thanks, but no I don't think so ... session_register() is deprecated ... [/snip] Not depricated, just doesn't work when register_globals is off in the .ini Have you done a print_r($_SESSION) to see if in fact the $test variable is contained? -- PHP General Mailing List

RE: [PHP] Session data getting lost

2003-09-17 Thread Rich Gray
Well a functon that doesn't work under certain conditions should be deprecated IMO ... I haven't used it for a long time now... To answer your question ... yep I've used print_r() and after the 1st form submission the entry is set to -1 however at no time do I ever set $_SESSION['test'] to -1 in

RE: [PHP] Session data getting lost

2003-09-17 Thread Jay Blanchard
[snip] Well a functon that doesn't work under certain conditions should be deprecated IMO ... I haven't used it for a long time now... To answer your question ... yep I've used print_r() and after the 1st form submission the entry is set to -1 however at no time do I ever set $_SESSION['test'] to

RE: [PHP] Session data getting lost

2003-09-17 Thread Rich Gray
So your telling me that all variables defined in the global scope are automatically added to the $_SESSION array...? Not true I think [snip] Well a functon that doesn't work under certain conditions should be deprecated IMO ... I haven't used it for a long time now... To answer your

Re: [PHP] Session data getting lost

2003-09-17 Thread Curt Zirzow
* Thus wrote Rich Gray ([EMAIL PROTECTED]): Chris Thanks for your answer which I'm sorry to say makes no sense to me given the code example I supplied ... can you explain to me why you think register globals being set to on for the Linux server will cause the $_SESSION superglobal array to

RE: [PHP] Session data getting lost

2003-09-17 Thread Jay Blanchard
[snip] So your telling me that all variables defined in the global scope are automatically added to the $_SESSION array...? Not true I think [/snip] You're right of course. I went back to your original code and stripped it back some ?php session_start(); $test = -1; echo

Re: [PHP] Session data getting lost

2003-09-17 Thread Curt Zirzow
* Thus wrote Rich Gray ([EMAIL PROTECTED]): So your telling me that all variables defined in the global scope are automatically added to the $_SESSION array...? Not true I think no. read the documentation, in full. The soluction to your problem was resolved from the first reply (by

Re: [PHP] Session data getting lost

2003-09-17 Thread Curt Zirzow
* Thus wrote Rich Gray ([EMAIL PROTECTED]): Well a functon that doesn't work under certain conditions should be deprecated IMO ... I haven't used it for a long time now... this makes absolutly no sense. So if I use a function improperly, it should become deprecated? session_register() is used

Re: [PHP] Session data getting lost

2003-09-16 Thread Chris Shiflett
--- Rich Gray [EMAIL PROTECTED] wrote: I'm running v4.2.3 on RedHat v7.0 and am getting some strange behaviour with the $_SESSION superglobal... ... It works fine on Win2K albeit v4.3.0 of PHP. Maybe you have register_globals enabled on your Linux server and not on your Windows PC? Compare