File: session_badconf_emptyprefix.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 (28 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (5)
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
--TEST--
Session bad configurations, prefix
--SKIPIF--
<?php 
include dirname(__FILE__) . "/skipif.inc"; 
if (!Memcached::HAVE_SESSION) print "skip";
?>
--INI--
memcached.sess_locking = on
memcached.sess_prefix = "memc.sess.key."
session.save_handler = "memcached"

--FILE--
<?php
ob_start();

include dirname (__FILE__) . '/config.inc';
ini_set ('session.save_path', MEMC_SERVER_HOST . ':' . MEMC_SERVER_PORT);

ini_set('memcached.sess_prefix', " \n");
session_start();
session_write_close();

echo "OK";

--EXPECTF--
Warning: ini_set(): memcached.sess_prefix cannot contain whitespace or control characters in %s on line %d
OK