|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75817 Fatal in calling session_start()
Submitted: 2018-01-15 09:44 UTC Modified: 2021-03-28 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: chensl6588 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: *General Issues
PHP Version: 7.2.1 OS: FreeBSD-10.2-i386
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: chensl6588 at gmail dot com
New email:
PHP Version: OS:


 [2018-01-15 09:44 UTC] chensl6588 at gmail dot com
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.



Line 94: #elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__FreeBSD__) || (defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001))

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-19 17:07 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-03-19 17:07 UTC]
The effect to session_start() isn't the root cause, though;

Anyhow, is the failing php_random_bytes() still an issue?  If so,
please provide a pull request[1] for better visibility.

[1] <>
 [2021-03-19 17:07 UTC]
-Package: Session related +Package: *General Issues
 [2021-03-28 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Dec 05 10:01:26 2023 UTC