Bug #75817 [Opn->Fbk]: Fatal in calling session_start()
| From: | cmb@php.net | Date: | Fri, 19 Mar 2021 17:07:30 +0000 |
| Subject: | Bug #75817 [Opn->Fbk]: Fatal in calling session_start() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232888@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75817&edit=1
ID: 75817
Updated by: cmb@php.net
Reported by: chensl6588 at gmail dot com
Summary: Fatal in calling session_start()
-Status: Open
+Status: Feedback
Type: Bug
Package: Session related
Operating System: FreeBSD-10.2-i386
PHP Version: 7.2.1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The effect to session_start() isn't the root cause, though;
re-classifying.
Anyhow, is the failing php_random_bytes() still an issue? If so,
please provide a pull request[1] for better visibility.
[1] <https://github.com/php/php-src/pulls>
Previous Comments:
------------------------------------------------------------------------
[2018-01-15 09:44:00] chensl6588 at gmail dot com
Description:
------------
While PHP is running in FPM with chroot safe_mode, and the session.save_handler is
"files".
#ext/session/mod_files.c: PS_CREATE_SID_FUNC(files)
{{
sid = php_session_create_id((void**)&data);
}}
This statement would always return NULL to sid, because of php_random_bytes() returning FAILURE.
SOLUTION:
ext/standard/random.c:
Line 94: #elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__FreeBSD__) || (defined(__OpenBSD__)
&& OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >=
700000001))
Test script:
---------------
session_start();
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75817&edit=1