Re: [PHP] Setcookie()

2008-10-13 Thread Ben Stones
Hi, My problem was a headers already sent error, which I fixed by redirecting the form POST to a seperate file instead of the same login.php. Thanks for all your help! 2008/10/13 Stut <[EMAIL PROTECTED]> > On 12 Oct 2008, at 23:51, Micah Gersten wrote: > >> The question is, why aren't you using

Re: [PHP] Setcookie()

2008-10-13 Thread Stut
On 12 Oct 2008, at 23:51, Micah Gersten wrote: The question is, why aren't you using a session variable instead of cookies? That's one of the greatest features of PHP. If you're able to use cookies instead of sessions, and the size of the data you're storing is fairly small, it's always bett

Re: [PHP] Setcookie()

2008-10-12 Thread Micah Gersten
The question is, why aren't you using a session variable instead of cookies? That's one of the greatest features of PHP. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ben Stones wrote: > What I mean is I cannot use setcookie, I need to check if user creden

Re: [PHP] Setcookie()

2008-10-12 Thread Bastien Koert
On Sat, Oct 11, 2008 at 12:33 PM, Per Jessen <[EMAIL PROTECTED]> wrote: > Ben Stones wrote: > > > What I mean is I cannot use setcookie, I need to check if user > > credentials are correct first (which is BEFORE setcookie) and if so, > > set a cookie. I can't do that unless setcookie is first, but

Re: [PHP] Setcookie()

2008-10-11 Thread Per Jessen
Ben Stones wrote: > What I mean is I cannot use setcookie, I need to check if user > credentials are correct first (which is BEFORE setcookie) and if so, > set a cookie. I can't do that unless setcookie is first, but I need to > check if the user credentials is correct. Furthermore I cannot use >

Re: [PHP] Setcookie()

2008-10-11 Thread Ben Stones
What I mean is I cannot use setcookie, I need to check if user credentials are correct first (which is BEFORE setcookie) and if so, set a cookie. I can't do that unless setcookie is first, but I need to check if the user credentials is correct. Furthermore I cannot use setcookie in the header as I

Re: [PHP] Setcookie()

2008-10-11 Thread Per Jessen
Ben Stones wrote: > I'm using cookies for my website script and upon users logging in a > cookie is set. Problem for me is that the cookie doesn't work due to > headers already sent. Is there anyway of fixing this because, there is > no possible way of adding setcookie() to the top of the PHP file

[PHP] Setcookie()

2008-10-11 Thread Ben Stones
Hi, I'm using cookies for my website script and upon users logging in a cookie is set. Problem for me is that the cookie doesn't work due to headers already sent. Is there anyway of fixing this because, there is no possible way of adding setcookie() to the top of the PHP file when the cookie is ho

Re: [PHP] setcookie

