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

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 a

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

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

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

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: 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-03-12 Thread Jean-Christophe Roux
body ?php setcookie('test', 45, time()+(60*60*24*7)); ? from the doc: Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser. This is the same limitation that header() has. http://ca.php.net/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: html head titleCookies/title /head body ?php setcookie('test', 45, time()+(60*60*24*7)); ? /body /html Firefox is returning

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,

Re: [PHP] setcookie

2008-03-12 Thread Wolf
Tim Daff wrote: Hi, I am learning PHP, I am trying to set a simple cookie: html head titleCookies/title /head body ?php setcookie('test', 45, time()+(60*60*24*7)); ? /body /html Firefox is returning this error: Warning: Cannot modify header

Re: [PHP] setcookie

2008-03-12 Thread Shiplu
Even you cant put a space before ?php tag. the following code will throw the same error. | ?php | setcookie(); | ? Because I prepend a space for each line But this will be okay |?php | setcookie(); | ? This is a very common mistake and very very hard to find. On Wed, Mar 12, 2008 at 7:53 AM,

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: html head titleCookies/title /head body ?php setcookie('test', 45, time()+(60*60*24*7)); ? /body /html Firefox is returning this error: Warning: Cannot

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

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 computer

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:

Re: [PHP] SETCOOKIE

2006-08-12 Thread Al
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. /Peter -Original Message- From: BBC [mailto:[EMAIL PROTECTED] Sent: Saturday, August 12, 2006 7:48 PM

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 clock

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 client. Future versions

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;

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

Re: [PHP] setcookie security concerns

2006-03-14 Thread Chris Shiflett
tedd wrote: link rel=stylesheet type=text/css media=screen href=?php echo (!$thestyle)?'style1':$thestyle ?.css 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

Re: [PHP] setcookie security concerns

2006-03-14 Thread tedd
tedd wrote: link rel=stylesheet type=text/css media=screen href=?php echo (!$thestyle)?'style1':$thestyle ?.css 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

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

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

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. snip Is that just a typo? It should be $_COOKIE['username'] -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing

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:

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

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

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

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.

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 (http://www.php.net/) To

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

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

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

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 List

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

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

2004-08-27 Thread Shapiro, David
to 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] Setcookie

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 /etc/php.ini, which

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

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

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 seem to set

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

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

2004-08-26 Thread Shapiro, 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 following: ; - register_globals = Off

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

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

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.ini,

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 important

RE: [PHP] setcookie statements are giving me error

2004-04-14 Thread Ryan Schefke
, 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 something wrong with cookies here

RE: [PHP] setcookie on PHP??

2003-02-12 Thread Daniel Masson
Send some pieces of code. Daniel E Massón. Ingeniero de desarrollo [EMAIL PROTECTED] Imagine S.A. Su Aliado Efectivo en Internet www.imagine.com.co (57 1)2182064 - (57 1)6163218 Bogotá - Colombia - Soluciones web para

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,

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 accessible

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

2003-02-11 Thread Peter Janett
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 followup.. anyone? On Wednesday 12 February 2003 05:44, Chad Day wrote: This is with PHP 4.2

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

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

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 care

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

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

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Gregory Barker
MS has introduced p3p policy in IE6 which has impacted on cookies etc. If the site or host does not have a 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:

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
Thanks for the reply, a little more info below... Speaking of cookies, any general thoughts on the relative merits of using php's setcookie function vs. setting a cookie with a header() call? Are both methods equal? Will do more research later and post anything interesting on the IE6

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: ?php function redirect() { if ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_NAME']) { $to = func_get_arg(0); header(HTTP/1.1 301\n);

Re: [PHP] setcookie then redirect

2002-07-10 Thread Chris Shiflett
David Busby wrote: List, I'm trying to set a cookie like this: ?php 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()

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

RE: [PHP] setcookie() in 4.2.0

2002-05-11 Thread Matthew Walker
Yes. Output buffering is good. Some people will say that you shouldn't use it, but should make sure to write all your code so that there can't be any output before any headers need to be sent. I disagree with this. While a good idea in principle, in practice it is all but impossible to keep

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

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

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

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,

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() Rasmus server-side / client

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

Re: [PHP] Setcookie problems...

2002-04-24 Thread Erik Price
On Wednesday, April 24, 2002, at 03:27 PM, Pusta wrote: When we are setting a cookie in a PHP page, that cookie cannot be accessed by any page in a different folder. When we move the pages into the same folder, the cookies worked fine. Can anyone shed some light on this?? Is the

RE: [PHP] Setcookie problems...

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)
for more: www.php.net/setcookie Sincerely, Maxim Maletsky Founder, Chief Developer www.PHPBeginner.com // where PHP Begins -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 9:32 PM To: Pusta Cc: [EMAIL PROTECTED] Subject: Re: [PHP

Re: [PHP] setcookie with array (was serialize)

2002-03-28 Thread Jason Wong
On Thursday 28 March 2002 23:25, Rodrigo Peres wrote: Hi list, Regarding my last post about serialize, I've tried many things but couldn't make it function. I'm trying to store the data from a form in order to allow my user to stop the process of filling the form and retrieve later what

Re: [PHP] setcookie with array (was serialize)

2002-03-28 Thread Miguel Cruz
On Thu, 28 Mar 2002, Rodrigo Peres wrote: if(isset($submit)) { $x = addslashes($HTTP_POST_VARS); $y = serialize($x); setcookie(posted,$y) } 1) You probably should call serialize on the array to turn it into a string before trying any string transformations like addslashes. If

Re: [PHP] setcookie()

