open_basedir restriction in effect. File(/) is not within the allowed path(s):

后端 未结 13 2206
醉话见心
醉话见心 2020-11-22 01:45

I\'m getting this error on an avatar upload on my site. I\'ve never gotten it before and nothing was changed recently for me to begin getting this error...

         


        
相关标签:
13条回答
  • 2020-11-22 02:49

    If used ispconfig3:

    Go to Website section -> Options -> PHP open_basedir:

    • In this field has described allowed paths and each path is separated with ":"

    /var/www/clients/client2/web3/image:/var/www/clients/client2/web3/web:/var/www/... and so on

    • So here must put the path that you want to have access, in my case is:

    /var/www/clients/client2/web3/image:

    • The problem appears because:

    When a script tries to access the filesystem, for example using include, or fopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to access it.

    0 讨论(0)
提交回复
热议问题