Title: PHP Error message (Division by Zero) ?
Last modified: August 31, 2016

---

# PHP Error message (Division by Zero) ?

 *  Resolved [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/)
 * Since installing the EWWW Image Optimizer plugin on several sites, I am seeing
   this message showing up in my error logs:
 * `PHP Warning: Division by zero in .../wp-includes/embed-template.php on line 
   55`
 * The error is sporadic, maybe occurring 2 or 3 times a day; and when it happens
   it repeats two or three times. I haven’t noticed any problem with plugin function;
   I would not have known there was a problem other than from my checking the error
   logs. I’m not even 100% sure that it comes from this plugin — just that it started
   showing up only after the plugin was activated.
 * Any idea what causes this and whether it is something to be concerned about?
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

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

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192338)
 * That definitely isn’t from EWWW, it is used “when a post is embedded in an iframe”
   and there is a post thumbnail. The condition appears to be when your theme (or
   some plugin) has registered an image resize with a height of zero. You can check
   for such resizes on the EWWW Advanced settings, and if you can track down where
   it came from, the correct way to set an “unspecified” height is 9999.
 *  Thread Starter [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192417)
 * Thank you so much for your extremely prompt reply.
 * Can you clarify what I need to do to “check for such resizes on the EWWW Advanced
   settings” I can’t figure out which box I need to tick or what information I would
   need to add to check.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192420)
 * On the Advanced settings, look for any resizes with a height of 0. Write down
   the name of the resize, and then search your theme folder, and then your plugins
   folder for any mention of that resize name.
 *  Thread Starter [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192424)
 * I’m so sorry, still confused. Do you mean the list of resize options in the “
   Disable resizes” section? I do see a number of files sizes listed, although nothing
   with a 0 height.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192425)
 * Yeah, that’s what we’re looking for. If there are no 0 height resizes, I’m not
   sure what is causing that error.
 * Perhaps check under Settings->Media to see if any of those are set to 0.
 *  Thread Starter [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192434)
 * Nothing there, either …. I’ll just keep an eye things for now. Thanks for trying
   to help.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192511)
 * Just realized that EWWW could be triggering the glitch if you are using the WebP
   conversion, since we add the webp images to the metadata with height and width
   = 0. Is that possible in your case?
 * Not much I can do about it, they are listed that way to avoid WP detecting them
   and accidentally displaying them when it shouldn’t. I was hoping they might have
   changed it in 4.5, but they did not, so the best you can do is just ignore it.
 *  Thread Starter [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192515)
 * Thanks — that makes sense because I did enable WebP conversion.
 * I did figure out what is triggering the error on at least one site. It gets triggered
   when the Baidu spider looks for an /embed/ subdirectory — that pulls up an xml
   page with picture but also triggers 2 instances of the PHP error every time it
   happens.
 * If it turns out to be the same cause with the other site, I’ll see whether I 
   can simply block Baidu via robots.tx

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

The topic ‘PHP Error message (Division by Zero) ?’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 8 replies
 * 2 participants
 * Last reply from: [Abigailm](https://wordpress.org/support/users/abigailm/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/php-error-message-division-by-zero/#post-7192515)
 * Status: resolved