-3

I have inherited a hosted website and I'm getting the below 3 errors:

-Warning: Unknown: open_basedir restriction in effect. File(/home/rehworkc/public_html/framework/main.php) is not within the allowed path(s): (0) in Unknown on line 0***

-Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0***

-Fatal error: Unknown: Failed opening required '/home/rehworkc/public_html/framework/main.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in Unknown on line 0***

I suspect it could be a permissions issue but not sure how to resolve. Any ideas?

Thanks!

Community
  • 1
  • 1
Blueman
  • 1
  • 1
  • 1
  • 1
    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) – Shira Mar 04 '17 at 10:44
  • Why do you "suspect" a permission issue? It definitely _says_ so. – arkascha Mar 04 '17 at 10:45

3 Answers3

0

Just for future reference in case it helps someone else, the issue was in an environment.php file, it had these two flags:

ini_set('safe_mode', 'Off'); ini_set('open_basedir', 'Off');

having open_basedir set to off meant it wasn't able to use any of the PHP files.

Blueman
  • 1
  • 1
  • 1
0

The issue is because SELinux is preventing read access to the file you are trying to access,

use restore con/home/rehworkc/public_html/framework/main.php to restore access to the file

Hope this helps.

Futher reading on this link

Ally
  • 21
  • 3
0

You might not be in the directory where you've installed laravel. Try cd into the correct directory.

Rolando Isidoro
  • 4,983
  • 2
  • 31
  • 43