2002-01-06 Thread Casey Allen Shobe
Here's a compilation of some recent conclusions I've gotten from the same discussion: This is how I chose to set the variables: // $username and $password are passed from a previous page's form. $time = mktime()+1800; $date = gmdate(D, d-M-Y H:i:s, ($time)); $password = md5 ($password);

Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 Netscape!

2001-11-27 Thread Shane Wright
Oh yeah, about the lifetime of the cookie - with no valid expiry time it is created as a session cookie - which is supposed to only live as long as the browser does. [opening a new independent browser window does not share the session, but window.open() calls do, as do other 'browser created

Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 Netscape!

2001-11-27 Thread Casey Allen Shobe
On 29 December 2001 13:35, Kris Wilkinson spaketh unto ye recipient: setcookie (myCookie,Blah,time()+7201); For some reason, you must specify the domain, and make sure you use *exact* formatting on the time, including the GMT suffix. I gave up on setcookie and started using this: $date =

Re: [PHP] SetCookie return

2001-11-10 Thread Rasmus Lerdorf
SetCookie() cannot know whether the client accepts the cookie or not. It can only send it. You will need to check in a subsequent request if the client decided to accept it or not. -Rasmus On Sat, 10 Nov 2001, Christian Dechery wrote: what does SetCookie() returns??? I did a var_dump()

RE: [PHP] Setcookie

2001-08-31 Thread Jason Radley
?php $alertthem = Testing your browser for cookies.; if(empty($check)){ $page = $PHP_SELF?check=1; header(Location: $page); setcookie(testcookie,1); } else{ if(empty($testcookie)){ $alertthem = H3Please enable cookies.brYou need cookies to shop

Re: [PHP] setcookie problem

2001-07-03 Thread Christian Reiniger
On Monday 02 July 2001 21:32, scott [gts] wrote: probably becuase time() is seconds since 1970, and as far as i understand, once it gets over 999,999,999 it will not work correctly becuase it will roll over (similar to the Y2k bug) and become 000,000,000 Typically the limit is 2^31 seconds

RE: [PHP] setcookie problem

2001-07-02 Thread scott [gts]
this is my guess at what's happening... i dont know 100% if that's why cookies aren't setting properly, but here's an educated guess on my part: probably becuase time() is seconds since 1970, and as far as i understand, once it gets over 999,999,999 it will not work correctly becuase it will

Re: [PHP] setcookie() woes

2001-06-21 Thread Lenar Lõhmus
In my experience the understanding of SetCookie header differs form browser to browser so much that it's horrible. As far as I remember IE5.5 handled it correctly. IE5.0 didn't. Netscape I think did (not completely sure). In any case .. session-based cookies seem to work in all of them. just call

RE: [PHP] setcookie() woes

2001-06-21 Thread Jason Murray
I won't quote, because this is not directly related to either mail. I had a completely bizarre issue with MSIE not accepting cookies that had highbit ascii values in them as their first character. Simply fixed (in the end): add text to the front and strip it out in the sitewide pre-execution

RE: [PHP] setcookie() woes

2001-06-21 Thread Grimes, Dean
This is a problem with IE5.0. However, not all versions of 5.0 have the problem. I had to upgrade all of my users to IE5.5 to fix the problem. What is really strange is that the problem manifests itself as a PHP problemBut it's not. Actually, I don't think the problem is the setcookie

RE: [PHP] SetCookie weirdness

2001-06-20 Thread Ray Hilton
This is actually a security feature of cookies, so that domains that don’t match your cookie cannot read personal details set by another site. Don't worry, its all in order ;) Ray Hilton - [EMAIL PROTECTED] http://rayh.co.uk -Original Message- From: Tomaz Kovacic [mailto:[EMAIL

RE: [PHP] SetCookie weirdness

2001-06-20 Thread scott [gts]
. -Original Message- From: Ray Hilton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 3:26 AM To: 'Tomaz Kovacic'; [EMAIL PROTECTED] Subject: RE: [PHP] SetCookie weirdness This is actually a security feature of cookies, so that domains that don’t match your cookie cannot read

Re: [PHP] setcookie()

2001-05-07 Thread Patrick Wayne Tan
BTW here's my php.ini file. many thanks! - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 07, 2001 10:48 AM Subject: [PHP] setcookie() Hi all, I have just migrated my scripts from redhat linux 6.2 and apache to win nt4 and IIS 4. I've been

Re: [PHP] setcookie().. how to retrieve data afterward?

2001-04-01 Thread Jack Sasportas
If you just echo $userid you will get the results. do this setcookie ("cookie_variable", "chocalate chip", 1, "", "", 1); echo $cookie_variable You can name the cookie_variable whatever you want and that will be referenced as the variable to store "chocalate chip". Now if you want to see the

Re: [PHP] setcookie().. how to retrieve data afterward?

2001-04-01 Thread Andrew Rose
cheers Jack but Ive tried this and get the error msg: Warning: Undefined variable: user_id in C:/XITAMI/webpages/netrux/intothemain.php on line 14 so its not setting the varible by the looks of it any ideas? cheers Jack Sasportas wrote in message [EMAIL PROTECTED]... If you just echo

Re: [PHP] Setcookie not working

2001-03-30 Thread Yasuo Ohgaki
Someone on this list mentioned, Internet Explorer does not accept cookie that has timeout less than 7200 sec from current time. (PC's clock) How about try longer timeout? PS: Is this information is correct? Anyone? Correct me if it is wrong info. -- Yasuo Ohgaki ""Sean Weissensee"" [EMAIL

Re: [PHP] setcookie don't work well...

2001-02-26 Thread Chris Lee
you have to set to path and the domain name too... setcookie('vote', '1', $time, '/', '.someite.com'); -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Nuno Costa"" [EMAIL PROTECTED] wrote in message