summaryrefslogtreecommitdiff
path: root/tests/executor/memory_limit_other_hardlimit.phpt
diff options
context:
space:
mode:
authorBen Fuhrmannek2016-03-03 15:36:40 +0100
committerBen Fuhrmannek2016-03-03 15:36:40 +0100
commit3e77c15105551dee21edac0ab090ffaf10c4ff4d (patch)
tree7e756df9267432260e4a329f9f3c0eb7b978c763 /tests/executor/memory_limit_other_hardlimit.phpt
parentadbeda7daaa6ff3a1fbc25d35cc62a1979214f7f (diff)
memory limit
Diffstat (limited to 'tests/executor/memory_limit_other_hardlimit.phpt')
-rw-r--r--tests/executor/memory_limit_other_hardlimit.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/executor/memory_limit_other_hardlimit.phpt b/tests/executor/memory_limit_other_hardlimit.phpt
new file mode 100644
index 0000000..cac11dc
--- /dev/null
+++ b/tests/executor/memory_limit_other_hardlimit.phpt
@@ -0,0 +1,28 @@
1--TEST--
2memory_limit test: set suhosin hard_limit to normal limit + 1M
3--SKIPIF--
4<?php if (!function_exists("memory_get_usage")) print "skip PHP not compiled with memory_limit support"; ?>
5--INI--
6memory_limit=16M
7suhosin.memory_limit=17M
8suhosin.log.syslog=0
9suhosin.log.script=0
10suhosin.log.sapi=2
11--FILE--
12<?php
13 ini_set("memory_limit", "13M"); echo ini_get("memory_limit"), "\n";
14 ini_set("memory_limit", "14M"); echo ini_get("memory_limit"), "\n";
15 ini_set("memory_limit", "15M"); echo ini_get("memory_limit"), "\n";
16 ini_set("memory_limit", "16M"); echo ini_get("memory_limit"), "\n";
17 ini_set("memory_limit", "17M"); echo ini_get("memory_limit"), "\n";
18 ini_set("memory_limit", "18M"); echo ini_get("memory_limit"), "\n";
19?>
20--EXPECTF--
2113M
2214M
2315M
2416M
2517M
26ALERT - script tried to increase memory_limit to %d bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 7)
2717M
28