• Hi there, I keep getting this Error and my NGINX error logs are full of similar errors/warnings. How do I fix it

    2022/10/22 12:45:57 [error] 22359#22359: *19616 FastCGI sent in stderr: "PHP message: PHP Warning: is_file(): open_basedir restriction in effect. File({{ data.thumb.src }}) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 485PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File({{ data.thumb.src }}) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 490PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File(.) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 490PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File({{ data.thumb.src }}) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 580PHP message: PHP Warning: is_file(): open_basedir restriction in effect. File({{) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 485PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File({{) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 490PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File(.) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 490PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File({{) is not within the allowed path(s): (/home/example/webapps/example:/var/lib/php/session:/tmp) in /home/example/webapps/example/wp-content/plugins/shortpixel-image-optimiser/class/Model/File/FileModel.php on line 580", client: 172.105.206.169, server: example.com, request: "GET /updates/ HTTP/2.0", host: "example.com"

    I am using the NGINX server if it matters.
    P.S Hide the website name with an example.com

    • This topic was modified 2 years, 5 months ago by Garry.
Viewing 1 replies (of 1 total)
  • Plugin Author Pedro

    (@petredobrescu)

    Hello @mrgarry05,

    First of all, this is a warning and not an error ??

    Then, from our experience, this is something that should be raised with your web host, because these limitations are usually added by the hosts in order to avoid potential access of files from one customer to another (when they share certain resources/paths).

    My suggestion would be to ask your host to add our plugin path to the PHP/open_basedir path and then restart PHP/NGINX and see if the error keeps showing up. We had recently some customers with the same messages and it was finally resolved by the host (in that case Kinsta).

    Please let us know if it got solved.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Warning: is_file(): open_basedir restriction in effect.’ is closed to new replies.