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

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 i

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

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 u

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 f

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

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 bett

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

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

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

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

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 informa

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 (http://www.p

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

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 con

Re: [PHP] Cookies & sessions

2010-01-21 Thread tedd
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. I now have a better understanding of what cookies are, and have turned on

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

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 eith

Re: [PHP] Cookies & sessions

2010-01-20 Thread Bruno Fajardo
2010/1/20 : > 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 started a session (b

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)

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 t

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

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: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

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

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 : I am trying

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

Re: [PHP] Cookies & sessions

2010-01-19 Thread Adam Richardson
On Tue, Jan 19, 2010 at 12:42 PM, Paul M Foster wrote: > On Tue, Jan 19, 2010 at 10:06:26PM +1100, clanc...@cybec.com.au wrote: > > > 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

Re: [PHP] Cookies & sessions

2010-01-19 Thread Paul M Foster
On Tue, Jan 19, 2010 at 10:06:26PM +1100, clanc...@cybec.com.au wrote: > 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

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 wrote: 2010/1/19 : 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 cal

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,

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 Bruno Fajardo
2010/1/19 : > 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 > s

Re: [PHP] cookies and carts

2009-12-08 Thread Michael A. Peters
Allen McCabe wrote: I have a shopping cart type system set up which keeps track of the cart contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is equal to the quantity, so the name/value pair is all the information I need. But sessions are unreliable on the free server I am cu

Re: [PHP] cookies and carts

2009-12-08 Thread Jochem Maas
Allen McCabe schreef: > I have a shopping cart type system set up which keeps track of the cart > contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is > equal to the quantity, so the name/value pair is all the information I need. > > But sessions are unreliable on the free serv

Re: [PHP] cookies and carts

2009-12-07 Thread Paul M Foster
On Mon, Dec 07, 2009 at 02:39:28PM -0800, Allen McCabe wrote: > I have a shopping cart type system set up which keeps track of the cart > contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is > equal to the quantity, so the name/value pair is all the information I need. > > But

Re: [PHP] cookies and carts

2009-12-07 Thread Ashley Sheridan
On Mon, 2009-12-07 at 16:53 -0600, Philip Thompson wrote: > On Dec 7, 2009, at 4:46 PM, Ashley Sheridan wrote: > > > On Mon, 2009-12-07 at 16:48 -0600, Philip Thompson wrote: > >> > >> On Dec 7, 2009, at 4:40 PM, Ashley Sheridan wrote: > >> > >> > On Mon, 2009-12-07 at 14:39 -0800, Allen McCabe

Re: [PHP] cookies and carts

2009-12-07 Thread Philip Thompson
On Dec 7, 2009, at 4:46 PM, Ashley Sheridan wrote: > On Mon, 2009-12-07 at 16:48 -0600, Philip Thompson wrote: >> >> On Dec 7, 2009, at 4:40 PM, Ashley Sheridan wrote: >> >> > On Mon, 2009-12-07 at 14:39 -0800, Allen McCabe wrote: >> > >> >> I have a shopping cart type system set up which keeps

Re: [PHP] cookies and carts

2009-12-07 Thread Ashley Sheridan
On Mon, 2009-12-07 at 16:48 -0600, Philip Thompson wrote: > On Dec 7, 2009, at 4:40 PM, Ashley Sheridan wrote: > > > On Mon, 2009-12-07 at 14:39 -0800, Allen McCabe wrote: > > > >> I have a shopping cart type system set up which keeps track of the cart > >> contents using a SESSION variable, whe

Re: [PHP] cookies and carts

2009-12-07 Thread Philip Thompson
On Dec 7, 2009, at 4:40 PM, Ashley Sheridan wrote: > On Mon, 2009-12-07 at 14:39 -0800, Allen McCabe wrote: > >> I have a shopping cart type system set up which keeps track of the cart >> contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is >> equal to the quantity, so the nam

Re: [PHP] cookies and carts

2009-12-07 Thread Philip Thompson
On Dec 7, 2009, at 4:39 PM, Allen McCabe wrote: > I have a shopping cart type system set up which keeps track of the cart > contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is > equal to the quantity, so the name/value pair is all the information I need. > > But sessions are

Re: [PHP] cookies and carts

2009-12-07 Thread Ashley Sheridan
On Mon, 2009-12-07 at 14:39 -0800, Allen McCabe wrote: > I have a shopping cart type system set up which keeps track of the cart > contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is > equal to the quantity, so the name/value pair is all the information I need. > > But sessio

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 r

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

2009-03-09 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-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 > 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 c

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

2009-03-09 Thread Chetan Rane
Hi I don't think PHP stores Session information in Cookies. However It dose store the sessionId (a unique alphanumeric string) in cookies. This SessionId is used to identify the requests sent from one user. The Session information is by default stored in the /tmp directory on your system in a flat

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

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 r

Re: [PHP] Cookies are now driving me crazy....

2007-11-28 Thread Jason Pruim
On Nov 28, 2007, at 3:19 PM, Brady Mitchell wrote: On Nov 28, 2007 12:08 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: if ($res) { // now see if user's id exists in database if (mysql_num_rows($res,0) { You need another ) on that last line: if (mysql_num_rows($res,0)) { You might want to c

Re: [PHP] Cookies are now driving me crazy....

2007-11-28 Thread Daniel Brown
On Nov 28, 2007 3:19 PM, Brady Mitchell <[EMAIL PROTECTED]> wrote: > On Nov 28, 2007 12:08 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > > if ($res) { > > // now see if user's id exists in database > > if (mysql_num_rows($res,0) { > You need another ) on that last line: > > if (mysql_num_rows(

Re: [PHP] Cookies are now driving me crazy....

2007-11-28 Thread Daniel Brown
On Nov 28, 2007 3:08 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > I have some code which I'll paste at the end of the e-mail that is > throwing an error and I can't seem to find where the error is... Here > is the error: "[Wed Nov 28 15:03:19 2007] [error] PHP Parse error: > syntax error, unexpecte

Re: [PHP] Cookies are now driving me crazy....

2007-11-28 Thread Brady Mitchell
On Nov 28, 2007 12:08 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > if ($res) { > // now see if user's id exists in database > if (mysql_num_rows($res,0) { You need another ) on that last line: if (mysql_num_rows($res,0)) { You might want to consider getting an editor/ide that will higlight

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-20 Thread tedd
At 12:42 PM +0200 8/20/07, Wouter van Vliet / Interpotential wrote: Only thing I was trying to do was chip in my two cents. Again, I wasn't the one who originally asked the question and I certainly am not "friggen clueless". Maybe not, but you made some pretty clueless remarks -- like if you

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-20 Thread Wouter van Vliet / Interpotential
On 20/08/07, tedd <[EMAIL PROTECTED]> wrote: > > At 10:40 PM +0200 8/19/07, Wouter van Vliet / Interpotential wrote: > >What you're proposing, is to actually display some content on another > page > >then were the content is originally intended? I'm sorry, but I would > >consider that 'bad practice

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread tedd
At 10:40 PM +0200 8/19/07, Wouter van Vliet / Interpotential wrote: What you're proposing, is to actually display some content on another page then were the content is originally intended? I'm sorry, but I would consider that 'bad practice'. To me, it makes perfect sense that you don't want to le

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread Wouter van Vliet / Interpotential
What you're proposing, is to actually display some content on another page then were the content is originally intended? I'm sorry, but I would consider that 'bad practice'. To me, it makes perfect sense that you don't want to leave the user on the page where login was originally handled. For vario

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread tedd
At 8:52 AM +0200 8/19/07, Otto Wyss wrote: In my case I could easilly do without redirection but just exit and fall back on the calling page. Yet I want to remove the login page from the browser history. Does the header function have the same effect? O. Wyss: Instead of messing with the us

Re: [PHP] Cookies and sent headers

2007-08-19 Thread Nisse Engström
On Sat, 18 Aug 2007 17:03:35 +0200, "M. Sokolewicz" wrote: > The reason why setting cookies for you doesn't work is because of the > way a HTTP response is structured. It consists of 2 parts: header and > body separated by 2 new lines (\n\n). It is _required_ that _all_ > headers come _before_

[PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-18 Thread Otto Wyss
M. Sokolewicz wrote: emits). Now, I'm not going to go into how redirecting that way won't work (or at least shouldn't), but a hint would be to do it properly using header('Location: [...]') instead. I'm aware that using Javascript within a PHP code block doesn't seems logical yet I haven't know

Re: [PHP] Cookies and sent headers

2007-08-18 Thread Otto Wyss
M. Sokolewicz wrote: On a sidenote, 99% of the world never calls ob_flush (or any such function) since PHP flushes the buffer automatically at the end of its execution. I'll keep the ob_end_flush just for showing what's going on, but thanks for the hint. The reason why setting cookies for y

Re: [PHP] Cookies and sent headers

2007-08-18 Thread M. Sokolewicz
bullshit, what he sees is a warning emitted by PHP, his redirect is done using JavaScript (which is clientside and has no, 0.0 effect on what PHP emits). Now, I'm not going to go into how redirecting that way won't work (or at least shouldn't), but a hint would be to do it properly using head

RE: [PHP] Cookies and sent headers

2007-08-18 Thread Sanjeev N
Hi, Its not the problem of cookies. Its problem of redirection or the parent.location.replace function. I mean if you already output something on the page and tries to redirect then this problem happens. Redirect before outputting anything on the page.. like space is also an output. Warm Regards,

Re: [PHP] Cookies and sent headers

2007-08-18 Thread M. Sokolewicz
up on server documentation bastien To: php-general@lists.php.net; [EMAIL PROTECTED] Date: Sat, 18 Aug 2007 16:39:29 +0200 From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Cookies and sent headers ob_start() at the beginning and ob_end_flu

RE: [PHP] Cookies and sent headers

2007-08-18 Thread Bastien Koert
m: [EMAIL PROTECTED] > CC: [EMAIL PROTECTED]; php-general@lists.php.net > Subject: Re: [PHP] Cookies and sent headers > > ob_start() at the beginning and ob_end_flush() at the end of the PHP > section seems to do the trick albeit I've still problems to understand > why. The des

Re: [PHP] Cookies and sent headers

2007-08-18 Thread Otto Wyss
ob_start() at the beginning and ob_end_flush() at the end of the PHP section seems to do the trick albeit I've still problems to understand why. The description in the manual is rather sparse unfortunately. Is there any more information about what's going on? O. Wyss Wouter van Vliet / Interp

RE: [PHP] Cookies and sent headers

2007-08-18 Thread Bastien Koert
sessions and cookies either need to be set at the beginning of the page, or you can look into the ob_start(), ob_flush() functions to use output buffering bastien > To: php-general@lists.php.net > Date: Sat, 18 Aug 2007 11:25:54 +0200 > From: [EMAIL PRO

Re: [PHP] Cookies and sent headers

2007-08-18 Thread Wouter van Vliet / Interpotential
You best option would be to go through all of your include'd or require'd files and make sure there is no whitespace before and after you open your php tags. Those are often the cause for such problems. The easy way would indeed be to use output buffering. In that case, put the call to ob_start();

Re: [PHP] Cookies and sent headers

2007-08-18 Thread Kelvin Park
Kelvin Park wrote: Otto Wyss wrote: If built a simple login page and store any information within $_SESSION's. Yet I'd like to move these into cookies but I always get an error about sent headers. Is there a way to circumvent this problem without changing too much in the page? The setting of

Re: [PHP] Cookies & page refresh

2006-12-17 Thread Chris Shiflett
Richard Lynch wrote: > A cookie is sent BACK to the server after the server sends > it to the browser. Period. > > It's kind of like when you go to a movie, and you buy your > ticket from one person, and then you hand it to another, > and they hand it back, and then you have to be prepared to > sh

Re: [PHP] Cookies & page refresh

2006-12-15 Thread Richard Lynch
A cookie is sent BACK to the server after the server sends it to the browser. Period. It's kind of like when you go to a movie, and you buy your ticket from one person, and then you hand it to another, and they hand it back, and then you have to be prepared to show it to prove you aren't sitting

Re: [PHP] Cookies & page refresh

2006-12-12 Thread William Stokes
Thanks. It seems that I tested the right things but in a wrong order... -Will "Chris" <[EMAIL PROTECTED]> kirjoitti viestissä:[EMAIL PROTECTED] > William Stokes wrote: >> Hello, >> >> I have a page that uses session cookies for deciding what content to show >> to a visitor. User also has 2 for

Re: [PHP] Cookies & page refresh

2006-12-12 Thread Chris
William Stokes wrote: Hello, I have a page that uses session cookies for deciding what content to show to a visitor. User also has 2 form objecks to apply filters to the content SQL queries. So at the beginning of the script I set 2 cookies based on user selections(or defaults) and after that

RE: [PHP] Cookies & page refresh

2006-12-12 Thread Peter Lauri
Hi, I think it says somewhere in the documentation that the cookie values will not be available until next request/response... /Peter -Original Message- From: William Stokes [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 12, 2006 5:28 PM To: php-general@lists.php.net Subject: [PHP]

Re: [PHP] Cookies & https

2006-05-22 Thread Richard Lynch
On Mon, May 22, 2006 6:49 am, Michael Satterwhite wrote: > I have a site that is using a shared ssl certificate. When running on > the site, the host is of the form . When running in ssl > mode, > the domain is of the form ..com. ping shows that both > resolve to the same ip address. > > Is there a

Re: [PHP] Cookies & https

2006-05-22 Thread Eric Butera
On 5/22/06, Michael Satterwhite <[EMAIL PROTECTED]> wrote: I have a site that is using a shared ssl certificate. When running on the site, the host is of the form . When running in ssl mode, the domain is of the form ..com. ping shows that both resolve to the same ip address. Is there a way to c

Re: [PHP] Cookies & https

2006-05-22 Thread chris smith
On 5/22/06, Michael Satterwhite <[EMAIL PROTECTED]> wrote: I have a site that is using a shared ssl certificate. When running on the site, the host is of the form . When running in ssl mode, the domain is of the form ..com. ping shows that both resolve to the same ip address. Is there a way to c

Re: [PHP] Cookies & https

2006-05-22 Thread Stut
Michael Satterwhite wrote: I have a site that is using a shared ssl certificate. When running on the site, the host is of the form . When running in ssl mode, the domain is of the form ..com. ping shows that both resolve to the same ip address. Is there a way to create a cookie in the unsecu

Re: [PHP] Cookies in non-frame sites

2006-02-26 Thread chris smith
> Most sites today seems to be based on this style: > > include(top); > include(current_page); > include(bottom); > > If one wants to set cookies from current_page, how should that be handled > with as clean source as possible? >From the php manual: Like other headers, cookies must be sent befor

RE: [PHP] Cookies

2005-11-17 Thread Ben Miller
Hi Ben, Thursday, November 17, 2005, 3:26:04 PM, you wrote: > Is there a way to test if a user has cookies turned on or not so > that I can use cookies if the user allows them and use the URL if > the user does not allow them? Set one? :) Then check if it exists or not. This of course will not

Re: [PHP] Cookies

2005-11-17 Thread Dan McCullough
You can check on every page load, but I'm sure thats over kill for most public facing sites to catch some Yahoos who have too much time on their hands. On 11/17/05, Richard Davey <[EMAIL PROTECTED]> wrote: > Hi Ben, > > Thursday, November 17, 2005, 3:26:04 PM, you wrote: > > > Is there a way to te

Re: [PHP] Cookies

2005-11-17 Thread Robert Cummings
On Thu, 2005-11-17 at 10:33, Richard Davey wrote: > Hi Ben, > > Thursday, November 17, 2005, 3:26:04 PM, you wrote: > > > Is there a way to test if a user has cookies turned on or not so > > that I can use cookies if the user allows them and use the URL if > > the user does not allow them? > > S

Re: [PHP] Cookies

2005-11-17 Thread Richard Davey
Hi Ben, Thursday, November 17, 2005, 3:26:04 PM, you wrote: > Is there a way to test if a user has cookies turned on or not so > that I can use cookies if the user allows them and use the URL if > the user does not allow them? Set one? :) Then check if it exists or not. This of course will not

Re: [PHP] Cookies

2005-11-17 Thread Dan McCullough
Tried and true is to set a cookie and then attempt to read it, if you cant read it then cookies are not on. On 11/17/05, Ben Miller <[EMAIL PROTECTED]> wrote: > Is there a way to test if a user has cookies turned on or not so that I can > use cookies if the user allows them and use the URL if the

Re: [PHP] Cookies.

2005-08-30 Thread Nancy Ferracutti Kincaide
ws this value: 211b78tfl8umggkdh1ak7jrbf3 (a string of 26 characters long). Thank you very much, again! Nancy. - Original Message - From: "Jasper Bryant-Greene" <[EMAIL PROTECTED]> To: "php" Sent: Tuesday, August 30, 2005 8:48 AM Subject: Re: [PHP] Cookies. Nancy Ferracutti Kinca

Re: [PHP] Cookies.

2005-08-30 Thread Jasper Bryant-Greene
Nancy Ferracutti Kincaide wrote: I am trying to install a web application that tests if cookies are enabled the following way: $this->usesCookies = (isset($_COOKIE[session_name()]) && @strlen($_COOKIE[session_name()]) == 32); As it gi

Re: [PHP] Cookies

2005-02-25 Thread Chris Shiflett
--- William Stokes <[EMAIL PROTECTED]> wrote: > If I send a session cookie to browser where it is stored in WinXP? Session cookies are kept in memory. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http:

Re: [PHP] Cookies

2005-02-24 Thread Andre Dubuc
On Thursday 24 February 2005 06:34 am, Burhan Khalid wrote: > William Stokes wrote: > > Hello, > > > > If I send a session cookie to browser where it is stored in WinXP? Or is > > it stored as a separate file at all. I know that the script sends the > > cookie but I can't find it in the client comp

Re: [PHP] Cookies

2005-02-24 Thread Burhan Khalid
William Stokes wrote: Hello, If I send a session cookie to browser where it is stored in WinXP? Or is it stored as a separate file at all. I know that the script sends the cookie but I can't find it in the client computer harddrive. I am testing with Opera, IE6 and Firefox. In Firefox : Tools --

RE: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Ryan Schefke
Hi All, Please consider this topic/subject closed. There was conflict with my firewall. Ryan -Original Message- From: Hodicska Gergely [mailto:[EMAIL PROTECTED] Sent: Sunday, May 30, 2004 10:13 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] cookies malfunctioning moving from windows to

Re: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Hodicska Gergely
Hi! On the server register_globals = off. Use $_COOKIE['ID'] instead of $ID. Felho u.i. always develop with register_globals = off -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Ryan Schefke
} echo ''; ?> = WRITE value of cookie = ** PS, I also tried $_COOKIE['showpoll_ck'] when writing value...that doesn't make a difference, that's why I think it's something with the install. -Original Message

Re: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Thomas Seifert
Ryan Schefke wrote: I don't think that is it. I believe session.save_path is only for sessions, not cookies. I'm only using cookies in the application. Can someone please help? Thanks, Ryan Yeah, tell HOW you set the cookies. There is really no difference in linux/windows-php in this cases. th

RE: [PHP] cookies malfunctioning moving from windows to linux

2004-05-29 Thread Ryan Schefke
PM To: Php-General-Help; Ryan Schefke Subject: Re: [PHP] cookies malfunctioning moving from windows to linux Apache must have read and write privs on the tmp directory. >>Hi, I developed a Poll system that uses cookies. It works fine under Windows >>(Apache and MySQL), but it does not wor

Re: [PHP] cookies malfunctioning moving from windows to linux

2004-05-29 Thread Daniel Clark
Apache must have read and write privs on the tmp directory. >>Hi, I developed a Poll system that uses cookies. It works fine under Windows >>(Apache and MySQL), but it does not work properly under Linux. - I >>transitioned my site from my windows based server to a linux machine. >> >>Cookies does

Re: [PHP] Cookies

2004-04-19 Thread Jordi Canals
Fidencio Monroy wrote: Hi all, is there a way to check is a browser is accepting my cookies? Tnx Take a look to the function get_browser(), perhaps could help. Regards, Jordi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Cookies

2004-04-19 Thread Chris W. Parker
Fidencio Monroy on Monday, April 19, 2004 2:35 PM said: > Hi all, is there a way to check is a browser is accepting my cookies? yes that's easy. set the cookie and then test for it. if you can read the cookie back you're all set! if not, the person is not accepting

RE: [PHP] Cookies

2004-04-07 Thread Tyler Replogle
yes i do but here is a really good tutorial on it http://www.phpfreaks.com/tutorials/120/0.php From: "Wykis" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] Cookies Date: Fri, 2 Apr 2004 16:52:23 +0100 Does Any One Knows How To Set And Get Cookies? -- PHP General Mailing List (http://w

Re: [PHP] Cookies

2004-04-07 Thread Larry E . Ullman
Does Any One Knows How To Set And Get Cookies? The PHP manual is really good for stuff like this. Check out the setcookie() function. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cookies

2004-03-01 Thread Chris Shiflett
--- Paul Higgins <[EMAIL PROTECTED]> wrote: > Miva uses cookies, which is fine. However, the Miva pages would be > accessed by my PHP pages on the website. Therefore, the cookies have > nowhere to go. You can set cookies on the client with the Set-Cookie header or with the setcookie() function.

RE: [PHP] Cookies

2004-01-21 Thread Jay Blanchard
[snip] When I try to set a cookie, an error occurs: 'Cookie already set'. Does anybody know why this error occurs?? I don't know. [/snip] Because the cookie is already set. http://us3.php.net/manual/en/function.setcookie.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

  1   2   3   >