Re: [PHP] Cookies sessions

2010-01-25 Thread Nisse Engström
On Thu, 21 Jan 2010 08:43:58 +1100, clanc...@cybec.com.au wrote: When you are working with sessions, provided you start your program with session_id(), you can then do anything you like with session variables at any point in your program. In my original question I asked if there was a

Re: [PHP] Cookies sessions

2010-01-25 Thread Ashley Sheridan
On Mon, 2010-01-25 at 22:13 +0100, Nisse Engström wrote: On Thu, 21 Jan 2010 08:43:58 +1100, clanc...@cybec.com.au wrote: When you are working with sessions, provided you start your program with session_id(), you can then do anything you like with session variables at any point in your

Re: [PHP] Cookies sessions

2010-01-25 Thread Nisse Engström
On Mon, 25 Jan 2010 21:26:05 +, Ashley Sheridan wrote: On Mon, 2010-01-25 at 22:13 +0100, Nisse Engström wrote: The HTTP spec allows cookies to be sent after the content, in trailing headers, but it's not usable practically. Few browsers support it, and PHP certainly doesn't. You'd have

Re: [PHP] Cookies sessions

2010-01-24 Thread Michael A. Peters
clanc...@cybec.com.au wrote: On Sat, 23 Jan 2010 09:32:37 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote: but I would be grateful for any suggestions how I could make this procedure more secure. We have given you advice that you should NOT

Re: [PHP] Cookies sessions

2010-01-24 Thread clancy_1
On Sun, 24 Jan 2010 17:44:16 +1100, clanc...@cybec.com.au wrote: On Sat, 23 Jan 2010 15:10:11 +, nrix...@gmail.com (Nathan Rixham) wrote: To answer your specific questions though - what can be done to make this process more secure - no matter what approach

Re: [PHP] Cookies sessions

2010-01-23 Thread tedd
At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote: but I would be grateful for any suggestions how I could make this procedure more secure. We have given you advice that you should NOT use Cookies in any fashion to secure your site, but you remain steadfast that you know better -- so,

Re: [PHP] Cookies sessions

2010-01-23 Thread Nathan Rixham
clanc...@cybec.com.au wrote: On Thu, 21 Jan 2010 22:00:30 +, a...@ashleysheridan.co.uk (Ashley Sheridan) wrote: On Fri, 2010-01-22 at 08:58 +1100, clanc...@cybec.com.au wrote: On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 12:15 PM +1100 1/21/10,

Re: [PHP] Cookies sessions

2010-01-23 Thread Michael A. Peters
tedd wrote: At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote: but I would be grateful for any suggestions how I could make this procedure more secure. We have given you advice that you should NOT use Cookies in any fashion to secure your site, but you remain steadfast that you know

Re: [PHP] Cookies sessions

2010-01-23 Thread clancy_1
On Sat, 23 Jan 2010 09:32:37 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote: but I would be grateful for any suggestions how I could make this procedure more secure. We have given you advice that you should NOT use Cookies in any fashion to

Re: [PHP] Cookies sessions

2010-01-23 Thread clancy_1
On Sat, 23 Jan 2010 15:10:11 +, nrix...@gmail.com (Nathan Rixham) wrote: To answer your specific questions though - what can be done to make this process more secure - no matter what approach you take, when working via http and needing logged in / secure

Re: [PHP] Cookies sessions

2010-01-22 Thread tedd
At 8:58 AM +1100 1/22/10, clanc...@cybec.com.au wrote: On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 12:15 PM +1100 1/21/10, clanc...@cybec.com.au wrote: On Wed, 20 Jan 2010 20:05:42 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: Well, I hope this

Re: [PHP] Cookies sessions

2010-01-22 Thread clancy_1
On Thu, 21 Jan 2010 22:00:30 +, a...@ashleysheridan.co.uk (Ashley Sheridan) wrote: On Fri, 2010-01-22 at 08:58 +1100, clanc...@cybec.com.au wrote: On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 12:15 PM +1100 1/21/10, clanc...@cybec.com.au wrote: On Wed,

Re: [PHP] Cookies sessions

2010-01-22 Thread Michael A. Peters
clanc...@cybec.com.au wrote: My reasoning in using a cookie for user recognition, rather than relying on the session ID, was that with a cookie I could ensure that the connection effectively lasted for some specified period, whereas the session ID lifetime seems to be somewhat short and

Re: [PHP] Cookies sessions

