Re: [PHP] RESOLVED, sort of -- Re: [PHP] where is my session data on my new server?
Curt, et al -- ...and then Curt Zirzow said... % % * Thus wrote David T-G ([EMAIL PROTECTED]): % Hi, all -- % % It appears that the change from 4.2.3 to 4.3.4rc1 was not something that % got broken but instead something that got fixed. Oh, yay. But what do I % do now? Hmmm... % % I'm catching up in emails a little late but using $_SESSION[] % access would resovle this issue. Gotcha. Thanks! % ... % session_name('name') ; % session_start ; % % hmm... doesn't session_start requrire the ()? ie : % % session_start(); It seems that it does. Oddly enough, everything always worked just fine. Perhaps it was because the next line was a session_register which implied a session_start() for me :-) % % Curt Thanks HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] RESOLVED, sort of -- Re: [PHP] where is my session data on my new server?
* Thus wrote David T-G ([EMAIL PROTECTED]): Hi, all -- It appears that the change from 4.2.3 to 4.3.4rc1 was not something that got broken but instead something that got fixed. Oh, yay. But what do I do now? Hmmm... I'm catching up in emails a little late but using $_SESSION[] access would resovle this issue. The code ?php session_name('name') ; session_start ; hmm... doesn't session_start requrire the ()? ie : session_start(); Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RESOLVED, sort of -- Re: [PHP] where is my session data on my new server?
Hi, all -- It appears that the change from 4.2.3 to 4.3.4rc1 was not something that got broken but instead something that got fixed. Oh, yay. But what do I do now? Hmmm... The code ?php session_name('name') ; session_start ; session_register('pw') ; $pwc = realpass ; if ( $pw != $pwc ) { if ( $pw != ) { print Invalid password!br\n ; session_unregister('pw') ; } print form method='post'\n ; print Password:brinput teyp='password' name='pw'br\n ; print input type='submit' value='ENTER'\n/form\n ; session_write_close() ; exit ; } // protected page body here ? used to work but now does not, apparently because now one cannot register a session variable unless a regular var of the same name has already been defined. That is, ?php if ( $_GET['stop'] ) { session_start() ; print pw is .$pw.\n ; exit ; } $pw = pass ; session_register('pw') ; header(Location: ?stop=1) ; ? *does* work. Of course, I have to turn my code inside out or worse to do this (I don't really know where I'm going to go, either; that code is a direct copy of an example shown to me, so I don't yet see how to turn my code inside out to match it). I still don't know what the bug was or how it was fixed or if I can return to the old behavior (which certainly would put me back in business quickly and let me fix all of my code on a reasonable schedule), but at least I think I have it pinned down to 1) not a mis-setting in php.ini and 2) probably not something I can fix quickly. If, based on this, anyone has any more info or pointers, I sure would love them :-) Thanks HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
RE: [PHP] where is my session data on my new server?
On 14 October 2003 14:45, David T-G wrote: Mike, et al -- ...and then Ford, Mike [LSS] said... % % On 14 October 2003 11:26, David T-G wrote: % % I ran a phpinfo() comparison and didn't see anything markedly % different (except for how the output is formatted, which made things % delightfully more challenging), but I also don't know for what I'm % looking. I also don't know what other information I should provide, % but I'm % hesitant to % bomb the list with two phpinfo() outputs :-) [Dude, what did you do to my paragraph formatting?!?] Not me, boss -- it's this crappy M$ Outlook thingie they force me to use at work... ;-Z % Well, rather than post two complete phpinfos, can you hone it down to just those entries which *are* different. I'd OLD: session.use_trans_sid 1 1 NEW: session.use_trans_sid Off Off Oh-ho!! I'd seriously suspect this might have something to do with it. Set this back to On on the new server and see what transpires. % It might also help to post a (short!) fragment of the relevant code. [...] session_save ; # save for later Actually this looks a bit suspicious too -- I'm not 100% sure that session_save is actually going to be called without parentheses () after it; that would certainly be the case in most of the languages I'm used to, but I could be wrong for PHP. You should also probably include a session_write_close() to make sure you completely close out the session. - includestuff.inc: session_start ; # kick things off And I'd have the same doubts about this. Even stylistically I would prefer to see (), just as a visual confirmation that this is intended as a function call. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where is my session data on my new server?
Mike -- ...and then Ford, Mike [LSS] said... % % On 14 October 2003 14:45, David T-G wrote: % % ...and then Ford, Mike [LSS] said... % % % % On 14 October 2003 11:26, David T-G wrote: % % % % I ran a phpinfo() comparison and didn't see anything markedly ... % should provide, % % but I'm % % hesitant to % % bomb the list with two phpinfo() outputs :-) % % [Dude, what did you do to my paragraph formatting?!?] % % Not me, boss -- it's this crappy M$ Outlook thingie they force me to use at work... ;-Z Bleah -- sucks to work there, man! But thanks for the help. % % % Well, rather than post two complete phpinfos, can you hone % it down to just those entries which *are* different. I'd % % OLD: % session.use_trans_sid % % 1 1 % NEW: % % session.use_trans_sid Off Off % % Oh-ho!! I'd seriously suspect this might have something to do with it. Set this back to On on the new server and see what transpires. Funny you should mention that... I took a look at this today and it had magically been turned back on! Didn't matter, though -- and httpd was restarted at least some hours after the ini file was modified, so it should have picked up the change (and I checked phpinfo via httpd and it shows on). This is what lets me have sessions even without cookies, right? Yes, this is a Good Thing(tm). % % % It might also help to post a (short!) fragment of the relevant code. % % [...] % %session_save ;# save for later % % Actually this looks a bit suspicious too -- I'm not 100% sure that session_save is actually going to be called without parentheses () after it; that would certainly be the case in most of the languages I'm used to, but I could be wrong for PHP. You should also probably include a session_write_close() to make sure you completely close out the session. I fixed this and session_start but to no avail. The demo code that our ISP (who built and manages the system) used to prove that sessions were working is ?php session_start() ; $_SESSION[count]++ ; print $_SESSION[count] ; ? and, sure enough, the count goes up as you reload the page. Yay -- sort of. So I stepped back and made *myself* a small page. It's session_name('goof') ; session_start ; session_register('g') ; $passwordcom = G ; print _POST ISbrpre. ; print_r($_POST) ; print ./prebr\n; ### print _SESSION ISbrpre. ; print_r($_SESSION) ; print ./prebr\n; ### print _SESSION[g] IS .$_SESSION[g].br\n; ### print g IS .$g. AND passwordcom IS .$passwordcom.br\n;### if ( $_SESSION[g] != $passwordcom ) # no password (yet)? { if ( $_SESSION[g] != ) # is this a second try? { print Invalid Password. Authorized access only.brnbspbr\n ; # session_unregister('g') ; } echo form method='post'; print Password:br input type='password' name='g'; print brbrbrcenterinput type='submit' value=' ENTER '\n ; print /form\n; session_write_close() ; exit ; # nothing else to do } to mirror fairly closely the real page (in fact it's mostly taken from the real page). Something I realized as I was working on this is that we only ever refer to the passed variable as $g (actually $pw). That smacks awfully of a globals setting; $pw is set from $_SESSION[pw] when present. But all of my global settings look the same. The two results of this code are at http://www.locations.org/sessions/testme.php http://test.locations.org/sessions/testme.php and are slightly different. I'm still not sure what to make of it all and I definitely don't know where to go next :-( TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] where is my session data on my new server?
Hi again, all -- ...and then David T-G said... % ... % % On the first server when you enter the password and hit the button the % page comes back up with $pw set and in you go. On the second server $pw % is always empty and we are endlessly prompted. ... % % Do you have any pointers to what I hope is a very simple fix? It got surprisingly quiet. Are there no more clues out there? Even a where-to-look? Has this never happenned to anyone else? TIA again HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
RE: [PHP] where is my session data on my new server?
On 14 October 2003 11:26, David T-G wrote: On the first server when you enter the password and hit the button the page comes back up with $pw set and in you go. On the second server $pw is always empty and we are endlessly prompted. I ran a phpinfo() comparison and didn't see anything markedly different (except for how the output is formatted, which made things delightfully more challenging), but I also don't know for what I'm looking. I also don't know what other information I should provide, but I'm hesitant to bomb the list with two phpinfo() outputs :-) Well, rather than post two complete phpinfos, can you hone it down to just those entries which *are* different. I'd particularly be looking at all the session.* entries (obviously!), as well as register_globals, and possibly variables_order. It might also help to post a (short!) fragment of the relevant code. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where is my session data on my new server?
You can bypass any configuration using: session_save_path ('path/to/session_folder'); -- zerof - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where is my session data on my new server?
Mike, et al -- ...and then Ford, Mike [LSS] said... % % On 14 October 2003 11:26, David T-G wrote: % % I ran a phpinfo() comparison and didn't see anything markedly % different (except for how the output is formatted, which made things % delightfully more challenging), but I also don't know for what I'm % looking. I also don't know what other information I should provide, % but I'm % hesitant to % bomb the list with two phpinfo() outputs :-) [Dude, what did you do to my paragraph formatting?!?] % % Well, rather than post two complete phpinfos, can you hone it down to just those entries which *are* different. I'd particularly be looking at all the session.* entries (obviously!), as well as register_globals, and possibly variables_order. With a lot of work... diff(1) can't handle completely jumbled inputs :-/ Here, I'll just paste some sections. OLD: Configuration PHP Core Directive Local Value Master Value register_globals On On variables_order EGPCS EGPCS session Session Support enabled DirectiveLocal Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies OnOn session.use_trans_sid 1 1 NEW: Configuration
Re: [PHP] where is my session data on my new server?
zerof -- ...and then zerof said... % % You can bypass any configuration using: % session_save_path ('path/to/session_folder'); Well, it's the same on both servers, and /tmp is writable (there are session files in there, even), so that doesn't seem to be it. Thanks, though. % -- % zerof % - HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature