0

Yay all !

I've got a weird error :

Warning: require_once(): open_basedir restriction in effect. File(/usr/lib/php/api/api.conf.php) is not within the allowed path(s): (/var/www/vhosts/admin.eatsalad.fr/subdomains/dev:/usr/lib/php/:/tmp:/var/www/html/dnpanel/) in /var/www/vhosts/admin.eatsalad.fr/subdomains/dev/system/include_libs.php on line 3

Well, i try to get /usr/lib/php/api/api.conf.php which is obviously in /usr/lib/php/

The file exist, do I need to use chmod maybe ?
I search around here, but except bug about "file as folder open_basedir bug" like, I get nothing.

Thanks for helpers =) !


Solution

Ok, here goes the solution, with the dnpanel all "sub" website are in a jail So, even in php i wrote down /usr/lib/php, in reality, files are in /httpjail/usr/lib/php.

And, obviously, my libs were in /usr/lib/php which is not the good real path.

Thanks everyone for everything anyway ;)

Eat Salad
  • 99
  • 1
  • 1
  • 6

2 Answers2

0

According to this answer adding a slash to a directory listed in the setting will prevent requiring files inside subdirectories of that directory.

If u look at your setting its /var/www/vhosts/admin.eatsalad.fr/subdomains/dev:/usr/lib/php/:/tmp:/var/www/html/dnpanel/, meaning u can't require files from a subdirectory inside /user/lib/php

Community
  • 1
  • 1
DarkBee
  • 16,592
  • 6
  • 46
  • 58
0

Solution

Ok, here goes the solution, with the dnpanel all "sub" website are in a jail So, even in php i wrote down /usr/lib/php, in reality, files are in /httpjail/usr/lib/php.

And, obviously, my libs were in /usr/lib/php which is not the good real path.

Thanks everyone for everything anyway ;)

Eat Salad
  • 99
  • 1
  • 1
  • 6