summaryrefslogtreecommitdiff
path: root/ext/session/tests/bug61470.phpt
blob: 2c0d4183ecb54b76e02567438ff2c08190110b3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Bug #61470 (session_regenerate_id() does not create session file)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
--FILE--
<?php
ob_start();
ini_set('session.save_path', __DIR__);
$path = ini_get('session.save_path') . '/sess_';
session_start();
// starts session & creates and locks file
$file1 = $path . session_id();
var_dump(is_file($file1));

session_regenerate_id();
// starts new session, but file is not create!
$file2 = $path . session_id();
var_dump(is_file($file2));

// cleanup
@unlink($file1);
@unlink($file2);
--EXPECT--
bool(true)
bool(true)