Doc #79609 [Fbk]: Warning in session_create_id Example #1
| From: | cmb@php.net | Date: | Wed, 20 May 2020 08:48:42 +0000 |
| Subject: | Doc #79609 [Fbk]: Warning in session_create_id Example #1 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17604@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79609&edit=1
ID: 79609
Updated by: cmb@php.net
Reported by: software_onbekend at hotmail dot com
Summary: Warning in session_create_id Example #1
Status: Feedback
Type: Documentation Problem
Package: Session related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This is most likely a duplicate of bug #79413, which is fixed as
of PHP 7.3.17 and 7.4.5, respectively.
Previous Comments:
------------------------------------------------------------------------
[2020-05-19 23:35:11] requinix@php.net
The settings look fine, in that you're using the regular files handler.
But I find it hard to believe the crypto is the problem. Are you able to use random_bytes() without
problems?
------------------------------------------------------------------------
[2020-05-19 15:59:56] software_onbekend at hotmail dot com
Session Support enabled
Registered save handlers files user
Registered serializer handlers php_serialize php php_binary
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_samesite no value no value
session.cookie_secure 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.lazy_write On On
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path E:\xampp\tmp E:\xampp\tmp
session.serialize_handler php php
session.sid_bits_per_character 5 5
session.sid_length 26 26
session.upload_progress.cleanup On On
session.upload_progress.enabled On On
session.upload_progress.freq 1% 1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_ upload_progress_
session.use_cookies 1 1
session.use_only_cookies 1 1
session.use_strict_mode 0 0
session.use_trans_sid 0 0
I hope, this is the info you asked for.
Have a nice day.
------------------------------------------------------------------------
[2020-05-18 21:14:58] requinix@php.net
The only way I see session_create_id failing is either (a) you don't have good enough crypto,
or (b) you're using a custom session handler that's not behaving well.
So what are you session settings?
------------------------------------------------------------------------
[2020-05-18 19:03:35] software_onbekend at hotmail dot com
Exact warning: from def. environment:
Warning: session_create_id(): Failed to create new ID in E:\xampp\htdocs\8\index.php on line 20
------------------------------------------------------------------------
[2020-05-18 18:17:05] requinix@php.net
> Here I get the warnings.
Exactly what are they?
> The explanation of the return values doesn't explain the link between these values 0, 1
> & 2.
Use the constants. If you want something you can read, use the constants to output human friendly
strings like "active".
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=79609
--
Edit this bug report at https://bugs.php.net/bug.php?id=79609&edit=1