open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s)¶
Description¶
This is an alt error message raised when a PHP extension tries to access a file, while the open_basedir is enabled. This may happen with XML extensions, sqlite3, file, tidy, mysqli, readline, stream, curl, etc. This list is not exhaustive.
Example¶
<?php
$db = new SQLite3('/forbidden/path/to/sqlite3.db');
?>
Literal Examples¶
open_basedir restriction in effect. File(example.php) is not within the allowed path(s): (.::/tmp/)
Solutions¶
Make sure the file path lies within the
open_basedirdirective’s path.Change the value of the
open_basedirdirective.Check the value of the
open_basedirdirective for typos.
Changed Behavior¶
This error may appear following an evolution in behavior, in previous versions. See ` <https://php-changed-behaviors.readthedocs.io/en/latest/behavior/.html>`_.