diff options
| author | Ben Fuhrmannek | 2016-03-03 15:36:40 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2016-03-03 15:36:40 +0100 |
| commit | 3e77c15105551dee21edac0ab090ffaf10c4ff4d (patch) | |
| tree | 7e756df9267432260e4a329f9f3c0eb7b978c763 /tests/executor/memory_limit_other_hardlimit.phpt | |
| parent | adbeda7daaa6ff3a1fbc25d35cc62a1979214f7f (diff) | |
memory limit
Diffstat (limited to 'tests/executor/memory_limit_other_hardlimit.phpt')
| -rw-r--r-- | tests/executor/memory_limit_other_hardlimit.phpt | 28 |
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-- | ||
| 2 | memory_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-- | ||
| 6 | memory_limit=16M | ||
| 7 | suhosin.memory_limit=17M | ||
| 8 | suhosin.log.syslog=0 | ||
| 9 | suhosin.log.script=0 | ||
| 10 | suhosin.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-- | ||
| 21 | 13M | ||
| 22 | 14M | ||
| 23 | 15M | ||
| 24 | 16M | ||
| 25 | 17M | ||
| 26 | ALERT - script tried to increase memory_limit to %d bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 7) | ||
| 27 | 17M | ||
| 28 | |||
