Title: PHP Warning and Webp Doesn&#8217;t work
Last modified: July 19, 2022

---

# PHP Warning and Webp Doesn’t work

 *  Resolved [scontomio](https://wordpress.org/support/users/scontomio/)
 * (@scontomio)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-and-webp-doesnt-work/)
 * 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)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-and-webp-doesnt-work/#post-15840761)
 * [@scontomio](https://wordpress.org/support/users/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](https://wordpress.org/support/users/scontomio/)
 * (@scontomio)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-and-webp-doesnt-work/#post-15842524)
 * 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?
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-and-webp-doesnt-work/#post-15844575)
 * [@scontomio](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Harshad](https://wordpress.org/support/users/bornforphp/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-and-webp-doesnt-work/#post-15844575)
 * Status: resolved