WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. umchal
    Member
    Posted 6 months 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
    Member
    Posted 5 months 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 );
    
    }
    exit;
  3. umchal
    Member
    Posted 5 months 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.

Reply

You must log in to post.

About this Topic