• Resolved Mirco Babini

    (@mirkolofio)


    Those options are not working on GreenGeeks. The reason has been found into SiteGround_Optimizer\Ssl\Ssl class, method switch_protocol().

    The exec() function for the wp search-replace command returns:
    – status = 255
    – output =

    array(7) {
      [0]=>
      string(24) "X-Powered-By: PHP/7.4.33"
      [1]=>
      string(38) "Content-type: text/html; charset=UTF-8"
      [2]=>
      string(0) ""
      [3]=>
      string(76) "WP-CLI only works correctly from the command line, using the 'cli' PHP SAPI."
      [4]=>
      string(73) "You're currently executing the WP-CLI binary via the 'cgi-fcgi' PHP SAPI."
      [5]=>
      string(100) "In case you were trying to run this file with a web browser, know that this cannot technically work."
      [6]=>
      string(171) "When running the WP-CLI binary on the command line, you can ensure you're using the right PHP SAPIby checking that <code>php -v</code> has the word 'cli' in the first line of output."
    }

    Let me know if this is something you can work around or make compatible somehow.
    Or if there’s a way to change the php sapi cli to cgi-sfgi. Maybe using system() or passthru()?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mirco Babini

    (@mirkolofio)

    Or maybe just telling the UI the error is something with the exec, and let me run the command manually (then activate the options even if in a manually manner).

    Plugin Support Preslav Kenanov

    (@preslavkenanov)

    Hello @mirkolofio,

    The error you encounter indicates that you are trying to use the WP-CLI binary via cgi-fcgi (FastCGI PHP Processing). This error is related to the hosting environment and not the Speed Optimizer plugin. As such, in order to address this issue, it would be best to get in touch with your hosting provider and ask them for a way to change the PHP Handler from cgi-fcgi to php-cli in order to be able to use WP-CLI. After that you will be able to execute the WP-CLI commands associated with the Speed Optimizer plugin.

    Kind Regards,

    Preslav

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Enforce HTTPS and Insecure Content Fixer issue’ is closed to new replies.