Download src/php/php-src/ext/session/tests/bug61470.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/session/tests/bug61470.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/session/tests/bug61470.phpt
-
curl -L -o bug61470.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/session/tests/bug61470.phpt
587 Bytes
| --TEST-- | |
| Bug #61470 (session_regenerate_id() does not create session file) | |
| --EXTENSIONS-- | |
| session | |
| --SKIPIF-- | |
| include('skipif.inc'); | |
| --FILE-- | |
| 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) | |