RE: [PHP] RE: [SPAM 6.0] [PHP] Session help!?
I did not specify all versions; older versions worked fine, but I.E. that shipped with WINXP, before any service packs had these issues. J -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 9:04 PM To: Programmer Cc: 'Richard Baldwin'; php-general@lists.php.net Subject: Re: [PHP] RE: [SPAM 6.0] [PHP] Session help!? On Thu, July 21, 2005 2:21 pm, Programmer said: > The biggest gotcha that I have ran into concerning sessions is this: > > If your client's browser is I.E. and the domain is named with > _(underscores), -(dashes), etc. I.E. discards the session and starts a > new one. I don't know if this is fixed under SP2. This cannot be true for many versions of IE... I would have noticed. :-) Though IE *is* giving me fits on this page: http://uncommonground.com/artist/ They "login" okay, but can't get to following pages. These are users for whom the question: "what browser version do you have?" yields answers like "Windows 2000"... Is it that goofy mini privacy policy crap? Like the bad guys won't just LIE. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [SPAM 6.0] [PHP] Session help!?
On Thu, July 21, 2005 2:21 pm, Programmer said: > The biggest gotcha that I have ran into concerning sessions is this: > > If your client's browser is I.E. and the domain is named with > _(underscores), -(dashes), etc. I.E. discards the session and starts a > new one. I don't know if this is fixed under SP2. This cannot be true for many versions of IE... I would have noticed. :-) Though IE *is* giving me fits on this page: http://uncommonground.com/artist/ They "login" okay, but can't get to following pages. These are users for whom the question: "what browser version do you have?" yields answers like "Windows 2000"... Is it that goofy mini privacy policy crap? Like the bad guys won't just LIE. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [SPAM 6.0] [PHP] Session help!?
The biggest gotcha that I have ran into concerning sessions is this: If your client's browser is I.E. and the domain is named with _(underscores), -(dashes), etc. I.E. discards the session and starts a new one. I don't know if this is fixed under SP2. Example: a domain name http://my-domain.com will cause I.E. to lose sessions; however, there is a way around this if your are developing this for an internal website, you can simply add a host file record to utilize the actual IP. Example: http://my-domain.com225.225.225.1 If your client's browser is not I.E. then make sure all of your php.ini variables are as they need to be regarding sessions. Hope this helps. -Original Message- From: Richard Baldwin [mailto:[EMAIL PROTECTED] Sent: Friday, June 10, 2005 3:46 PM To: php-general@lists.php.net Subject: [SPAM 6.0] [PHP] Session help!? Hey, I have a site where I am using session_start() at the beginning of each page. The session id is passed transparently from the first page but after that it dissapears from the links and I lose all my session variables. Is there something elementary I'm missing? This is my first stab at PHP so I could be overlooking something really obvious or not really understanding how its supposed to work. The trans_id thingy is enabled by the way. Thanx in advance, Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session help!?
Hey, I have a site where I am using session_start() at the beginning of each page. The session id is passed transparently from the first page but after that it dissapears from the links and I lose all my session variables. Is there something elementary I'm missing? This is my first stab at PHP so I could be overlooking something really obvious or not really understanding how its supposed to work. The trans_id thingy is enabled by the way. Thanx in advance, Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session help please?
--- Paul <[EMAIL PROTECTED]> wrote: > I figured I could do something like $_SESSION['test'] = 5 and refer to > $test on other pages however I cannot. The reason I thought I could do > this is because I can do $_SESSION['test'] = $_POST['test'] and be able > to refer to just $test on other pages. This is because you probably have register_globals enabled, so the value of "test" in the user POST request is available to you as both: $_POST['test'] and $test It has nothing to do with you also setting $_SESSION['test']. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session help please?
Probably a stupid question. I figured I could do something like $_SESSION['test'] = 5 and refer to $test on other pages however I cannot. The reason I thought I could do this is because I can do $_SESSION['test'] = $_POST['test'] and be able to refer to just $test on other pages. Is the correct way to do this to make sure that I have somewhere session_register['test'] Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session help
okay so please help if you can... a page with a form that submits to itself for verification starts a session if its verified and registers the session variables, then header()s on into the application... in the application is a logout button that submits to an action page that unsets the session vars and destroys the session then header()ing back out to the login page... however... no matter what login i try... it always saves the session values fromt he first session... i am having a terrible time killing the session someone please please help me... thank you, jay merritt [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session Help
This is such an annoying thing. And it seems as though no one is willing to cover it in any manual, book or tutorial. Apparently the problem is that PHP sessions automatically set the no-cache header. So at the top of each script, after the session_start() function set header("Cache-Control: public"); That will the trick. Actually it may work too well but at least your visitors won't get discouraged by that annoying message. -- Kevin Stone [EMAIL PROTECTED] > -Original Message- > From: Michael: Dave II, Electric Boogaloo [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 29, 2002 3:47 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Session Help > > I'm having a little problem with my sessions on a website I'm programming > for. After a user logs in, if that user follows a link, the variable > information is being passed correctly, but when they hit "Back", Internet > Explorer gives a "Warning This Page Has Expired" error. Hitting refresh > does fix this, but "Forward/Back" is such a common procedure that I'd like > for this to work smoothly. Could someone tell me what I'm doing wrong > here? > > Thanks in advance. > > > Michael > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session Help
I'm having a little problem with my sessions on a website I'm programming for. After a user logs in, if that user follows a link, the variable information is being passed correctly, but when they hit "Back", Internet Explorer gives a "Warning This Page Has Expired" error. Hitting refresh does fix this, but "Forward/Back" is such a common procedure that I'd like for this to work smoothly. Could someone tell me what I'm doing wrong here? Thanks in advance. Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session Help
PHP automatically calls the appropiate function instead if you. But consider that the save handler is not called on individual session_register functions, only when all output is gone, and the whole session - each registered variable - must be saved. Note: The "write" handler is not executed until after the output stream is closed. Thus, output from debugging statements in the "write" handler will never be seen in the browser. If debugging output is necessary, it is suggested that the debug output be written to a file instead. - Original Message - From: "phantom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 30, 2001 10:10 AM Subject: [PHP] Session Help | I am trying to set my session data to be stored in MySQL so I am using | session_set_save_handler() which sets the six user-level session storage | functions (which I have already defined). | | Will session_set_save_handler automatically run the appropiate storage | function when required (like when i say session_register("Variable")) | --OR-- do I specifically have to run that function | (mysql_sessions_write(SID,$Value)) from my script when I want to save | info to the session table? | | I would appreciate any scripts anyone might have that would illustrate | how this works, the PHP manual and online examples I have found just are | not cutting it. | | Thank you. [EMAIL PROTECTED] | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] |
[PHP] Session Help
I am trying to set my session data to be stored in MySQL so I am using session_set_save_handler() which sets the six user-level session storage functions (which I have already defined). Will session_set_save_handler automatically run the appropiate storage function when required (like when i say session_register("Variable")) --OR-- do I specifically have to run that function (mysql_sessions_write(SID,$Value)) from my script when I want to save info to the session table? I would appreciate any scripts anyone might have that would illustrate how this works, the PHP manual and online examples I have found just are not cutting it. Thank you. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session help
Start at index.html. It goes to postcard.php. When I click on submit in postcard.php, if I change any of the values in the form, the session values received in send_mail.php do not change. Anyone have an idea what I have done wrong now? http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/index.html.phps http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/postcard.phps http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/display_image.phps http://www.CollegeSherbrooke.qc.ca/~languesmodernes/postcard/send_mail.phps John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session Help
Hello I'm trying to have sessions that use cookies and send to any subdomain in a .domain.com domain. It seems if I use them by default it will only sent back to the same domain. However, If I specify a certain domain in the config file, then I limit all my server to use cookie for that one domain. Is there anyway that I can get cookies to work for all subdomains of a particular domain? For example: if the domain I'm dealing with right now is abc.com, then cookies will work with a.abc.com, b.abc.com, and etc. It seems that right now it only works with explicity "abc.com" Thanks in advance, Yev __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session help (session.gc_probability)
Hi, i am using sessions for a web application and was wondering whether it's possible to set the gc_probablity to < 1%. I tried with a value of 0.25 but it appears that the gc callback function still runs at 1%. I figure that the value is an integer and rounds up the values but if someone can tell me different.. thanks, jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session Help for newbie plz
I am looking for help with session handling. I have modified Joe Jarosciak`s password script slightly, so that instead of logging in to d/l files, you login to one or two secure area`s. (depending on the access level of password used) How and where can i modify this more, so that a session will be created, and the logged-in users data will be passed over to the two secure area`s?? e.g. pass the login information to the two secure area pages, so they can evaluate if the user is allowed to view them or not! Heres the sript so far: <--- index.php---> Authorized Access Only Name: Password:<-secure.php-> '; //echo $username; //echo ' : '; //echo $password; //echo ''; if (( $username == "$PHP_AUTH_USER" ) && ( $password == "$PHP_AUTH_PW" )) { $auth = true; break; } } } // ==Header + IP Checking== $updated_from=getenv("REMOTE_ADDR"); print (' Connected from (IP): '); print ''; print $updated_from; print ' | Your username - '; print ''; print $PHP_AUTH_USER; print ' '; // ==end - Header + IP Checking== // ==on support or not=== if (! $auth) { echo ' You used username: '; echo $PHP_AUTH_USER; echo ' You used password: '; echo $PHP_AUTH_PW; echo ''; echo ''; echo ''; echo 'Sorry, but this is wrong. Authorization with right username and password is Required!'; exit; } if (($auth) and ($tc == '1')) { print '- You are authorized for access area 1.' ; } if (($auth) and ($fc == '1')) { print '- You are authorized for access area 2.' ; } if (($auth) and ($tc == '0')) { print '- You are not authorized for access area 1.' ; } if (($auth) and ($fc == '0')) { print '- You are not authorized for access area 2.' ; } // ==end -- on support or not=== // ==buttons=== if (($auth) and ($tc == '1')) { print 'Area 1 '; } if (($auth) and ($fc == '1')) { print 'Area 2 '; } // ==end buttons=== if ($auth) { echo 'Thank you. You were authorized with right username and password!'; } ?> <---end secure.php-> <-access_area1.htm-> Access Area 1 Secure Area 1 Access Area 2 Secure Area 2 joe:19741:1:0: tony:928gt:1:1: murray:fsSS92:1:1: greg:2NNg8ed:1:1: mitch:dopro:0:0: nick:cmuk:1:0: guest:RxegXHNEV9GpM:1:1: tom:JJft54Dcv:0:1: Thankyou very much for any help! [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Session Help (transparent sid's)
I got past this horrible mess by breaking the code. PHP seems to look for structures so if you break it up: print(""); or print(""); or $s .= " Hello, > > Can someone please help? > > My ISP has recompiled php with the transparent sid support and now when i try to access a certain page for the first time (ie. no cookie yet set) then php is making a right mess of my javascript and html (adding speech marks and question marks in unwanted places) ! > > Is there a way to override this behaviour in the ini file, or even in the code? > > One of my customers sites is down because of this, and i can find nothing through searching 8( > > Thanks guys, > > Jamie Burns. >
[PHP] Session Help (transparent sid's)
Hello, Can someone please help? My ISP has recompiled php with the transparent sid support and now when i try to access a certain page for the first time (ie. no cookie yet set) then php is making a right mess of my javascript and html (adding speech marks and question marks in unwanted places) ! Is there a way to override this behaviour in the ini file, or even in the code? One of my customers sites is down because of this, and i can find nothing through searching 8( Thanks guys, Jamie Burns.