Bug #77588 [Com]: Session started with read_and_close creates empty session

From: Date: Fri, 08 Feb 2019 13:44:54 +0000
Subject: Bug #77588 [Com]: Session started with read_and_close creates empty session
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219442@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77588&edit=1 ID: 77588 Comment by: spam2 at rhsoft dot net Reported by: piotr at halas dot net dot pl Summary: Session started with read_and_close creates empty session Status: Open Type: Bug Package: Session related Operating System: Linux PHP Version: 7.2.15 Block user comment: N Private report: N New Comment: what does the ini_set here and are you aware that it is not supposed to init a new session but resume one readonly to watch for example status of file uploads Previous Comments: ------------------------------------------------------------------------ [2019-02-08 13:38:58] piotr at halas dot net dot pl Description: ------------ I don't know if this is a bug, but when starting a session with read_and_close options enabled PHP creates an empty session if no session was found. Test script: --------------- <?php ini_set('session.save_path', getcwd()); session_start(['read_and_close' => true]); echo "Sessions: ".count(glob(getcwd().'/sess_*')).PHP_EOL; Expected result: ---------------- Sessions: 0 Actual result: -------------- Sessions: 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77588&edit=1

« previous php.bugs (#219442) next »