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 exam
> * 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...
>
>
>
> * 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
* 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
* 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
C
[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
The logic is incorrect, when you reload the page $test gets
* 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 arra
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
[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
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 m
[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 (http://www.php.net
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 session_regis
[snip]
http://us3.php.net/session_register
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 tags.
> Hope that helps!
>
> Jan
>
> --- Rich Gray <[EMA
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?
Th
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 se
--- 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
Hi
I'm running v4.2.3 on RedHat v7.0 and am getting some strange behaviour with
the $_SESSION superglobal... below is a script to demonstrate the problem...
Whenever the $_SESSION array gets re-created by session_start() the reloaded
test entry is set to -1 however at no time does this value ever
18 matches
Mail list logo