summaryrefslogtreecommitdiff
path: root/tests/executor/negative_memory_limit.phpt
blob: 8582cc9509c1b41a628dc3256e81b7c21d9347a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
memory_limit test: trying to set memory_limit to a negative value
--SKIPIF--
<?php if (!function_exists("memory_get_usage")) print "skip PHP not compiled with memory_limit support"; ?>
--INI--
memory_limit=16M
suhosin.memory_limit=17M
suhosin.log.syslog=0
suhosin.log.script=0
suhosin.log.sapi=2
--FILE--
<?php
    ini_set("memory_limit", "-200000"); echo ini_get("memory_limit"), "\n";
?>
--EXPECTF--
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)
16M