[resolved] wp_http_supports( array( 'ssl' ) ) yeilds true on a local server (3 posts)

  1. umchal
    Posted 2 years ago #

    Hi there,

    The function call wp_http_supports( array( 'ssl ) ) always returns true on my local server which does not enable ssl connection.

    Is it normal?

    WordPress 3.8.1
    PHP 5.2.4
    Apache 2.2.22

  2. Chris
    Posted 2 years ago #

    The way I see it is that wp_http_supports() bases its test on the "first availabel transport" method.
    If that is CURL you might even have SSL support without knowing it - depending on your CURL installation.

    Maybe this q&d check gives you more infos.

    $objFetchSite = _wp_http_get_object();
    $transport    = $objFetchSite->_get_first_available_transport( array('ssl' ) );
    // see which method WP is preferring in your environment.
    var_dump( $transport );
    // if curl is tool of choice check the meta data
    if( preg_match( '#curl#i', $transport ) ) {
      $version  = curl_version();
      // take a look if your curl version CAN handle SSL
      // something along the line on ssl_version...
      var_dump( $version );
  3. umchal
    Posted 2 years ago #

    So it's not about whether the WordPress installed site can be accessed with ssl but whether the site can access external servers with ssl.

    Thanks for the info.

Topic Closed

This topic has been closed to new replies.

About this Topic