SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Unable to find the wrapper "https" (PHP 5.3)

    I have an order form that goes to UPS and gets various prices for different shipping options. Here's the basic code that I use to do that:

    PHP Code:
    $xml arbitrary_xml_building_function();
    $stream_params = array(
        
    'http' => array(
            
    'method' => 'POST',
            
    'header' => 'Content-Type: application/x-www-form-urlencoded',
            
    'content' => $xml
        
    )
    );
    $ctx stream_context_create($stream_params);
    $fp fopen('https://wwwcie.ups.com/ups.app/xml/Rate''r'false$ctx);
    $response stream_get_contents($fp);
    fclose($fp);
    $response simplexml_load_string($response);
    return 
    $response
    This works on the actual server, which is using PHP 5.2.13, but I've recently updated my development computer to PHP 5.3.2 and I get the following error:

    Warning: fopen() [function.fopen]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
    Did I leave something out when I configured PHP?

  2. #2
    SitePoint Evangelist AlienDev's Avatar
    Join Date
    Feb 2007
    Location
    UK
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at your php.ini and see if the 'openssl' extension is enabled or not.

    If it is disabled (commented with a semi-colon), enable it then restart Apache.
    Me on StackOverflow | Blog & personal website.

    I mostly use: PHP, Java, JavaScript, Android.

  3. #3
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlienDev View Post
    Look at your php.ini and see if the 'openssl' extension is enabled or not.

    If it is disabled (commented with a semi-colon), enable it then restart Apache.
    I found this line in my php.ini file:

    ;extension=php_openssl.dll
    I took out the semi-colon, stopped Apache, then started it. But the same warning shows up. Is there some way to verify that the extension was, in fact, enabled, perhaps in phpinfo()?

  4. #4
    SitePoint Evangelist AlienDev's Avatar
    Join Date
    Feb 2007
    Location
    UK
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, phpinfo() will have it. Open the info page and look for a big heading saying "openssl".

    On my server, openssl also appears under the curl heading.
    Me on StackOverflow | Blog & personal website.

    I mostly use: PHP, Java, JavaScript, Android.

  5. #5
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlienDev View Post
    Yes, phpinfo() will have it. Open the info page and look for a big heading saying "openssl".

    On my server, openssl also appears under the curl heading.
    No openssl and no curl. I searched the page for "openssl" and only found these two references to it, under "Phar":

    OpenSSL Support: disabled (install ext/openssl)
    I looked in the "ext" folder of php, and found php_openssl.dll right where it should be. The ini file definitely has the appropriate line un-commented. Is it possible I'm missing certain other files?

  6. #6
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Install OpenSSL:
    http://www.slproweb.com/products/Win32OpenSSL.html

    If you start PHP from the command line, it will show you errors that would otherwise not appear if you started Apache as a service.

  7. #7
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sk89q View Post
    Install OpenSSL:
    http://www.slproweb.com/products/Win32OpenSSL.html

    If you start PHP from the command line, it will show you errors that would otherwise not appear if you started Apache as a service.
    That did it, thank you.

    (I guess it would have been helpful to mention I was running it on Windows; mea culpa.)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •