<?php
if (class_exists('RecursiveDirectoryIterator')) {
$i1 = new RecursiveDirectoryIterator('/var/tmp');
$i2 = new RecursiveDirectoryIterator('/var/tmp');
var_dump($i1 == $i2);
} else {
var_dump('Class RecursiveDirectoryIterator does not exist');
}
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(): open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/tmp:/in:/etc) in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(): open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/tmp:/in:/etc) in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(): open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/tmp:/in) in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 7.0.4, 7.2.0
Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied' in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 5.1.2
Fatal error: Uncaught exception 'RuntimeException' with message 'RecursiveDirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied' in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 5.1.0 - 5.1.1
Fatal error: Uncaught exception 'RuntimeException' with message 'DirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied' in /in/M367v:4
Stack trace:
#0 /in/M367v(4): DirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 5.0.5
Fatal error: Uncaught exception 'Exception' with message 'DirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied' in /in/M367v:4
Stack trace:
#0 /in/M367v(4): DirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 5.0.3 - 5.0.4
Fatal error: Uncaught exception 'Exception' with message 'DirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied' in /in/M367v:4
Stack trace:
#0 /in/M367v(4): RecursiveDirectoryIterator->__construct('/var/tmp')
#1 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught exception 'Exception' with message 'DirectoryIterator::__construct(/var/tmp): failed to open dir: Permission denied' in /in/M367v:4
Stack trace:
#0 {main}
thrown in /in/M367v on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
string(47) "Class RecursiveDirectoryIterator does not exist"