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

后端 未结 13 2161
醉话见心
醉话见心 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:31

    I am using an Apache vhost-File to run PHP with application-specific ini-options on my windows-server. Therefore I use the -d option of the php-command.

    I am setting the open_basedir for every application as one of these options.

    I needed to set multiple urls as open_basedir, including an UNC-Path, and the syntax for this case was a bit hard to find. You have to seperate the paths with semicolons and if your first path starts with a driveletter you might have to start the list with a semicolon too. At least that's what works for me.

    Example:

    php.exe -d open_basedir=;d:/www/applicationRoot;//internal.unc.path/ressource/
    

提交回复
热议问题