For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > December 2006 > #39994 [NEW]: setcookie docs don't say what to pass to expires to get a session cooki









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #39994 [NEW]: setcookie docs don't say what to pass to expires to get a session cooki
jason191 at herkamire dot com

2006-12-31, 4:06 am

From: jason191 at herkamire dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: setcookie docs don't say what to pass to expires to get a session cookie

Description:
------------
The documentation for setcookie() here:

http://us2.php.net/manual/en/function.setcookie.php

does not specify what value to pass to the "expire" parameter to get a
session cookie.

It does say that the default value is a session cookie, but doesn't say
how to get this result by passing a value.

This is important information for two reasons:

1) I wrote a function that calls setcookie() and has a parameter for the
length of time the cookie will last. I would like to be able to inform
users what value they can pass to get a session cookie.

2) Perhaps there is a way, but I don't know how to pass the parameters
after "expire" without setting the "expire parameter. I'm sure many others
don't know how either.


One of the user comments says that he was able to get a session cookie by
passing 0 (zero), but I do not know if this works across different PHP
versions.

Thank you for your time.

Best regards,
- Jason Woofenden


--
Edit bug report at http://bugs.php.net/?id=39994&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39994&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39994&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39994&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39994&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39994&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39994&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39994&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39994&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39994&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39994&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39994&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39994&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39994&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39994&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39994&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39994&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39994&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39994&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39994&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39994&r=mysqlcfg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com