Re: [PHP] Reliability of sessions

2002-04-05 Thread Meitiner

I hope you don't live in Bethlehem

Erik Price wrote:

 On Thursday, April 4, 2002, at 04:40  PM, Thomas Deliduka wrote:

  I have a quick question for a veteren of sessions out there.

 I'd trust sessions with my life.

 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Reliability of sessions

2002-04-05 Thread Michael Virnstein

On the page you start the session,
${session_name()} isn't set. so if you need that on the first page too, you
should do the following

?php

session_start();
if (!isset(${session_name()})) {
${session_name()} = session_id();
}

?

Thomas Deliduka [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I use them because 'sid' isn't always populated and, who knows, some browser
may not handle cookies right and then lose a session. I do it to make sure,
to be absolutely sure that it will work.

On 4/4/02 5:19 PM this was written:

 If you made your link like this:  a href=filename.php??=sid? it
tacks
 on the name plus the session id.  If cookies are enabled you will only see
 the session id passed through the url on the first page.. After that you
 wont, thus the little script I wrote so the '?' doesn¹t show up.  Now if
 cookies arent enabled you will see the session name and id passed through
 the url every single time.  There is absolutely no reason to use those
 functions since php takes care of that stuff for you.

--

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Reliability of sessions

2002-04-04 Thread Thomas Deliduka

I have a quick question for a veteren of sessions out there.

We're building a shopping cart and I'm playing with the idea of keeping the
checkout information such as Shipping and billing address in a session
variable until I retrieve it at checkout.

The checkout is a step process:

Shipping info - billing info - confirmation - final.

At shipping and billing the information would be stored in a session
variable. To be retrieved at confirmation, etc.  (cc information would be
encrypted before storing in the session var.)

Otherwise I could possibly create the order starting with shipping info in
the database and merely pass the order number that is assigned to them.

What is the opinion, are sessions reliable enough to go through the step
process?

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Reliability of sessions

2002-04-04 Thread Vladislav Kulchitski

I am not sure about the reliability of sessions, but the way I do it is
also through several processes, and the information passed via input
type=hidden name=name value=$name I can demonstrate it if you want.

Even though sessions are more handy, I still don't know what happens if
cookies are disabled in the client's browser.

Vlad

-Original Message-
From: Thomas Deliduka [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, April 04, 2002 4:40 PM
To: PHP List
Subject: [PHP] Reliability of sessions

I have a quick question for a veteren of sessions out there.

We're building a shopping cart and I'm playing with the idea of keeping
the
checkout information such as Shipping and billing address in a session
variable until I retrieve it at checkout.

The checkout is a step process:

Shipping info - billing info - confirmation - final.

At shipping and billing the information would be stored in a session
variable. To be retrieved at confirmation, etc.  (cc information would
be
encrypted before storing in the session var.)

Otherwise I could possibly create the order starting with shipping info
in
the database and merely pass the order number that is assigned to them.

What is the opinion, are sessions reliable enough to go through the step
process?

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
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




Re: [PHP] Reliability of sessions

2002-04-04 Thread Thomas Deliduka

On 4/4/02 4:46 PM this was written:

 I am not sure about the reliability of sessions, but the way I do it is
 also through several processes, and the information passed via input
 type=hidden name=name value=$name I can demonstrate it if you want.

That's what I was wanting to avoid. That's a lot of hidden fields. Not to
mention if you  have to add to the first step, you need to modify all the
others.

 Even though sessions are more handy, I still don't know what happens if
 cookies are disabled in the client's browser.

I pass the session ID in the URL on every page so whether or not cookies are
set, the session stays intact.

I'm thinking that I solved my old problem and I'm going to do it in the
database and pass the order number. That's probably the best way. I only
have to provide for order clean-up for those that started the process and
decided not to check out.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Reliability of sessions

2002-04-04 Thread Vladislav Kulchitski

But what you can do with input type=hidden you can make an array
of things... so you will only have one input type=hidden

How do you pass session IDs via strings? Can you describe in few words
please?

Vlad
Kulchitski.com


-Original Message-
From: Thomas Deliduka [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, April 04, 2002 4:54 PM
To: PHP List
Subject: Re: [PHP] Reliability of sessions

On 4/4/02 4:46 PM this was written:

 I am not sure about the reliability of sessions, but the way I do it
is
 also through several processes, and the information passed via input
 type=hidden name=name value=$name I can demonstrate it if you want.

That's what I was wanting to avoid. That's a lot of hidden fields. Not
to
mention if you  have to add to the first step, you need to modify all
the
others.

 Even though sessions are more handy, I still don't know what happens
if
 cookies are disabled in the client's browser.

I pass the session ID in the URL on every page so whether or not cookies
are
set, the session stays intact.

I'm thinking that I solved my old problem and I'm going to do it in the
database and pass the order number. That's probably the best way. I only
have to provide for order clean-up for those that started the process
and
decided not to check out.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
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




RE: [PHP] Reliability of sessions

2002-04-04 Thread Rodolfo Gonzalez

On Thu, 4 Apr 2002, Vladislav Kulchitski wrote:
 Even though sessions are more handy, I still don't know what happens if
 cookies are disabled in the client's browser.

You don't even need to use cookies to support sessions. It's all in the 
manual.

Regards,
Rodolfo.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Reliability of sessions

2002-04-04 Thread Jason Lotito

Another thing to consider, most users on the internet allow cookies, and
those that don't want cookies can usually differentiate between allowing
session cookies and other types of cookies.

In the end, if a user doesn't want to allow cookies, they shouldn't expect
to be able to do e-commerce type stuff like purchasing items, or even have
user accounts.

Considering they don't allow cookies, these same users probably don't want
to sign up and give you their information anyways.

Use sessions, that is what they are there for.

Jason Lotito
www.devnetwork.net - PHP Developer's Network
www.newbienetwork.net

- Original Message -
From: Thomas Deliduka [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Thursday, April 04, 2002 4:54 PM
Subject: Re: [PHP] Reliability of sessions


 On 4/4/02 4:46 PM this was written:

  I am not sure about the reliability of sessions, but the way I do it is
  also through several processes, and the information passed via input
  type=hidden name=name value=$name I can demonstrate it if you want.

 That's what I was wanting to avoid. That's a lot of hidden fields. Not to
 mention if you  have to add to the first step, you need to modify all the
 others.

  Even though sessions are more handy, I still don't know what happens if
  cookies are disabled in the client's browser.

 I pass the session ID in the URL on every page so whether or not cookies
are
 set, the session stays intact.

 I'm thinking that I solved my old problem and I'm going to do it in the
 database and pass the order number. That's probably the best way. I only
 have to provide for order clean-up for those that started the process and
 decided not to check out.

 --

 Thomas Deliduka
 IT Manager
  -
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.com/



 --
 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




Re: [PHP] Reliability of sessions

2002-04-04 Thread Richard Baskett

I use sessions every day and they are extremely reliable.  I have no
problems with them.  And they would easily do what you want.  Now getting to
that stage took a lot of blood and sweat, but I would say it's definitely
worth it due to the ease that sessions handles data.

Cheers!

Rick

When one door closes, another opens; but we often look so long and so
regretfully upon the closed door that we do not see the one which has opened
for us. - Alexander Graham Bell

 From: Thomas Deliduka [EMAIL PROTECTED]
 Date: Thu, 04 Apr 2002 16:54:13 -0500
 To: PHP List [EMAIL PROTECTED]
 Subject: Re: [PHP] Reliability of sessions
 
 On 4/4/02 4:46 PM this was written:
 
 I am not sure about the reliability of sessions, but the way I do it is
 also through several processes, and the information passed via input
 type=hidden name=name value=$name I can demonstrate it if you want.
 
 That's what I was wanting to avoid. That's a lot of hidden fields. Not to
 mention if you  have to add to the first step, you need to modify all the
 others.
 
 Even though sessions are more handy, I still don't know what happens if
 cookies are disabled in the client's browser.
 
 I pass the session ID in the URL on every page so whether or not cookies are
 set, the session stays intact.
 
 I'm thinking that I solved my old problem and I'm going to do it in the
 database and pass the order number. That's probably the best way. I only
 have to provide for order clean-up for those that started the process and
 decided not to check out.
 
 -- 
 
 Thomas Deliduka
 IT Manager
-
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.com/
 
 
 
 -- 
 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




Re: [PHP] Reliability of sessions

2002-04-04 Thread Thomas Deliduka

On 4/4/02 4:56 PM this was written:

 How do you pass session IDs via strings? Can you describe in few words
 please?

Well, I know that SID is a defined constant (see session functions in the
online PHP manual) but just to be sure, I created my own functions:

function sessinfo() {
return session_name() . = . session_id();
}

function sessfield() {
echo INPUT TYPE=\HIDDEN\ NAME=\ . session_name() . \ VALUE=\ .
session_id() . \\n;
}


I use 'session_name()' rather than PHPSESSID because some webmasters may
change the PHP.ini file's definition for the session name.

Then whenever I make a URL link in my site I do

A HREF=filename.php?? echo sessinfo(); ?my link/A

Of course, the sessfield function is for passing the session ID via a form.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Reliability of sessions

2002-04-04 Thread Erik Price


On Thursday, April 4, 2002, at 04:40  PM, Thomas Deliduka wrote:

 I have a quick question for a veteren of sessions out there.

I'd trust sessions with my life.







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Reliability of sessions

2002-04-04 Thread Richard Baskett

Whenever you start a function using session_name('name') and then
session_start() the sessions name will automatically be the session name.
There is no need for those functions.

If you made your link like this:  a href=filename.php??=sid? it tacks
on the name plus the session id.  If cookies are enabled you will only see
the session id passed through the url on the first page.. After that you
wont, thus the little script I wrote so the '?' doesn¹t show up.  Now if
cookies arent enabled you will see the session name and id passed through
the url every single time.  There is absolutely no reason to use those
functions since php takes care of that stuff for you.

Rick

Finish each day and be done with it. You have done what you could; some
blunders and absurdities have crept in; forget them as soon as you can.
Tomorrow is a new day; you shall begin it serenely and with too high a
spirit to be encumbered with your old nonsense. - Ralph Waldo Emerson

 From: Thomas Deliduka [EMAIL PROTECTED]
 Date: Thu, 04 Apr 2002 17:09:20 -0500
 To: PHP List [EMAIL PROTECTED]
 Subject: Re: [PHP] Reliability of sessions
 
 On 4/4/02 4:56 PM this was written:
 
 How do you pass session IDs via strings? Can you describe in few words
 please?
 
 Well, I know that SID is a defined constant (see session functions in the
 online PHP manual) but just to be sure, I created my own functions:
 
 function sessinfo() {
   return session_name() . = . session_id();
 }
 
 function sessfield() {
   echo INPUT TYPE=\HIDDEN\ NAME=\ . session_name() . \ VALUE=\ .
 session_id() . \\n;
 }
 
 
 I use 'session_name()' rather than PHPSESSID because some webmasters may
 change the PHP.ini file's definition for the session name.
 
 Then whenever I make a URL link in my site I do
 
 A HREF=filename.php?? echo sessinfo(); ?my link/A
 
 Of course, the sessfield function is for passing the session ID via a form.
 
 -- 
 
 Thomas Deliduka
 IT Manager
-
 New Eve Media
 The Solution To Your Internet Angst
 http://www.neweve.com/
 
 
 
 -- 
 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




Re: [PHP] Reliability of sessions

2002-04-04 Thread Thomas Deliduka

I use them because 'sid' isn't always populated and, who knows, some browser
may not handle cookies right and then lose a session. I do it to make sure,
to be absolutely sure that it will work.

On 4/4/02 5:19 PM this was written:

 If you made your link like this:  a href=filename.php??=sid? it tacks
 on the name plus the session id.  If cookies are enabled you will only see
 the session id passed through the url on the first page.. After that you
 wont, thus the little script I wrote so the '?' doesn¹t show up.  Now if
 cookies arent enabled you will see the session name and id passed through
 the url every single time.  There is absolutely no reason to use those
 functions since php takes care of that stuff for you.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php