File: session_badconf_servers-php72.phpt

package info (click to toggle)
php-memcached 3.1.3%2B2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,432 kB
  • sloc: ansic: 9,903; xml: 1,262; php: 321; pascal: 87; sh: 12; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (4)
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
27
28
29
30
--TEST--
Session bad configurations, invalid save path (server list)
--SKIPIF--
<?php
include dirname(__FILE__) . "/skipif.inc";
if (!Memcached::HAVE_SESSION) print "skip";
if (PHP_VERSION_ID < 70200) print "skip";
?>
--INI--
session.save_handler = memcached
--FILE--
<?php
include dirname (__FILE__) . '/config.inc';
ini_set ('session.save_path', MEMC_SERVER_HOST . ':' . MEMC_SERVER_PORT);

error_reporting(0);
function handler($errno, $errstr) {
	echo "$errstr\n";
}

set_error_handler('handler', E_ALL);

ini_set('memcached.sess_prefix', 'memc.sess.key.');
ini_set('session.save_path', '');
session_start();
session_write_close();

--EXPECT--
session_start(): failed to parse session.save_path
session_start(): Failed to initialize storage module: memcached (path: )