Page 1 of 1

Enable open_basedir

Posted: Thu 5. Aug 2021, 14:26
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!

Re: Enable open_basedir

Posted: Thu 5. Aug 2021, 14:45
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!

Re: Enable open_basedir

Posted: Thu 5. Aug 2021, 14:58
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.

Re: Enable open_basedir

Posted: Fri 6. Aug 2021, 02:54
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.

Re: Enable open_basedir  [SOLVED]

Posted: Fri 6. Aug 2021, 09:24
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 ":".

Re: Enable open_basedir

Posted: Fri 13. Aug 2021, 07:31
by martins
Thanks Alexander for the clear explanation, I am not going to enable this extension. I will mark this thread as SOLVED!