0

Just need some help on how to fix this open_basedir restriction I've tried to run a command php artisan

This is the error msg:

is_file(): open_basedir restriction in effect.
File(/opt/php-7.0/bin/php) is not within the allowed path(s):
(/home/u823993344:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs)

I tried setting php.ini

open_basedir = "/home/u823993344"

but still doesn't work.

Any help would be appreciated :)

Update: i found what causes the error, its the in vendor/symfony/process/PhpExecutableFinder.php is_file(PHP_BINARY)

PHP_BINARY value is /opt/php-7.0/bin/php-cgi

cresjie
  • 469
  • 2
  • 13
  • Possible duplicate of [open\_basedir restriction in effect. File(/) is not within the allowed path(s):](http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths) – Lionel Chan Oct 21 '16 at 03:02
  • Which `php.ini` are you modifying? – linuxartisan Oct 21 '16 at 03:40
  • @linuxartisan i added a php.ini in the root of the project – cresjie Oct 21 '16 at 03:42
  • Well then try `$ php --ini` command and see whether that file is present in the output. – linuxartisan Oct 21 '16 at 03:47
  • @linuxartisan its not present, i manage to found the cause, `PHP_BINARY` value is /opt/php-7.0/bin/php-cgi and if you run `is_file(PHP_BINARY)` this cause open_basedir restriction – cresjie Oct 21 '16 at 04:02

0 Answers0