diff options
| author | Stefan Esser | 2010-02-21 11:44:54 +0100 |
|---|---|---|
| committer | Stefan Esser | 2010-02-21 11:44:54 +0100 |
| commit | 36dbfacbe64697d959f524e537b15b73c090d898 (patch) | |
| tree | f1c7ce1409b0e7765fc72d550546967fcf0f9717 /tests/executor/negative_memory_limit.phpt | |
Inital commit
Diffstat (limited to 'tests/executor/negative_memory_limit.phpt')
| -rw-r--r-- | tests/executor/negative_memory_limit.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/executor/negative_memory_limit.phpt b/tests/executor/negative_memory_limit.phpt new file mode 100644 index 0000000..8582cc9 --- /dev/null +++ b/tests/executor/negative_memory_limit.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | memory_limit test: trying to set memory_limit to a negative value | ||
| 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", "-200000"); echo ini_get("memory_limit"), "\n"; | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | ALERT - script tried to increase memory_limit to %d bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 2) | ||
| 17 | 16M | ||
| 18 | |||