2010-01-21 Thread clancy_1
On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 12:15 PM +1100 1/21/10, clanc...@cybec.com.au wrote: On Wed, 20 Jan 2010 20:05:42 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: Well, I hope this information is helpful. Yes, thanks to everyone who contributed.

Re: [PHP] Cookies sessions

2010-01-21 Thread Ashley Sheridan
On Fri, 2010-01-22 at 08:58 +1100, clanc...@cybec.com.au wrote: On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote: At 12:15 PM +1100 1/21/10, clanc...@cybec.com.au wrote: On Wed, 20 Jan 2010 20:05:42 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: Well, I hope

Re: [PHP] Cookies sessions

2010-01-21 Thread Michael A. Peters
clanc...@cybec.com.au wrote: Yes; I'm doing that too. I am setting up a private website, and using cookies to control access to it. Clancy The only variable I store in a cookie is the session id. Everything else is stored in the session database. -- PHP General Mailing List

Re: [PHP] Cookies sessions

2010-01-20 Thread Ashley Sheridan
On Wed, 2010-01-20 at 15:45 +1100, clanc...@cybec.com.au wrote: On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote: The first setcookie call is empty which produces the errors that cause the second cookie to fail. I'm afraid not. I modified the program started to

Re: [PHP] Cookies sessions

2010-01-20 Thread clancy_1
On Wed, 20 Jan 2010 13:19:03 +, a...@ashleysheridan.co.uk (Ashley Sheridan) wrote: On Wed, 2010-01-20 at 15:45 +1100, clanc...@cybec.com.au wrote: On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote: The first setcookie call is empty which produces the errors that

Re: [PHP] Cookies sessions

2010-01-20 Thread Ashley Sheridan
On Thu, 2010-01-21 at 08:43 +1100, clanc...@cybec.com.au wrote: On Wed, 20 Jan 2010 13:19:03 +, a...@ashleysheridan.co.uk (Ashley Sheridan) wrote: On Wed, 2010-01-20 at 15:45 +1100, clanc...@cybec.com.au wrote: On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote:

Re: [PHP] Cookies sessions

2010-01-20 Thread Bruno Fajardo
2010/1/20 clanc...@cybec.com.au: When you are working with sessions, provided you start your program with session_id(), you can then do anything you like with session variables at any point in your program. Hi, You meant session_start() instead of session_id(), right? But yes, once you

Re: [PHP] Cookies sessions

2010-01-20 Thread Joseph Thayne
Bruno Fajardo wrote: You don't need to use output buffering at all. You only need this mechanism if your script needs to output stuff before the session_start() or setcookie() functions get executed. Output buffering is also used if you need to output something before the headers are sent

Re: [PHP] Cookies sessions

2010-01-20 Thread clancy_1
On Wed, 20 Jan 2010 20:05:42 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: 2010/1/20 clanc...@cybec.com.au: When you are working with sessions, provided you start your program with session_id(), you can then do anything you like with session variables at any point in your program. Hi,

[PHP] Cookies sessions

2010-01-19 Thread clancy_1
I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser. When I first started using sessions, I was alarmed to read a very similar statement about sessions, but

Re: [PHP] Cookies sessions

2010-01-19 Thread Bruno Fajardo
2010/1/19 clanc...@cybec.com.au: I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser. When I first started using sessions, I was alarmed to read a very

Re: [PHP] Cookies sessions

2010-01-19 Thread kranthi
When I first started using sessions, I was alarmed to read a very similar statement about sessions, but I soon found that if I started my program with the statement session_start(); I could then set up, access, modify or clear any session variable at any time in my program. This is

Re: [PHP] Cookies sessions

2010-01-19 Thread Richard
Hi, However I have almost immediately found that while I appear to be able to read cookies at any time, I cannot set them when I would like to. Is there any similar trick which will work with cookies? Keep in mind that cookies are set by sending an HTTP header as part of the response, so

Re: [PHP] Cookies sessions

2010-01-19 Thread Phpster
Be aware that there is a limit of 20 cookies per domain Bastien Sent from my iPod On Jan 19, 2010, at 6:12 AM, Bruno Fajardo bsfaja...@gmail.com wrote: 2010/1/19 clanc...@cybec.com.au: I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the

Re: [PHP] Cookies sessions

2010-01-19 Thread clancy_1
On Tue, 19 Jan 2010 09:12:17 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: 2010/1/19 clanc...@cybec.com.au: I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to

Re: [PHP] Cookies sessions

