Re: [PHP] PHP session variables

2012-08-16 Thread Tedd Sperling
On Aug 15, 2012, at 4:42 PM, Andrew Ballard aball...@gmail.com wrote: On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling t...@sperling.com wrote: The php manual ( http://us3.php.net/manual/en/function.session-start.php ) First Note states that session_start() must be called *before* anything sent

Re: [PHP] PHP session variables

2012-08-16 Thread Tedd Sperling
On Aug 15, 2012, at 4:13 PM, Robert Cummings rob...@interjinn.com wrote: I only pointed it out because I used to do exactly the same thing :) Cheers, Rob. Thanks, I was starting to feel pretty dumb. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP

Re: [PHP] PHP session variables

2012-08-15 Thread tamouse mailing lists
On Aug 14, 2012 1:36 AM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Aug 13, 2012 8:01 AM, Robert Cummings rob...@interjinn.com wrote: On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Fri, Aug 10, 2012 at 11:56 AM, Tedd Sperling t...@sperling.com wrote: On Aug 10, 2012, at 11:45 AM, Tedd Sperling t...@sperling.com wrote: On Aug 9, 2012, at 5:16 PM, Jim Lucas li...@cmsws.com wrote: You are relying on PHP's loose typing. This is a poor check. session_id() returns a

Re: [PHP] PHP session variables

2012-08-15 Thread Tedd Sperling
On Aug 14, 2012, at 11:01 AM, Robert Cummings rob...@interjinn.com wrote: I'm not sure if you're making a joke, but your changes have no effect. You've merely explicitly stated the optional parameter's default value. What I had meant was to change the following: ?php $starttime =

Re: [PHP] PHP session variables

