0

I am using the module Image Optimizer and I need to specify the media folder to optimize the pictures.

But I don’t have a media folder for the project, there is only a Symlink to the directory /mnt/MEDIA/media/ relative to the project root. If I specify the path to the media folder in the admin panel, I get an error

project dir: /var/www/vhosts/xxxe.de/httpdocs/ media dir: /mnt/MEDIA/media/

enter image description here

enter image description here

Scanning and reindexing failed.

SplFileInfo::isFile(): open_basedir restriction in effect. File(/var/www/vhosts/xxxe.de/httpdocs/media/..) is not within the allowed path(s): (/var/www/vhosts/xxxe.de/:/tmp/:/mnt/MEDIA/media)

File ownership matches :

enter image description here

0
open_basedir string

Limit the files that can be accessed by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.

solution to add path to open_basedir:

open_basedir = "/path/to/first/folder:/path/to/second/folder"

https://support.plesk.com/hc/en-us/articles/360006170513-How-to-add-custom-or-additional-path-to-the-open-basedir-option-for-Plesk-domain-

  • Log into Plesk

  • Go to Domains > example.com > PHP Settings

  • Define the custom path:{WEBSPACEROOT}{/}{:}{TMP}{/}{:}/example/path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.