Enable open_basedir  [SOLVED]

Locked
User avatar
martins
Posts: 30
Joined: Mon 18. Nov 2019, 13:32

Enable open_basedir

Post by martins »

Can someone help me on how to enable open_basedir? I have one of my Laravel script needs open_basedir to be enabled. I can't find any thread in this forum.

Thank You!
User avatar
martins
Posts: 30
Joined: Mon 18. Nov 2019, 13:32

Re: Enable open_basedir

Post by martins »

Sorry, I just found the config by adding following line in Additional PHP settings under user configuration for PHP tab.

Code: Select all

open_basedir =
Thanks!
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Enable open_basedir

Post by Alexander »

There is also the input field "open_basedir" on the same page, where the "Additional PHP settings" is, just scroll a bit to the top ;).

By the way I would not recommend to set the "open_basedir = <NO VALUE>". This could result in a huge security issue, please be aware of this.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
martins
Posts: 30
Joined: Mon 18. Nov 2019, 13:32

Re: Enable open_basedir

Post by martins »

Thanks Alexander for sorting this out.

When I put open_basedir = /www it gives me error No input file specified. on the browser.
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Enable open_basedir  [SOLVED]

Post by Alexander »

The directory "/www" does not exist on your server - at least it is very unlikely - this is an absolute path.
Have a look at the command: "ls -la /" is guess, you wont see a directory called www in the root directory "/".

Therefor your whole open_basedir directive does not work anymore. Please make yourself aware, what open_basedir does, to put in something meaningful: https://www.php.net/manual/en/ini.core. ... en-basedir

(If you want to restore the default: "##DOCROOT##/www:##DOCROOT##/files:##DOCROOT##/tmp")

The question is, what do you want to achive. To which directory your Laravel script needs access -> than add this to the default open_basedir separated will a ":".
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
martins
Posts: 30
Joined: Mon 18. Nov 2019, 13:32

Re: Enable open_basedir

Post by martins »

Thanks Alexander for the clear explanation, I am not going to enable this extension. I will mark this thread as SOLVED!
Locked