php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #41894 session.use_only_cookies defaults
Submitted: 2007-07-04 13:23 UTC Modified: 2007-08-16 12:53 UTC
From: tokul at users dot sourceforge dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2007-07-04 13:23 UTC] tokul at users dot sourceforge dot net
Description:
------------
PHP documentation states that session.use_only_cookies default value is 1. Tested 4.4.7, 5.2.3 and 6.0-dev (200706201030). If setting was changed in later PHP6 versions, sorry for outdated report.

No php.ini file, no overrides in apache configuration and no .htaccess.

setting is 'On' only in 6.0-dev. Default value for 4.4.7 and 5.2.3 is 'Off'. Only in php.ini-dist it is set to 1.

http://bugs.php.net/bug.php?id=36279

36279 bug shows that you had 0 and 1 in some documentation revision. I think documentation was not updated correctly or default value was not checked when documentation was updated.

It would be nice to know which setting has higher priority.

For example, if settings are set to
---
session.use_cookies = off
session.use_only_cookies = on
session.use_trans_sid = on
---

Will it use trans_sid or cookies?

Reproduce code:
---------------
var_dump(ini_get('session.use_only_cookies'));

Expected result:
----------------
string(1) "1"

Actual result:
--------------
string(1) "0" on PHP 5.2.3 and PHP 4.2.7

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-16 12:53 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"Defaults to 1 (enabled) since PHP 6.0."
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 03:01:31 2025 UTC