• Resolved scontomio

    (@scontomio)


    I get this php warning and the webp creation doesn’t work

    [19-Jul-2022 06:19:39 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(.webp) is not within the allowed path(s): (/var/www/mydomain.com/:/usr/lib/php/:/tmp/) in /var/www/mydomain.com/wp-content/plugins/wp-optimize/webp/class-wpo-webp-alter-html.php on line 211

    Do I need to make any changes to the php.ini or similar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @scontomio Could you please edit wp-config.php file and

    Replace

    define('WP_DEBUG', false);

    with this:

    ini_set('log_errors','On');
    
    ini_set('display_errors','Off');
    
    ini_set('error_reporting', E_ALL );
    
    define('WP_DEBUG', false);
    
    define('WP_DEBUG_LOG', true);
    
    define('WP_DEBUG_DISPLAY', false);

    Let us know if replacing with the above lines the warnings goes away?

    Thread Starter scontomio

    (@scontomio)

    Hi, I have enabled the errors in productions on the file, I can see those warnings by looking at the log file.

    Does it take some configuration of php to get the webp part to work?

    @scontomio Could you please contact your host and ask them to modify the open_basedir settings in your hosting account and set them to none.

    Once its set to none then check if it works?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Warning and Webp Doesn’t work’ is closed to new replies.