2008-03-12 Thread Ray Hauge
Wolf wrote: Tim Daff wrote: Hi, I am learning PHP, I am trying to set a simple cookie: Cookies Firefox is returning this error: Warning: Cannot modify header information - headers already sent by (output started at /Users/Daff/Sites/php

Re: [PHP] setcookie

2008-03-12 Thread Wolf
Tim Daff wrote: Hi, I am learning PHP, I am trying to set a simple cookie: Cookies Firefox is returning this error: Warning: Cannot modify header information - headers already sent by (output started at /Users/Daff/Sites/php_sandbox/c

Re: [PHP] setcookie

2008-03-12 Thread Richard Heyes
Firefox is returning this error: Warning: Cannot modify header information - headers already sent by (output started at /Users/Daff/Sites/php_sandbox/cookies.php:7) in /Users/Daff/Sites/php_sandbox/cookies.php on line 7 You must use set cookie() before you send any output to the browser, inc

[PHP] setcookie

2008-03-12 Thread Tim Daff
Thank's for your help Zareef, Hiep, Shiplu and Jean-Christophe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setcookie

2008-03-12 Thread Zareef Ahmed
As a dirty trick you can put following line on the top of your script, it will work ob_start(); But you should try to know why it is not working, and what exactly ob_start will impact your application and What is the thing called "Output Buffering". Zareef Ahmed On 3/12/08, Hiep Nguyen <[EMAIL P

Re: [PHP] setcookie

2008-03-12 Thread Shiplu
Daff <[EMAIL PROTECTED]> > To: php-general@lists.php.net > Sent: Wednesday, March 12, 2008 8:48:59 AM > Subject: [PHP] setcookie > > Hi, > > I am learning PHP, I am trying to set a simple cookie: > > > >Cookies > > > > >

Re: [PHP] setcookie

2008-03-12 Thread Hiep Nguyen
On Wed, 12 Mar 2008, Tim Daff wrote: Hi, I am learning PHP, I am trying to set a simple cookie: Cookies time()+(60*60*24*7)); ?> Firefox is returning this error: Warning: Cannot modify header information - headers alr

Re: [PHP] setcookie

2008-03-12 Thread Jean-Christophe Roux
f <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Wednesday, March 12, 2008 8:48:59 AM Subject: [PHP] setcookie Hi, I am learning PHP, I am trying to set a simple cookie: Cookies Firefox is returning this error: Warn

[PHP] setcookie

2008-03-12 Thread Tim Daff
Hi, I am learning PHP, I am trying to set a simple cookie: Cookies Firefox is returning this error: Warning: Cannot modify header information - headers already sent by (output started at

RE: [PHP] SETCOOKIE

2006-08-14 Thread Richard Lynch
On Sun, August 13, 2006 2:20 am, Peter Lauri wrote: > [snip] > > On Sat, August 12, 2006 8:00 am, Peter Lauri wrote: >> When you just use time() you tell the cookie to just live until now, >> so it >> dies directly. You have to add some seconds to determine how long >> the >> cookie >> will live. >

RE: [PHP] SETCOOKIE

2006-08-13 Thread Peter Lauri
[snip] On Sat, August 12, 2006 8:00 am, Peter Lauri wrote: > When you just use time() you tell the cookie to just live until now, > so it > dies directly. You have to add some seconds to determine how long the > cookie > will live. Unfortunately, no... The above solution relies on the USER compu

RE: [PHP] SETCOOKIE

2006-08-12 Thread Richard Lynch
On Sat, August 12, 2006 8:00 am, Peter Lauri wrote: > When you just use time() you tell the cookie to just live until now, > so it > dies directly. You have to add some seconds to determine how long the > cookie > will live. Unfortunately, no... The above solution relies on the USER computer cloc

Re: [PHP] SETCOOKIE

2006-08-12 Thread Al
To: PHP Subject: [PHP] SETCOOKIE Hi List, I want to set the cookie in which that cookie would be deleted automatically as visitor closes the browser. I have read an article from www.php.net/manual/en/function.setcookie and it is told me that we can set that cookie by unset the value time, but it

RE: [PHP] SETCOOKIE

2006-08-12 Thread Peter Lauri
When you just use time() you tell the cookie to just live until now, so it dies directly. You have to add some seconds to determine how long the cookie will live. /Peter -Original Message- From: BBC [mailto:[EMAIL PROTECTED] Sent: Saturday, August 12, 2006 7:48 PM To: PHP Subject: [PHP

[PHP] SETCOOKIE

2006-08-12 Thread BBC
Hi List, I want to set the cookie in which that cookie would be deleted automatically as visitor closes the browser. I have read an article from www.php.net/manual/en/function.setcookie and it is told me that we can set that cookie by unset the value time, but it doesn't work. Example: Setcooki

Re: [PHP] setcookie security concerns

2006-03-15 Thread tedd
An interesting question in this case is how to do an injection using cookies, injection attacks are generally performed using post & get data as they can be inserted to a link on another page. Getting a working exploit would probably come down to how the browser implemented the cookie security; w

Re: [PHP] setcookie security concerns

2006-03-15 Thread David Tulloh
>> >> If this is the value directly from the cookie, it's an example of a >> cross-site scripting (XSS) vulnerability. >> >>> header("Location: $HTTP_REFERER"); >> >> >> This is an HTTP response splitting vulnerability, because the Referer >> header (like the Cookie header) is provided by the clie

Re: [PHP] setcookie security concerns

2006-03-14 Thread tedd
tedd wrote: It's not entirely clear from this example, but am I correct in assuming that $thestyle is the same as $_COOKIE['thestyle'] in this case? In other words, are you relying on register_globals or assigning the value yourself? If this is the value directly from the cookie, it's an

Re: [PHP] setcookie security concerns

2006-03-14 Thread Chris Shiflett
tedd wrote: It's not entirely clear from this example, but am I correct in assuming that $thestyle is the same as $_COOKIE['thestyle'] in this case? In other words, are you relying on register_globals or assigning the value yourself? If this is the value directly from the cookie, it's an

Re: [PHP] setcookie security concerns

2006-03-14 Thread Gerry Danen
Which "someone" could do this, is another question I have. The user? He's do something to his own computer, no? Gerry On 3/14/06, tedd <[EMAIL PROTECTED]> wrote: > > Hi: > > I've been using a php style switcher allowing users to change css. > The code follows: > > Within the head tags. > > > > W

Re: [PHP] setcookie doesn't save session properly

2005-12-16 Thread comex
> I'm using > setcookie($sessionName, $sessionid, time()+60*60*24*1, > $sessionCookie['path'], $sessionCookie['domain'], > $sessionCookie['secure']); > > to, obviously, store a session. > Also, I only use session_start() so perhaps I'm supposed to call > session_id()? I'm not sure why the cook

[PHP] setcookie doesn't save session properly

2005-12-16 Thread nhiemenz
I'm using setcookie($sessionName, $sessionid, time()+60*60*24*1, $sessionCookie['path'], $sessionCookie['domain'], $sessionCookie['secure']); to, obviously, store a session. The problem is that this always times out after 24 hours, and I can't figure out why. Is there something I'm missing? ie

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Richard Lynch
On Thu, October 6, 2005 9:11 am, Brian Dunning wrote: > I'm trying to setcookie('username',$username,15552000) but on > subsequent pages $_COOKIE('username') is always null. > > I verified that I'm setting it before any other output is sent to the > browser. I verified that $username does have some

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
D'Oh! You guys are absolutely right. I was trying to go for 6 months, which works now if I say time()+15552000 instead of 15552000. And the documentation shows that exactly - apparently I read right over it, even though I studied it minutely before posting. Oh well...my wife would have the

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread tg-php
Good catch, Chris. I was wondering about that myself but hadn't taken the time to see if setcookie() used regular serial time or if cookies had another time standard. echo date("m/d/Y h:i:s", 15552000); 06/29/1970 08:00:00 That's what I get. -TG = = = Original message = = = Unless I'm mist

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Chris
Unless I'm mistaken, you appear to be setting the Expiration date of the cookie to "Mon, 29 Jun 1970 17:00:00 -0700". Which would cause the cookie to be unset, if it were already set, and do nothing otherwise. Chris Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000)

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
On Oct 6, 2005, at 7:28 AM, John Nichel wrote: Is that just a typo? It should be $_COOKIE['username'] Oops, yes, that was my typo in the email - it is correctly $_COOKIE ['username'] in the code. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread John Nichel
Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. Is that just a typo? It should be $_COOKIE['username'] -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Larry E. Ullman
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm t

[PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm t

[PHP] setcookie ???

2005-04-06 Thread Ken
On Apr 6, 2005 2:30 PM, William Stokes <[EMAIL PROTECTED]> wrote: > > This doesn't set the cookie? Can you see why? I can't... > > $showbrowseteam = 'somejargon'; > setcookie("showbrowseteam","$showbrowseteam",0,"/"); > > Thanks > -will > > -- > PHP General Mailing List (http://www.php.net/) >

[PHP] setcookie ???

2005-04-06 Thread William Stokes
This doesn't set the cookie? Can you see why? I can't... $showbrowseteam = 'somejargon'; setcookie("showbrowseteam","$showbrowseteam",0,"/"); Thanks -will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setcookie issue

2005-03-27 Thread Chris Shiflett
John Hinton wrote: The thing is, on the next action switch print_r($_COOKIE); returns empty until I refresh the browser. So, thusly, the second page load brings in the cookies. $_COOKIES is a convenient array that contains the contents of the Cookie header, nicely parsed. Whenever you set a cooki

Re: [PHP] setcookie issue

2005-03-26 Thread John Hinton
Chris Shiflett wrote: John Hinton wrote: Seems my old setcookie scripts are busted in php with globals off. Use $_COOKIES['name']. Chris The thing is, on the next action switch print_r($_COOKIE); returns empty until I refresh the browser. So, thusly, the second page load brings in the cookies. A

Re: [PHP] setcookie issue

2005-03-26 Thread Chris Shiflett
John Hinton wrote: Seems my old setcookie scripts are busted in php with globals off. Use $_COOKIES['name']. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] setcookie issue

2005-03-26 Thread John Hinton
Seems my old setcookie scripts are busted in php with globals off. --begin code-- # LOGIN PAGE ### function login(){ include ('config.php'); $query = "SELECT * FROM atable"; $result = mysql_db_q

Re: [PHP] setcookie

2005-03-04 Thread Randy Johnson
The period was the issue all together, i took the extra out and it worked. Thanks for your help Randy Randy Johnson wrote: ok I see how that could be an issue. Here is my big problem that I have not been able to figure out. I have a client website that I am trying to fix 1. it has sessions in

Re: [PHP] setcookie

2005-03-04 Thread Randy Johnson
ok I see how that could be an issue. Here is my big problem that I have not been able to figure out. I have a client website that I am trying to fix 1. it has sessions in database, and uses set cookie 2. I can login with firefox/netscape/mozilla just fine 3. I cannot login with any version of IE

Re: [PHP] setcookie

2005-03-04 Thread Marek Kilimajer
Randy Johnson wrote: setcookie( "sess_key",$key,0,"/","." . str_replace( "www","",$_SERVER["SERVER_NAME"] ),0 ); Does that look right? No. if $_SERVER["SERVER_NAME"] == 'www.domain.com' "." . str_replace("www","",$_SERVER["SERVER_NAME"] ) will give you "..domain.com" -- PHP General Mailing List (

[PHP] setcookie

2005-03-04 Thread Randy Johnson
setcookie( "sess_key",$key,0,"/","." . str_replace( "www","",$_SERVER["SERVER_NAME"] ),0 ); Does that look right? Thanks! Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setcookie command

2005-01-24 Thread Richard Lynch
Reza Milan wrote: > Dear sir, > > When I use setcookie command I recieve the following message error: > > Warning: Cannot modify header information - headers already sent by > (output started at C:\Inetpub\wwwroot\test.php:9) in > C:\Inetpub\wwwroot\test.php on line 15 > > WinXp - IE 6 > On Localho

Re: [PHP] setcookie command

2005-01-24 Thread Greg Donald
On Mon, 24 Jan 2005 07:24:19 -0800 (PST), Reza Milan <[EMAIL PROTECTED]> wrote: > Dear sir, > > When I use setcookie command I recieve the following message error: > > Warning: Cannot modify header information - headers already sent by (output > started at C:\Inetpub\wwwroot\test.php:9) in C:\In

[PHP] setcookie command

2005-01-24 Thread Reza Milan
Dear sir, When I use setcookie command I recieve the following message error: Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\wwwroot\test.php:9) in C:\Inetpub\wwwroot\test.php on line 15 WinXp - IE 6 On Localhost and Server Thanks Reza M

Re: [PHP] Setcookie doenn't work

2004-09-24 Thread pete M
doh!! ta ;-) S ilvio Porcellana wrote: $ok = setcookie("client_id", "argh", 259300); //* expire in a month ish Nope, it expired a long time ago... :-) Read the manual for setcookie: http://php.libero.it/manual/en/function.setcookie.php (mainly the part about the "expire" parameter) HTH, cheers Silv

Re: [PHP] Setcookie doenn't work

2004-09-24 Thread Silvio Porcellana
> > $ok = setcookie("client_id", "argh", 259300); //* expire in a month ish > Nope, it expired a long time ago... :-) Read the manual for setcookie: http://php.libero.it/manual/en/function.setcookie.php (mainly the part about the "expire" parameter) HTH, cheers Silvio -- PHP General Mailing Lis

[PHP] Setcookie doenn't work

2004-09-24 Thread pete M
I've got this function in a class object, however the cookie does not set even though £ok returns true !!! I've got cookies enables on all my borswers (firefox, mozilla, opera , IE).. any ideas !! function updateClient($arr){ extract($arr); //print_r($arr); $sql = "update clients set n

RE: [PHP] Setcookie variable use issue after moving php app to di fferent server

2004-08-27 Thread Shapiro, David
[mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 7:20 PM To: '[EMAIL PROTECTED]' Subject: Re: [PHP] Setcookie variable use issue after moving php app to di fferent server * Thus wrote Shapiro, David: > You certainly know your stuff. Unfortunatley, it says that is uses &

RE: [PHP] Setcookie variable use issue after moving php app to di fferent server

2004-08-27 Thread Shapiro, David
verify everything works. I just don't get what the problem is with this not working. David -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 12:08 PM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setc

Re: [PHP] Setcookie variable use issue after moving php app to di fferent server

2004-08-26 Thread Curt Zirzow
* Thus wrote Shapiro, David: > You certainly know your stuff. Unfortunatley, it says that is uses > /etc/php.ini, which I did modify, but it also reports register_globals as > still off too. It does show a scan dir for additional .ini files > (/etc/php.d and additional ini files parsed as ldap.in

RE: [PHP] Setcookie variable use issue after moving php app to di fferent server

2004-08-26 Thread Shapiro, David
Yes, I am afraid so. Both are marked as off. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 12:08 PM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to

Re: [PHP] Setcookie variable use issue after moving php app to different server

2004-08-26 Thread John Holmes
From: "Shapiro, David" <[EMAIL PROTECTED]> You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as l

RE: [PHP] Setcookie variable use issue after moving php app to di fferent server

2004-08-26 Thread Shapiro, David
iro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: "Shapiro, David" <[EMAIL PROTECTED]> > Thanks for pointing in the hopefully the right direction. I see in > /etc/php.ini the fol

Re: [PHP] Setcookie variable use issue after moving php app to different server

2004-08-26 Thread John Holmes
From: "Shapiro, David" <[EMAIL PROTECTED]> Thanks for pointing in the hopefully the right direction. I see in /etc/php.ini the following: ; - register_globals = Off [Security, Performance] I put below this line: register_globals = On And I restarted apache. However, it did not seem to res

RE: [PHP] Setcookie variable use issue after moving php app to di fferent server

2004-08-26 Thread Shapiro, David
(ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David > We are trying to move our php app to a different server. > For some reason, when we type in the login/password/ account number > info and click submit, it does not se

Re: [PHP] Setcookie variable use issue after moving php app to different se rver

2004-08-26 Thread raditha dissanayake
your message is multipart/alternative - please do not send them to mailing lists. your signatue should have '--' on a line before it's start. you might want to read the newby guide and try again. Shapiro, David wrote: Hello, We are trying to move our php app to a different server. For some r

Re: [PHP] Setcookie variable use issue after moving php app to different server

2004-08-26 Thread John Holmes
From: Shapiro, David We are trying to move our php app to a different server. For some reason, when we type in the login/password/ account number info and click submit, it does not seem to set the variables. The magic 8-ball says register_globals is OFF on the new server... ---John Holmes... -

[PHP] Setcookie variable use issue after moving php app to different se rver

2004-08-26 Thread Shapiro, David
Hello,   We are trying to move our php app to a different server.  For some reason, when we type in the login/password/account number info and click submit, it does not seem to set the variables.   The webpage portion that collects the login/password/account looks like the following:  

RE: [PHP] setcookie statements are giving me error

2004-04-14 Thread Ryan Schefke
ROTECTED] Sent: Wednesday, April 14, 2004 3:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] setcookie statements are giving me error * Thus wrote Ryan Schefke ([EMAIL PROTECTED]): > > cannot modify header errors, which tells me there's nothing wrong with my > main script. Am I doing some

Re: [PHP] setcookie statements are giving me error

2004-04-14 Thread Curt Zirzow
* Thus wrote Ryan Schefke ([EMAIL PROTECTED]): > > cannot modify header errors, which tells me there's nothing wrong with my > main script. Am I doing something wrong with cookies here? > > "Warning: Cannot modify header information - headers already sent by." You're missing the most import

[PHP] setcookie statements are giving me error

2004-04-14 Thread Ryan Schefke
I'm trying to set multiple cookies and getting the error below. I removed all of the white spaces and extra lines before and after my , so, that shouldn't be an issue. I get the error for each cookie and it echoes back as "...cookie not set" like I coded. This is the code chunk I'm trying to r

RE: [PHP] setcookie on PHP??

2003-02-12 Thread Daniel Masson
] Asunto: [PHP] setcookie on PHP?? I need to set a cookie within a document in PHP? setcookie didn't work. I guess it works only in PHP3 & PHP4 Any good ideas?? Thanks Rave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PH

[PHP] setcookie on PHP??

2003-02-12 Thread Balaravi, Bala (Ravi), ALABS
I need to set a cookie within a document in PHP? setcookie didn't work. I guess it works only in PHP3 & PHP4 Any good ideas?? Thanks Rave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setcookie() in various browsers.. 3rd followup.. anyone?

2003-02-11 Thread Peter Janett
//www.newmediaone.net webmaster "at" newmediaone.net (303)828-9882 - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 10:14 PM Subject: Re: [PHP] setcookie() in various browsers.. 3rd followu

Re: [PHP] setcookie() in various browsers.. 3rd followup.. anyone?

2003-02-11 Thread Jason Wong
On Wednesday 12 February 2003 05:44, Chad Day wrote: > This is with PHP 4.2 and register_globals off. > > I am setting cookies and starting a session in the following fashion: > > setcookie("EMAILADDR", $row[EMAIL], time()+2592000, '/', ".$dn"); > > where $dn = mydomain.com > > I want the cookies a

RE: [PHP] setcookie() in various browsers.. 3rd followup.. anyone?

2003-02-11 Thread Chad Day
This is with PHP 4.2 and register_globals off. I am setting cookies and starting a session in the following fashion: setcookie("EMAILADDR", $row[EMAIL], time()+2592000, '/', ".$dn"); where $dn = mydomain.com I want the cookies accessible sitewide .. at www.mydomain.com, mydomain.com, forums.myd

RE: [PHP] setcookie() in various browsers..

2003-02-10 Thread Chad Day
Following up from Friday.. no replies over the weekend.. can anyone help? Thanks, Chad -Original Message- From: Chad Day [mailto:[EMAIL PROTECTED]] Sent: Friday, February 07, 2003 3:02 PM To: php general Subject: [PHP] setcookie() in various browsers.. This is with PHP 4.2 and

[PHP] setcookie() in various browsers..

2003-02-07 Thread Chad Day
This is with PHP 4.2 and register_globals off. I am setting cookies and starting a session in the following fashion: setcookie("EMAILADDR", $row[EMAIL], time()+2592000, '/', ".$dn"); where $dn = mydomain.com I want the cookies accessible sitewide .. at www.mydomain.com, mydomain.com, forums.myd

[PHP] setcookie function

2003-01-23 Thread Sukrit
Hi listers, I have some webspace on a Unix server running apache. Things look like this there: Path to dir with files - /home/username/public_html/ URL - www.somesite.net/~username setcookie("id",$randval,time()+3600,"Q1","Q2",0); What do I plug into Q1 and Q2? I want to set cookie for only my

Re: [PHP] Setcookie() and header()

2003-01-14 Thread Michael Sims
On Wed, 15 Jan 2003 01:36:26 -0500, you wrote: >Wow. You hit the nail on the head. :) Well, I spent a good day or two hunting the problem down the first time I ran across it. Spending that much time on something tends to make it stick in your head. :) >I installed PHP on IIS via the executabl

RE: [PHP] Setcookie() and header()

2003-01-14 Thread J. Alden Gillespy
Accidentally replied to sender instead of list -- Wow. You hit the nail on the head. :) I installed PHP on IIS via the executable, so I gather I have one of two choices: -- Research your article and see how to work around the problem OR -- Use ISAPI. (how d

Re: [PHP] Setcookie() and header()

2003-01-14 Thread Michael Sims
On Tue, 14 Jan 2003 22:34:49 -0700, you wrote: >Unless I am mistaken, the typical behavior for most browsers is exactly >as you described. Which is due to the browser receiving a Location >header and acting on it, disregarding any other headers. (ex: >cache/no-cache, cookies, etc) > >Anybody c

Re: [PHP] Setcookie() and header()

2003-01-14 Thread Jason k Larson
Unless I am mistaken, the typical behavior for most browsers is exactly as you described. Which is due to the browser receiving a Location header and acting on it, disregarding any other headers. (ex: cache/no-cache, cookies, etc) Anybody care to prove me wrong? While not the best route, you

[PHP] Setcookie() and header()

2003-01-14 Thread J. Alden Gillespy
After I set a cookie and then send a redirect header, the cookie doesn't show up, but the browser successfully redirects. setcookie("test", "blahblah", time() + 1440); header("Location: http://www.mywebsite.com/login.php";); However, if I take out the header() statement, then the cookie is succes

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
machine generated xml privacy statement, >then stability with regards >to cookies is not guaranteed. Do a search and read up about it. Check out >w3c's site. > >- Original Message - >From: "Javier Montserat" <[EMAIL PROTECTED]> >To: <[EMAIL PROTEC

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Gregory Barker
From: "Javier Montserat" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 29, 2002 1:39 PM Subject: [PHP] setcookie IE6 problem > I'm setting a session cookie with the following code - > > function setSessionCookie(){ >$expires = time

[PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
I'm setting a session cookie with the following code - function setSessionCookie(){ $expires = time()+$this->session_expires; $issetCookie = setcookie("$this->cookiename", "$this->sess_id", "$expires", "/",

[PHP] setcookie() failure

2002-08-26 Thread Tony Harrison
Can anyone tell me why the following setcookie()s fail? - Tabzilla.com -- - [EMAIL PROTECTED] http://www.cool-palace.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] setcookie question

2002-07-27 Thread Gaylen Fraley
I need to create a cookie that is accessible from more than 1 application, but on the same server. What would be the proper syntax? What I tried was setcookie ("myCookie","$cookie_value",$timeToExpire,'/'); Right or wrong or impossible? Should I not have used the "/"? Thanks. -- Gaylen PHP K

Re: [PHP] setcookie then redirect

2002-07-10 Thread Chris Shiflett
David Busby wrote: > List, > I'm trying to set a cookie like this: > function redirect() { > if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) { > $to = func_get_arg(0); > header("HTTP/1.1 301\n"); > header("Location:http://".$_SERVER['SERVER_NAME'].$to."\n");

Re: [PHP] setcookie then redirect + Answer

2002-07-10 Thread David Busby
Read your data from $_COOKIE not $_COOKIES. David Busby wrote: > List, > I'm trying to set a cookie like this: > function redirect() { > if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) { > $to = func_get_arg(0); > header("HTTP/1.1 301\n"); > header("Location

[PHP] setcookie then redirect

2002-07-10 Thread David Busby
List, I'm trying to set a cookie like this: http://".$_SERVER['SERVER_NAME'].$to."\n"); header("Set-Cookie: sid=$sid;\n\n"); exit(); } } function login() { [... validation code here ...] // set my cookie setcookie("sid", $sid);

[PHP] setcookie(), logout

2002-06-21 Thread Pushkar Pradhan
I'm going over some code handed to me, a logout function: function user_logout() { setcookie( 'user_name', '',(time()+28800), '/', '',0); setcookie( 'id_hash', '',(time()+28800), '/', '',0); } Doesn't this mean the cookie will expire after 8 hrs? So what's this really doing? Moreover I fou

Re: [PHP] setcookie()

2002-05-12 Thread Olexandr Vynnychenko
Hello jtjohnston, Saturday, May 11, 2002, 11:42:52 PM, you wrote: j> This is a bug "Feature/Change Request" I made to: j> http://bugs.php.net/bug.php?id=17158 j> setcookie() states "cookies must be sent before any other headers j> are sent (this is a restriction of cookies, not PHP). j> I argu

Re: [PHP] setcookie()

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, jtjohnston wrote: > This is a bug "Feature/Change Request" I made to: > http://bugs.php.net/bug.php?id=17158 > > setcookie() states "cookies must be sent before any other headers > are sent (this is a restriction of cookies, not PHP). > > I argue this is a restriction of PHP

RE: [PHP] setcookie()

2002-05-11 Thread Mark Charette
You've just pointed out that you're a clueless newbie, that's' all, and can't read a spec worth a whit. -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 11, 2002 4:50 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] setcookie() Ra

Re: [PHP] setcookie()

2002-05-11 Thread Rasmus Lerdorf
And you can do so if you turn on output buffering. Having PHP send off JavaScript to do this is a massive hack that has no place in PHP. Write your own setcookie wrapper function if that is what you want. -Rasmus On Sat, 11 May 2002, jtjohnston wrote: > Rasmus > server-side / client-side, tha

Re: [PHP] setcookie()

2002-05-11 Thread jtjohnston
If the issue has pissed you off in tha past, complain. Vote: http://bugs.php.net/bug.php?id=17158 > Rasmus > server-side / client-side, that's not the point. > > My point is PHP can, could and should be able to set a cookie after HTML is > set. > But of course, Jan has already closed the issue,

Re: [PHP] setcookie()

2002-05-11 Thread jtjohnston
Rasmus server-side / client-side, that's not the point. My point is PHP can, could and should be able to set a cookie after HTML is set. But of course, Jan has already closed the issue, as usual. http://bugs.php.net/bug.php?id=17158 > PHP is a server-side language and as such it deals with se

Re: [PHP] setcookie()

2002-05-11 Thread Rasmus Lerdorf
PHP is a server-side language and as such it deals with server-side issues. If you want to write javascript that sets a client-side Javascript cookie, go ahead. It has nothing to do with PHP and PHP will certainly not get in your way. -Rasmus On Sat, 11 May 2002, jtjohnston wrote: > This is a

[PHP] setcookie()

2002-05-11 Thread jtjohnston
This is a bug "Feature/Change Request" I made to: http://bugs.php.net/bug.php?id=17158 setcookie() states "cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP). I argue this is a restriction of PHP, not cookies. Here is my proof: http://www.college

RE: [PHP] setcookie() in 4.2.0

2002-05-11 Thread Matthew Walker
OTECTED]] Sent: Saturday, May 11, 2002 6:35 AM To: [EMAIL PROTECTED] Subject: [PHP] setcookie() in 4.2.0 The following code doesn't work properly on PHP 4.1: Blah, blah"; setcookie("kuku", "abc"); setcookie("lala", "def"); setcookie("zuzu", "

[PHP] setcookie() in 4.2.0

2002-05-11 Thread Olexandr Vynnychenko
The following code doesn't work properly on PHP 4.1: Blah, blah"; setcookie("kuku", "abc"); setcookie("lala", "def"); setcookie("zuzu", "ghi"); ?> Because I wrote echo statement before setcookie. But it works on PHP 4.2. Is it due to "output_buffering=4096" directive in php.ini? -- Best regard

  1   2   >