Fatal error after update WordPress and PHP Version
-
Hello,
I have a problem upgrading WordPress to the latest Version and PHP. I get a critical error ‘after update Fatal error: Uncaught Error: Division by zero in …. /wp-includes/media.php’.
The website has a critical error and is not viewable. This error happens because of having images that have been replaced before the update.
I have over 700 images and it would be hard to go through them one by one to know which ones were changed. Will an update be coming soon (I guess I’m not the only one with this problem) or any idea how to fix this?
Thank you
-
Hi tamarazambrana,
Don’t worry, you won’t need to go over all your images, because the replacement procedure does not affect the rest of your website. In other words, the problem is not because of the plugin having replaced images.
In order to help you troubleshoot this, it would be helpful if you could provide us with some additional information, including:
- Your site information. Please?navigate to?Tools?>?Site Health?>?Info,?click on the?“Copy site info to clipboard”?button and paste the information in your reply.
- The full error log line.
- When is the error happening? After upgrading WordPress or after upgrading the PHP version?
Thank you,
Hi Gerard,
It happens when updating both, if I update only WordPress (6.5) it keeps working, if I update only PHP (8.2) it keeps working, when I have both updated is when it stops working.
` ### wp-core ### version: 6.5 site_language: de_DE_formal user_language: en_US timezone: Europe/Berlin permalink: /wissensblog/%category%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: undefined environment_type: production user_count: 7 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /html/DEV/software-dev wordpress_size: 71,50 MB (74968647 bytes) uploads_path: /html/DEV/software-dev/wp-content/uploads uploads_size: 400,67 MB (420130601 bytes) themes_path: /html/DEV/software-dev/wp-content/themes themes_size: 17,15 MB (17979385 bytes) plugins_path: /html/DEV/software-dev/wp-content/plugins plugins_size: 87,75 MB (92009063 bytes) database_size: 93,08 MB (97599488 bytes) total_size: 670,13 MB (702687184 bytes) ### wp-dropins (3) ### advanced-cache.php: true db.php: true object-cache.php: true ### wp-active-theme ### name: Twenty Twenty-Four (twentytwentyfour) version: 1.1 author: the WordPress team author_website: https://www.remarpro.com parent_theme: none theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates theme_path: /html/DEV/software-dev/wp-content/themes/twentytwentyfour auto_update: Disabled ### wp-themes-inactive (1) ### Software Theme: version: 1.0, author: Tamara Zambrana, Auto-updates disabled ### wp-mu-plugins (1) ### WP Migrate Compatibility: version: 1.3, author: Delicious Brains ### wp-plugins-active (20) ### Autoptimize: version: 3.1.11, author: Frank Goossens (futtta), Auto-updates disabled Borlabs Cookie - Cookie Opt-in: version: 2.2.67, author: Borlabs GmbH, Auto-updates disabled Contact Form 7: version: 5.9.3, author: Takayuki Miyoshi, Auto-updates disabled Enable Media Replace: version: 4.1.5, author: ShortPixel, Auto-updates disabled Flexible Spacer Block: version: 2.3.0, author: Aki Hamano, Auto-updates disabled Honeypot for Contact Form 7: version: 2.1.1, author: Nocean, Auto-updates disabled Loco Translate: version: 2.6.7, author: Tim Whitlock, Auto-updates disabled Permalink Manager Lite: version: 2.4.3.2, author: Maciej Bis, Auto-updates disabled PHP Native Password Hash: version: 3.0, author: Ayesh Karunaratne, Auto-updates disabled Polylang: version: 3.6, author: WP SYNTEX, Auto-updates disabled Query Monitor: version: 3.15.0, author: John Blackbourn, Auto-updates disabled Real Media Library (Free): version: 4.22.11, author: devowl.io, Auto-updates enabled Redirection: version: 5.4.2, author: John Godley, Auto-updates disabled Rewrite Rules Inspector: version: 1.3.1, author: Automattic, Daniel Bachhuber, Auto-updates disabled SVG Support: version: 2.5.5, author: Benbodhi, Auto-updates disabled W3 Total Cache: version: 2.7.1, author: BoldGrid, Auto-updates disabled WP Migrate: version: 2.6.12, author: WP Engine, Auto-updates disabled WP Store Locator: version: 2.2.241, author: Tijmen Smit, Auto-updates disabled Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled Yoast SEO: version: 22.4, author: Team Yoast, Auto-updates disabled ### wp-plugins-inactive (1) ### WP Mail SMTP: version: 4.0.1, author: WP Mail SMTP, Auto-updates disabled ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1690 imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org imagick_version: 3.7.0 file_uploads: 1 post_max_size: 32M upload_max_filesize: 32M max_effective_size: 32 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 756 GB imagick::RESOURCETYPE_DISK: 1.844674407371E+19 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 756 GB imagick::RESOURCETYPE_MEMORY: 378 GB imagick::RESOURCETYPE_THREAD: 1 imagick::RESOURCETYPE_TIME: 1.844674407371E+19 imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: bundled (2.1.0 compatible) gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: not available ### wp-server ### server_architecture: Linux 5.4.0-155-generic x86_64 httpd_software: Apache php_version: 8.2.17 64bit php_sapi: fpm-fcgi max_input_variables: 1500 time_limit: 240 memory_limit: 256M max_input_time: 240 upload_max_filesize: 32M php_post_max_size: 32M curl_version: 7.68.0 OpenSSL/1.1.1f suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true current: 2024-04-04T10:01:18+00:00 utc-time: Thursday, 04-Apr-24 10:01:18 UTC server-time: 2024-04-04T12:01:16+02:00 ### wp-database ### extension: mysqli server_version: 8.0.25-15 client_version: mysqlnd 8.2.17 max_allowed_packet: 268435456 max_connections: 200 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /html/DEV/software-dev/wp-content WP_PLUGIN_DIR: /html/DEV/software-dev/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Undefined WP_DEVELOPMENT_MODE: undefined DB_CHARSET: utf8mb4 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### pll_options ### browser: 0: Detect browser language deactivated rewrite: 1: Remove /language/ in pretty permalinks hide_default: 1: Hide URL language information for default language force_lang: 1: The language is set from the directory name in pretty permalinks redirect_lang: 1: The front page URL contains the language code instead of the page name or page id media_support: 0: The media are not translated sync: 0: Synchronization disabled post_types: post, page, wp_block, wpsl_stores taxonomies: category, post_tag version: 3.6 default_lang: de previous_version: 3.5.1 ### pll_language_de ### name: Deutsch slug: de term_group: 0 term_id: 5 locale: de_DE is_rtl: 0 w3c: de-DE facebook: de_DE home_url: https://software-dev.de/ search_url: https://software-dev.de/ search_url: https:/// page_on_front: 105 page_for_posts: 0 flag_code: de flag_url: https://software-dev.de/wp-content/plugins/polylang/flags/de.png custom_flag_url: 0 active: true fallbacks: 0 is_default: true term_props: language/term_id: 5 language/term_taxonomy_id: 5 language/count: 203 term_language/term_id: 6 term_language/term_taxonomy_id: 6 term_language/count: 16 ### pll_language_en ### name: English slug: en term_group: 0 term_id: 8 locale: en_US is_rtl: 0 w3c: en-US facebook: en_US home_url: https://software-dev.de/en/ search_url: https://software-dev.de/en/ page_on_front: 813 page_for_posts: 0 flag_code: gb flag_url: https://software-dev.de/wp-content/plugins/polylang/flags/gb.png custom_flag_url: 0 active: true fallbacks: 0 is_default: 0 term_props: language/term_id: 8 language/term_taxonomy_id: 8 language/count: 136 term_language/term_id: 9 term_language/term_taxonomy_id: 9 term_language/count: 6 ### pll_warnings ### post-no-lang: post => 6606 , 6617 , 6618 , 6127 , 6114 | page => 6070 , 6078 , 5903 , 6030 , 6034 | wp_block => 2493 , 6363 , 6364 , 6365 , 6366 wpml: plugins/wordpress-seo: /html/DEV/software-dev/wp-content/plugins/wordpress-seo/wpml-config.xml plugins/wp-store-locator: /html/DEV/software-dev/wp-content/plugins/wp-store-locator/wpml-config.xml `
- This reply was modified 7 months, 3 weeks ago by tamarazambrana.
I have also tried deactivating all plugins and activating only one theme from the WordPress directory, the problem remains
I have not managed to fix it yet, but it seems that the problem is, but I have understood that it does not have to do with the images that we have replaced, but images that are inserted in the text with gutenberg.
Thanks for trying to help me
Hi tamarazambrana,
Could you please copy-paste here the full error log line here? Or even better, could you send us a screenshot where we see the error?
Thank you,
Thank you, tamarazambrana.
The error does not seem to be caused by Enable Media Replace. It just says the error is in the file /wp-includes/media.php, which is not part of our plugin. Could you please contact your web developer so they can assist you with this?
Cheers!
Thank you @sixaxis,
as I said above I already found out that the problem comes from the images inserted in line in the Gutenberg Paragraph-Block, more specifically svg images.
I am a web developer ??Ah, I see ??
If you need any help with our plugin then, just let us know!
- The topic ‘Fatal error after update WordPress and PHP Version’ is closed to new replies.