This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Mohsin
Mohsin

So I’m running OctoberCMS on a shared hosting and on running artisan I got this:

-bash-4.1$ php artisan

  [ErrorException]
  is_file(): open_basedir restriction in effect. File(/opt/php-7.0/bin/php) is not within the allowed path(s): (/home/u979595077:/tmp:/var/tmp:/opt/php-7.0/pear)

The solution is to comment out the line in vendor/symfony/process/PhpExecutableFinder.php from

// PHP_BINARY return the current sapi executable
if (defined('PHP_BINARY') && PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')) && is_file(PHP_BINARY)) {
    return PHP_BINARY.$args;
}

to

// PHP_BINARY return the current sapi executable
if (defined('PHP_BINARY') && PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')) ) { //&& is_file(PHP_BINARY)) {
    return PHP_BINARY.$args;
}
daftspunky
daftspunky

Wow, interesting. I wonder if there is some way we can integrate this in to October. The check seems illogical in the first place; of course PHP_BINARY is a file.

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.