Enable OpenSSL Support for PHP on Windows

As a prerequisite, two libraries must be existing in your Windows system: libeay32.dll and ssleay32.dll. Two ways to achieve this:

  • Install OpenSSL for Windows
  • Or, copy these two files to C:\WINDOWS\system32 folder. They’re shipped with PHP package, you can find them in PHP root folder.

OK, it’s time to open php.ini by using any text editor, and remove the semicolon before the following line:

extension=php_openssl.dll

Done!

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

15 Responses to Enable OpenSSL Support for PHP on Windows

  1. Ravi says:

    Hi

    I m trying to access picasa from my site by using zend frame work
    I did the same what you mention above

    but still i am getting the following error. please have a look

    Fatal error: Uncaught exception ‘Zend_Gdata_App_HttpException’ with message ‘Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?’ in C:\xampp\htdocs\zend\library\Zend\Gdata\AuthSub.php:121 Stack trace: #0 C:\xampp\htdocs\zend\public\Gdata\Photos.php(424): Zend_Gdata_AuthSub::getAuthSubSessionToken(‘CNHF2rCjCBDYk7_…’) #1 C:\xampp\htdocs\zend\public\Gdata\Photos.php(443): getAuthSubHttpClient() #2 C:\xampp\htdocs\zend\public\Gdata\Photos.php(909): processPageLoad() #3 {main} thrown in C:\xampp\htdocs\zend\library\Zend\Gdata\AuthSub.php on line 121

  2. richard says:

    Did you verify that OpenSSL has been enabled in PHP correctly? Double check it, and try phpinfo() to see what's output of your PHP environments.

  3. tom says:

    I didn’t do anything with the two files: libeay32.dll and ssleay32.dll.

    I might have had them already in the appropriate directory, but I doubt it and can’t be bothered to check.

    I did however copy into C:\Program Files\PHP\ext\ the file php_openssl.dll from the php-5.2.9-1-Win32.zip archive I had previously downloaded.

    Added extension=php_openssl.dll to php.ini

    Restarted apache (might not have needed to) and it was then working, with open ssl showing in phpinfo()

  4. ernest says:

    whot does that mean

    Error while executing fopen sending method!
    Please check does PHP have OpenSSL support and check does PHP version is greater than 4.3.0.

  5. EmreCAN says:

    I have PHP 5.3.5 on Windows Apache and and enable openssl by adding Loadmodule entry in php.ini

    When i tried to check if openssl is enabled by using php -r “phpinfo();” from cli, i got it is enabled,
    But when i tried to check from web service using , i got nothing about openssl and i can not use openssl functions.
    And also i copied .dll files to system32 folder.

    What may be the problem?

  6. abhinav says:

    I am using xampp for localhost and I have libeay32.dll and ssleay32.dll both file in php folder. But I did not find extension=php_openssl.dll line in php.ini file and when I write it then after starting apache it says that php_openssl.dll was not found.
    What should I do now?

  7. Ozsvár István says:

    ftp_ssl_connect() is only available if OpenSSL support is enabled into your version of PHP. If it’s undefined and you’ve compiled FTP support then this is why. For Windows YOU MUST COMPILE your own PHP binaries to support this function.

    You can read more about how to compile PHP here: http://www.deciacco.com/blog/php/php-openssl-and-ftp_ssl_connect-on-win32

  8. merv says:

    thanks man it help me a lot.

  9. FabOK says:

    On php-5.2.13-win32, just run the installer (php-5.2.13-win32-installer.msi), click on “Change” and check on “OpenSSL”.
    Piece of cake.
    Cheers!

  10. tomitzel says:

    Don’t forget to restart Windows after you install OpenSSL / copy the .dll files!

  11. Stef says:

    Thank you a lot !

  12. mtk says:

    Thanks mate!

  13. Will Jones says:

    This was just what I needed! Thanks!!! Works perfect! (xampp)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">