On 6 July 2016 at 22:30, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> php_session_create_id() may return NULL. It's an usual error. Session
> module supports session ID creation save handler which may return
> anything valid for the type.
>
> Session module tries to call php_session_create_id() several
> places/times. If it could not get valid one, it raises
> E_RECOVERABLE_ERROR or E_ERROR eventually.
>
> Although it's not enabled yet, PHP_FUNCTION(session_create_id) returns
> FALSE it fails.

If it fails due to a lack of random, it throws a fatal. Tested your PR
and forced the fd of /dev/urandom to -1 in ext/standard/random.c

$ sapi/cli/php -n -r 'session_start();'

Next Exception: Cannot open source device in Command line code:1
Stack trace:
#0 Command line code(1): session_start()
#1 {main}
  thrown in Command line code on line 1

Fatal error: session_start(): Failed to create session ID: files
(path: ) in Command line code on line 1

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to