Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

orosznyet's avatar

Problem after migrating from L4 to L5.1: "open_basedir restriction in effect"

If I try to execute any php artisan command this error occures:

[ErrorException]
  is_file(): open_basedir restriction in effect. File(/usr/bin/php5) is not within the allowed path(s): (/tmp:/var/tmp:/var/www:/usr/share/php:/usr/lib/zsys/php:/usr/bin/composer.phar) in file /var/www/project/vendor/symfony/process/PhpExecutableFinder.php:44

Important: I can't change the server settings due to security concerns.

0 likes
1 reply
orosznyet's avatar
orosznyet
OP
Best Answer
Level 1

Okay, the solution was simple but requires dep. modification in vendor/symfony/process/PhpExecutableFinder.php@44.

Just removed is_file(PHP_BINARY) and everything looks and works fine.

Please or to participate in this conversation.