2012-08-15 Thread Tedd Sperling
Andrew: Your points are well taken -- thanks. However, my only concern is given this: for($i=1; $i 1000; $i++) { if (!defined('SID')) { echo __LINE__, '::session_start()br'; session_start(); } } The php manual (

Re: [PHP] PHP session variables

2012-08-15 Thread Robert Cummings
On 12-08-15 03:19 PM, Tedd Sperling wrote: Rob: Again thanks. Sorry, I totally missed your point. In my defense I commonly use the value returned from microtime() as a string and not as a float. The code that followed my microtime( false ); demo broke the string and recombined it into a

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling t...@sperling.com wrote: Your points are well taken -- thanks. I've seen a lot of people code that way, so it's easy to miss. In your original code, that first statement was calling session_start() 1,000 times. This is because the first time

Re: [PHP] PHP session variables

2012-08-14 Thread tamouse mailing lists
On Aug 13, 2012 8:01 AM, Robert Cummings rob...@interjinn.com wrote: On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will maybe out of topic, I'm sorry. How can you know that one way will be much slower than

Re: [PHP] PHP session variables

2012-08-14 Thread Tedd Sperling
On Aug 13, 2012, at 10:59 AM, Robert Cummings rob...@interjinn.com wrote: On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will maybe out of topic, I'm sorry. How can you know that one way will be much slower

Re: [PHP] PHP session variables

2012-08-14 Thread Robert Cummings
On 12-08-14 10:41 AM, Tedd Sperling wrote: On Aug 13, 2012, at 10:59 AM, Robert Cummings rob...@interjinn.com wrote: On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will maybe out of topic, I'm sorry. How can

Re: [PHP] PHP session variables

2012-08-13 Thread Robert Cummings
On 12-08-10 04:42 PM, Tedd Sperling wrote: On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will maybe out of topic, I'm sorry. How can you know that one way will be much slower than other one? I mean, how can I learn which function is faster before I

Re: [PHP] PHP session variables

2012-08-12 Thread Marco Behnke
Am 09.08.12 23:16, schrieb Jim Lucas: On 08/09/2012 01:45 PM, Tedd Sperling wrote: On Aug 8, 2012, at 5:41 PM, Jim Ginerjim.gi...@albanyhandball.com wrote: On 8/8/2012 11:24 AM, Ansry User 01 wrote: I am setting the _SESSION variables in one of my file, but whenever I leave the php page

Re: [PHP] PHP session variables

2012-08-12 Thread Tedd Sperling
On Aug 10, 2012, at 1:21 PM, Ege Sertçetin sertce...@itu.edu.tr wrote: Hi. My question will maybe out of topic, I'm sorry. How can you know that one way will be much slower than other one? I mean, how can I learn which function is faster before I test it? Ege: No your question is on topic.

Re: [PHP] PHP session variables

2012-08-10 Thread Tedd Sperling
On Aug 9, 2012, at 5:16 PM, Jim Lucas li...@cmsws.com wrote: You are relying on PHP's loose typing. This is a poor check. session_id() returns a string, not boolean. You should do this instead. if ( session_id() === '' ) -- Jim Lucas Thanks Jim -- you're right. What

Re: [PHP] PHP session variables

2012-08-10 Thread Tedd Sperling
On Aug 10, 2012, at 11:45 AM, Tedd Sperling t...@sperling.com wrote: On Aug 9, 2012, at 5:16 PM, Jim Lucas li...@cmsws.com wrote: You are relying on PHP's loose typing. This is a poor check. session_id() returns a string, not boolean. You should do this instead. if ( session_id() ===

Re: [PHP] PHP session variables

2012-08-09 Thread Tedd Sperling
On Aug 8, 2012, at 5:41 PM, Jim Giner jim.gi...@albanyhandball.com wrote: On 8/8/2012 11:24 AM, Ansry User 01 wrote: I am setting the _SESSION variables in one of my file, but whenever I leave the php page session variables are not accessible. Not sure what I need to do additionally other

Re: [PHP] PHP session variables

2012-08-09 Thread Jim Lucas
On 08/09/2012 01:45 PM, Tedd Sperling wrote: On Aug 8, 2012, at 5:41 PM, Jim Ginerjim.gi...@albanyhandball.com wrote: On 8/8/2012 11:24 AM, Ansry User 01 wrote: I am setting the _SESSION variables in one of my file, but whenever I leave the php page session variables are not accessible. Not

Re: [PHP] PHP session variables

2012-08-08 Thread Daniel Brown
On Wed, Aug 8, 2012 at 11:24 AM, Ansry User 01 yrsna.res...@gmail.com wrote: I am setting the _SESSION variables in one of my file, but whenever I leave the php page session variables are not accessible. Not sure what I need to do additionally other then defining _SESSION[]. Any pointer.

Re: [PHP] PHP session variables

2012-08-08 Thread David Harkness
On Wed, Aug 8, 2012 at 8:24 AM, Ansry User 01 yrsna.res...@gmail.comwrote: I am setting the _SESSION variables in one of my file, but whenever I leave the php page session variables are not accessible. As always, post some code demonstrating what you're doing. Help us help you! :) David

RE: [PHP] PHP session variables

2012-08-08 Thread Jen Rasmussen
-Original Message- From: David Harkness [mailto:davi...@highgearmedia.com] Sent: Wednesday, August 08, 2012 11:53 AM To: Ansry User 01 Cc: php-general@lists.php.net Subject: Re: [PHP] PHP session variables On Wed, Aug 8, 2012 at 8:24 AM, Ansry User 01 yrsna.res...@gmail.comwrote: I am

RE: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Andras Kende
-Original Message- From: Andy Higgins [mailto:[EMAIL PROTECTED] Sent: Saturday, December 27, 2003 6:04 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP Session Variables Not Being Set For Certain Browsers Hello All, I have been racking my head over a problem where a large percentage of users

Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Andy Higgins
Hi Andras, Yes, good point Thank you. It could be that the IP address of the user is changing on each HTTP request that is made, which would explain the problem (although that does seem quite odd). Can anyone confirm whether AOL (or any other ISPs for that matter) change a user's IP address as

Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Gerard Samuel
On Saturday 27 December 2003 07:03 am, Andy Higgins wrote: Hello All, I have been racking my head over a problem where a large percentage of users are unable to log into my php site due to what seems to be a problem with setting php session variables on certain end user browsers (certain

Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Andy Higgins
Hi Gerard, Thank you very much for the response. Please can you clarify the following: 1. At the time of login will the login code need to check if the clients browser accepts cookies and if not then append the SID as described? If so, do you perhaps have a sample piece of code that does this?

RE: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Mark Charette
-Original Message- From: Andy Higgins [mailto:[EMAIL PROTECTED] Can anyone confirm whether AOL (or any other ISPs for that matter) change a user's IP address as seen by the web server (for eample through a proxy) within the same session? It's been pointed out and confirmed many,

Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Andy Higgins
Hi Mark, Thank you for confirming that for me. I am new to the list and did do a search though past messages but did not find this point (obvioulsy I did not look hard enough). Thanks again. Regards, Andy Mark Charette [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original

Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Gerard Samuel
On Saturday 27 December 2003 10:54 am, Andy Higgins wrote: 1. At the time of login will the login code need to check if the clients browser accepts cookies and if not then append the SID as described? If so, do you perhaps have a sample piece of code that does this? No, php does this for you.

Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers

2003-12-27 Thread Andy Higgins
Hi Gerard, Thank you for your assistance you have been of enormous help. Regards, Andy Gerard Samuel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Saturday 27 December 2003 10:54 am, Andy Higgins wrote: 1. At the time of login will the login code need to check if the clients