xref: /php-src/ext/session/tests/bug61470.phpt (revision b5a14e6c)
1--TEST--
2Bug #61470 (session_regenerate_id() does not create session file)
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9ob_start();
10ini_set('session.save_path', __DIR__);
11$path = ini_get('session.save_path') . '/sess_';
12session_start();
13// starts session & creates and locks file
14$file1 = $path . session_id();
15var_dump(is_file($file1));
16
17session_regenerate_id();
18// starts new session, but file is not create!
19$file2 = $path . session_id();
20var_dump(is_file($file2));
21
22// cleanup
23@unlink($file1);
24@unlink($file2);
25?>
26--EXPECT--
27bool(true)
28bool(true)
29