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

[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

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

[PHP] setcookie

2008-03-12 Thread Tim Daff
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

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

[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 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
PROTECTED] wrote: 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

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

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

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

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

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
on register_globals or assigning the value yourself? The example is here: http://www.sperling.com/examples/styleswitch/ The complete php code (i.e., switch.php) is: ?php setcookie ('thestyle', $set, time()+31536000, '/', '', 0); header(Location: $HTTP_REFERER

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
=stylesheet type=text/css media=screen href=?php echo (!$thestyle)?'style1':$thestyle ?.css Within the body tags, allowing the user to select which style they want: a href=switch.php?set=style2Green/a or a href=switch.php?set=style1Red/a And, the corresponding (switch.php) php code is: ?php

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
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? The example is here: http://www.sperling.com/examples/styleswitch/ The complete php code (i.e., switch.php) is: ?php setcookie ('thestyle

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

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

[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

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

[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

[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/) To unsubscribe,

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

[PHP] setcookie issue

2005-03-26 Thread John Hinton
Seems my old setcookie scripts are busted in php with globals off. --begin code-- ? if(isset($_POST[tpassword])) { setcookie (writer, $_GET[twriter]); setcookie (password, $_POST[tpassword]); } $action = $_REQUEST['action']; define (Login, 0); define (Entrance, 1);

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.

[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

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

[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

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

[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

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

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

2004-08-26 Thread Shapiro, David
ype="submit" name="Submit" value=" Login " style="font-weight:bold;" /td /tr It looks like the value= line for user name puts the text the user types into in the $UserName variable (or is this setting a default value if $UserName exists?). The passwor

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
this. Either way, this setup works fine on the original server. At the top of the index.php page, it then has php code like the following: ?php setcookie (ccp_logged_in); setcookie (ccp_username); setcookie (ccp_uid); setcookie (ccp_fname); setcookie (ccp_lname); setcookie

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,

[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 ?php and ?, 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

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

[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 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 -- PHP General

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

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

[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

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

[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, /,

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Gregory Barker
: 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()+$this-session_expires; $issetCookie = setcookie

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
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 PROTECTED] Sent: Thursday, August 29, 2002 1:39 PM Subject: [PHP] setcookie IE6 problem I'm setting a session cookie

[PHP] setcookie() failure

2002-08-26 Thread Tony Harrison
Can anyone tell me why the following setcookie()s fail? ?php require(settings.php); require(common.php); if (!($link = mysql_connect($dbhost, $dbuser, $dbpass))) { ReportError(An error was encountered while trying to establish a connection to the mySQL server, using function mysql_connect(),

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

[PHP] setcookie then redirect

2002-07-10 Thread David Busby
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 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);

[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

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

[PHP] setcookie() in 4.2.0

2002-05-11 Thread Olexandr Vynnychenko
The following code doesn't work properly on PHP 4.1: ?php echo pBlah, blah/p; 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 regards,

RE: [PHP] setcookie() in 4.2.0

2002-05-11 Thread Matthew Walker
: 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: ?php echo pBlah, blah/p; setcookie(kuku, abc); setcookie(lala, def); setcookie(zuzu, ghi); ? Because I wrote echo statement before setcookie. But it works on PHP

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

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

[PHP] Setcookie problems...

2002-04-24 Thread Pusta
Please help... 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?? Here is how we are setting the cookie: setcookie(cookiename,

  1   2   >