blob: 0c11a8b6836e4a91ccc370e328826918b5958d57 (
plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
--TEST--
Stream wrapper (php)
--SKIPIF--
<?php
if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing";
?>
--INI--
sp.configuration_file={PWD}/config/config_stream_wrapper_php.ini
--FILE--
<?php
echo file_get_contents('php://input');
file_put_contents('php://output', "Hello from stdout\n");
file_put_contents('php://stderr', "Hello from stderr #1\n");
file_put_contents('php://memory', "Bye from memory\n");
echo file_get_contents('php://memory');
file_put_contents('php://temp', "Bye from temp\n");
echo file_get_contents('php://temp');
file_put_contents('php://stderr', "Hello from stderr #2\n");
file_put_contents('php://filter/write=string.toupper/resource=output.tmp', "Hello from stdout filtered\n");
echo file_get_contents('php://filter/read=string.toupper/resource=output.tmp');
$foo = stream_wrapper_unregister("php");
fwrite(STDERR, $foo);
file_put_contents('php://stderr', "Hello from stderr #3\n");
stream_wrapper_restore("php");
file_put_contents('php://stderr', "Hello from stderr #4\n");
file_put_contents('php://memory', "Bye from memory\n");
?>
--EXPECTF--
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "input" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_get_contents(php://input): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "output" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(php://output): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Hello from stderr #1
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "memory" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(php://memory): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "memory" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_get_contents(php://memory): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "temp" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(php://temp): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "temp" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_get_contents(php://temp): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Hello from stderr #2
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "filter" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(php://filter/write=string.toupper/resource=output.tmp): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "filter" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_get_contents(php://filter/read=string.toupper/resource=output.tmp): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
1
Warning: file_put_contents(): Unable to find the wrapper "php" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(php://stderr): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_php.php on line %d
Hello from stderr #4
Warning: [snuffleupagus][0.0.0.0][wrappers_whitelist][log] Call to not allowed php stream type "memory" dropped in %a/stream_wrapper_php.php on line %d
Warning: file_put_contents(php://memory): %s to open stream: operation failed in %a/stream_wrapper_php.php on line %d
|