Page 1 of 1

HTTPS/Curl always returning false Ubuntu

Posted: Wed Jan 21, 2009 4:05 am
by panic!
Hi all,

I've having a problem with one of my servers: anytime I try and curl a secure URL it returns false, when exactly the same script on the other server returns the page content.

I'm thinking I might have to install some SSL related package on the server but I've tried loads and they all seem to be installed.

Both servers are Ubuntu 8.10

Code: Select all

<?
    $url='https://www.cia.gov/';
    $ch = curl_init ($url);
      $result = curl_exec ($ch); 
      
      
      print $result;
    
    
    
    curl_close ($ch);
   if ( $result == false ){
      print "false";
      }
      else
      {
        print "success";
      }
    return $result;
 
 
 
    ?>
Thanks all.

Re: HTTPS/Curl always returning false Ubuntu

Posted: Wed Jan 21, 2009 4:10 am
by panic!
Why immediately after posting something i've been trying to figure out for an hour do I find the solution?



sudo apt-get install ca-certificates