• Resolved FormulaRon

    (@formularon)


    Hello Support,

    I’ve stumbled across a similar PHP error that others have reported previously. Not when using but when deactivating the plugin.

    I get the following crash reported…

    ordPress version 6.2
    Active theme: Twenty Fourteen Child 2023 (version 23.03.01)
    Current plugin: WP-Optimize - Clean, Compress, Cache (version 3.2.14)
    PHP version 8.1.16
    
    
    
    Error Details
    =============
    An error of type E_ERROR was caused in line 161 of the file /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php. Error message: Uncaught Error: Call to undefined function WebPConvert\Convert\Converters\escapeshellarg() in /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php:161
    Stack trace:
    #0 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php(252): WebPConvert\Convert\Converters\ImageMagick->createCommandLineOptions('6.9.10-68')
    #1 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php(57): WebPConvert\Convert\Converters\ImageMagick->doActualConvert()
    #2 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php(95): WebPConvert\Convert\Converters\ImageMagick->convertTwoAndSelectSmallest()
    #3 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php(256): WebPConvert\Convert\Converters\ImageMagick->runActualConvert()
    #4 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php(295): WebPConvert\Convert\Converters\AbstractConverter->doConvertImplementation()
    #5 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/webp/class-wpo-webp-test-run.php(48): WebPConvert\Convert\Converters\AbstractConverter->doConvert()
    #6 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/webp/class-wp-optimize-webp.php(55): WPO_WebP_Test_Run::get_converter_status()
    #7 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/webp/class-wp-optimize-webp.php(20): WP_Optimize_WebP->set_converter_status()
    #8 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/webp/class-wp-optimize-webp.php(43): WP_Optimize_WebP->__construct()
    #9 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/wp-optimize.php(262): WP_Optimize_WebP::get_instance()
    #10 /home/beggarsf/public_html/wordpress/wp-content/plugins/wp-optimize/wp-optimize.php(1807): WP_Optimize->get_webp_instance()
    #11 /home/beggarsf/public_html/wordpress/wp-includes/class-wp-hook.php(308): wpo_deactivation_actions(false)
    #12 /home/beggarsf/public_html/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #13 /home/beggarsf/public_html/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #14 /home/beggarsf/public_html/wordpress/wp-admin/includes/plugin.php(814): do_action('deactivate_wp-o...', false)
    #15 /home/beggarsf/public_html/wordpress/wp-admin/plugins.php(209): deactivate_plugins('wp-optimize/wp-...', false, false)
    #16 {main}
      thrown
    
    

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Can you try unchecking the option to create WebP images before deactivating the plugin?

    Thread Starter FormulaRon

    (@formularon)

    I’ve never enabled “Automatically compress newly-added images” nor for any manual compressions but I do notice that on the “Compress Image” settings…

    WebP conversion

    No WebP conversion tools are available on your web-server.”

    …is displayed and which would then explain the failure to find the function.

    There were 2 webp images on the site. I’ve replaced them with jpg’s, but still crashes and I don’t get a stack trace now.

    Plugin Contributor Venkat Raj

    (@webulous)

    @formularon I assume, your hosting provider added PHP’s built in function escapeshellarg to disable_functions directive for security purposes.

    You can add define('WPO_USE_WEBP_CONVERSION', false); to your wp-config.php file to prevent this.

    Thread Starter FormulaRon

    (@formularon)

    Thanks for that clue.

    I’ve added that, and the webp text has disappeared from the Settings.

    But it still crashes but with no stack trace.

    Plugin Contributor Venkat Raj

    (@webulous)

    @formularon Could you please provide more information about your server? Do you use clourflare?
    If you would like to discuss this in private, please send email [email protected]

    Thread Starter FormulaRon

    (@formularon)

    Hello Venjkat,

    No I don’t used Cloudfare. The hosting is with https://www.uk2.net/ here in the UK. https://www.uk2.net/web-hosting/

    I have another site, with a second account with UK2 which also uses WP Optmise. The plugin here is 2 versions earlier and the same issue occurs there as well.

    It’s not a show stopper for me. I routinely activate/deactivate those plugins I use infrequently.

    Nigel

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP crash when deactivating plugin’ is closed to new replies.