Doc #80627 [NEW]: session_get_cookie_params options-array 1st param is 'expires' not 'lifetime'

From: Date: Thu, 14 Jan 2021 19:59:32 +0000
Subject: Doc #80627 [NEW]: session_get_cookie_params options-array 1st param is 'expires' not 'lifetime'
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18394@lists.php.net to get a copy of this message
From: maiksweb3 at web dot de Operating system: Mac OS 11.1 PHP version: 8.0Git-2021-01-14 (Git) Package: Documentation problem Bug Type: Documentation Problem Bug description:session_get_cookie_params options-array 1st param is 'expires' not 'lifetime' Description: ------------ --- From manual page: https://php.net/function.session-set-cookie-params --- Documentation does not have an example for options-array, especially the key's. User comment #9 - frank at frankforte dot ca has a wrong key: 'lifetime' It triggers error HP Fatal error: Uncaught ValueError: setcookie(): option "lifetime" is invalid in ... also 'expires' or 'expire' triggers warning: PHP Warning: session_set_cookie_params(): Argument #1 ($lifetime_or_options) contains an unrecognized key "expire" in.. PHP Warning: session_set_cookie_params(): Argument #1 ($lifetime_or_options) contains an unrecognized key "expires" in.. Or am i wrong? Test script: --------------- $cookieOpt = array( 'lifetime' => 18000, // also 'expires' or 'expire' do warning 'path' => '/', 'domain' => $_SERVER[ 'HTTP_HOST' ], 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'None' ); session_set_cookie_params( $cookieOpt ); -- Edit bug report at https://bugs.php.net/bug.php?id=80627&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80627&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80627&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80627&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80627&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80627&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80627&r=support Expected behavior: https://bugs.php.net/fix.php?id=80627&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80627&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80627&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80627&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80627&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80627&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80627&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80627&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80627&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80627&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80627&r=mysqlcfg

« previous php.doc.bugs (#18394) next »