2010-01-19 Thread Phpster
The first setcookie call is empty which produces the errors that cause the second cookie to fail. Bastien Sent from my iPod On Jan 19, 2010, at 10:16 PM, clanc...@cybec.com.au wrote: On Tue, 19 Jan 2010 09:12:17 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: 2010/1/19

Re: [PHP] Cookies sessions

2010-01-19 Thread clancy_1
On Tue, 19 Jan 2010 16:45:37 +0530, kranthi...@gmail.com (kranthi) wrote: When I first started using sessions, I was alarmed to read a very similar statement about sessions, but I soon found that if I started my program with the statement session_start(); I could then set up, access, modify

Re: [PHP] Cookies sessions

2010-01-19 Thread clancy_1
On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote: The first setcookie call is empty which produces the errors that cause the second cookie to fail. I'm afraid not. I modified the program started to read: ?php //;V;;; Cypalda/Index.php Printed:

Re: [PHP] Cookies/Sessions and how they work

2009-03-10 Thread Chris
It brings up another question, though. Let's say that I have a session_start() call at the beginning of a bunch of pages. So that each time one of these pages is called, the call is made to session_start(). It seems like it would screw things up royally if each call to session_start() generated

Re: [PHP] Cookies/Sessions and how they work

2009-03-10 Thread Michael A. Peters
Paul M Foster wrote: This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request for that cookie comes in from the server, the browser returns only the value, and no other data. One question: When the browser

[PHP] Cookies/Sessions and how they work

2009-03-09 Thread Paul M Foster
This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request for that cookie comes in from the server, the browser returns only the value, and no other data. One question: When the browser requests a page from a

Re: [PHP] Cookies/Sessions and how they work

2009-03-09 Thread Chris
Paul M Foster wrote: This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request for that cookie comes in from the server, the browser returns only the value, and no other data. One question: When the browser

Re: [PHP] Cookies/Sessions and how they work

2009-03-09 Thread APseudoUtopia
On Mon, Mar 9, 2009 at 10:26 PM, Paul M Foster pa...@quillandmouse.com wrote: This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request for that cookie comes in from the server, the browser returns only

RE: [PHP] Cookies/Sessions and how they work

2009-03-09 Thread Chetan Rane
...@quillandmouse.com] Sent: Tuesday, March 10, 2009 7:57 AM To: php-general@lists.php.net Subject: [PHP] Cookies/Sessions and how they work This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request

Re: [PHP] Cookies/Sessions and how they work

2009-03-09 Thread Paul M Foster
On Mon, Mar 09, 2009 at 11:35:57PM -0400, APseudoUtopia wrote: On Mon, Mar 9, 2009 at 10:26 PM, Paul M Foster pa...@quillandmouse.com wrote: This is in two parts. First cookies. I'm a little unclear on how they work. From what I've read, cookies are stored by the browser. When a request

[PHP] Cookies, Sessions and Login Process

2001-11-12 Thread Joe Van Meer
Hi there, I'm new to php coming from an asp background and would like to know the easiest way to automate a login process. I have one page called 'index.php' and it contains a form with 2 elements, username and password. This page is posted to th 'login.php' and here I do a check against the

Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Christopher William Wesley
Just do your authentication before you send any HTML (including any whitespace). I actually recommend not sending ANY HTML from your authentication script. Authenticate them, set your cookie, and redirect the visitor to an appropriate next page, based on whether or not they've successfully

Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Joe Van Meer
Thx Christopher for replying. Ok, let me see if I understand you correctly... The user enters username and password on index.php, this is posted to login.php. On login.php after I verify the user is who he/she says they are I set a cookie called accessedbefore to yes and redirect them to the

Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Julio Nobrega Trabalhando
header(); function is fine. Another option is javascript which is dependent on the client software. But you get the picture about the login process. I just have to agree with Chris, something name 'is_logged' is better than 'accessedbefore'. -- Julio Nobrega A hora está chegando:

Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Christopher William Wesley
On Mon, 12 Nov 2001, Joe Van Meer wrote: Thx Christopher for replying. Ok, let me see if I understand you correctly... The user enters username and password on index.php, this is posted to login.php. On login.php after I verify the user is who he/she says they are I set a cookie called

Re: [PHP] Cookies, Sessions and Login Proceess

2001-11-12 Thread Joe Van Meer
Thanx a bunch you guys! Got my login process going the way I wanted it. I appreciate your help, as I['m new to php. The first of many questions I suppose :) Cheers Joe Christopher William Wesley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 12 Nov