diff options
Diffstat (limited to 'src/tests/deny_writable_execution_disabled.phpt')
| -rw-r--r-- | src/tests/deny_writable_execution_disabled.phpt | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/tests/deny_writable_execution_disabled.phpt b/src/tests/deny_writable_execution_disabled.phpt deleted file mode 100644 index dd01f01..0000000 --- a/src/tests/deny_writable_execution_disabled.phpt +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | --TEST-- | ||
| 2 | Readonly execution attempt | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disable_writable_disabled.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | $dir = __DIR__; | ||
| 10 | |||
| 11 | // just in case | ||
| 12 | @unlink("$dir/non_writable_file.txt"); | ||
| 13 | @unlink("$dir/writable_file.txt"); | ||
| 14 | |||
| 15 | file_put_contents("$dir/writable_file.txt", '<?php echo "Code execution within a writable file.\n";'); | ||
| 16 | file_put_contents("$dir/non_writable_file.txt", '<?php echo "Code execution within a non-writable file.\n";'); | ||
| 17 | chmod("$dir/writable_file.txt", 0777); | ||
| 18 | chmod("$dir/non_writable_file.txt", 0400); | ||
| 19 | include "$dir/writable_file.txt"; | ||
| 20 | include "$dir/non_writable_file.txt"; | ||
| 21 | ?> | ||
| 22 | --EXPECT-- | ||
| 23 | Code execution within a writable file. | ||
| 24 | Code execution within a non-writable file. | ||
| 25 | --CLEAN-- | ||
| 26 | <?php | ||
| 27 | $dir = __DIR__; | ||
| 28 | chmod("$dir/non_writable_file.txt", 0777); | ||
| 29 | chmod("$dir/writable_file.txt", 0777); | ||
| 30 | unlink("$dir/non_writable_file.txt"); | ||
| 31 | unlink("$dir/writable_file.txt"); | ||
| 32 | ?> | ||
