PHP OpenSSL extension not working while installing TYPO3 6.2.2 on Windows 7

34,026

Solution 1

Solution that worked for me on XAMPP and Windows Vista:

  • Activate the PHP module openssl

    Open php.ini and uncomment(delete ';') in:

    ;extension=php_openssl.dll

    Double-check that the extension is enabled by running phpinfo().

  • Add a system environment variable "OPENSSL_CONF" with value

    C:\xampp\apache\conf\openssl.cnf

    ...assuming you installed xampp into C:\xampp.

  • Set path to 'openssl.exe', which is in C:\xampp\apache\bin

    • Either set $TYPO3_CONF_VARS['SYS']['binSetup'] in ...\htdocs\typo3_src-6.2.x\typo3\sysext\core\Configuration\DefaultConfiguration.php to 'openssl=c:/xampp/apache/bin/openssl.exe'

    • or append c:\xampp\apache\bin to the environment variable PATH (will work for every PHP script not only TYPO3)

  • Restart xampp

Links/sources:

Solution 2

To enable OpenSSL on PHP under Windows, three steps must be taken:

  1. enable the extension – make sure to uncomment this line in php.ini:

    extension=php_openssl.dll

  2. Add the PHP folder to the PATH environment variable of Windows:

    Control Panel –> System –> Advanced System Settings –> Environment Variables.
    Locate the Path variable in the System Variables block.
    Prepend c:\php; in front of it, or whatever your PHP path is.

  3. Create an additional OPENSSL_CONF environment variable for Windows which contains the full path of the OpenSSL config file of PHP:

    Control Panel –> System –> Advanced System Settings –> Environment Variables.
    In the System Variables block click New...
    Variable name: OPENSSL_CONF
    Variable value: C:\php\extras\ssl\openssl.cnf
    Modify that value to match your PHP installation directory!

Restart Windows so the environment changes can take effect.

Details on PHP OpenSSL support under Windows can be found here.

Solution 3

On typo3 6.2.7on win7 XAMPP 1.8.3

The openSSL error's solution was to create C:\openssl-1.0.1i-win32\ssl folder and put E:\Portables\xampp\apache\conf\openssl.cnf into it. I got a direction about it from a german website.

How I found it out (just in case versions change), in the shell on XAMPP control panel, openssl command gives

WARNING: can't open config file: E:/Portables/xampp/apache/bin/openssl.cnf.

But adding the file there does not help. I added and removed the file.

Add ;E:\Portables\xampp\apache\bin to PATH environment variable (System properties -> Advanced). Run command openssl on a CMD window(not XMPP shell), the message:

WARNING: can't open config file: c:/openssl-1.0.1i-win32/ssl/openssl.cnf

Add the file there, the addition to environment variable PATH can be removed now.

Adding OPENSSL_CONF also did not work for me.

Solution 4

Set a global environment variable OPENSSL_CONF to %ProgramFiles(x86)%\PHP\Current\extras\openssl.cnf

Share:
34,026

Related videos on Youtube

user3471037
Author by

user3471037

Updated on July 09, 2022

Comments

  • user3471037
    user3471037 almost 2 years

    I've installed TYPO3 6.2.2 on Windows 7 but I got an error message as below:

    PHP OpenSSL extension not working Something went wrong while trying to create a new private key for testing. Please check the integration of the PHP OpenSSL extension and if it is installed correctly.

    I try to find the solution on the internet about this error but I cannnot solve this bug.

    Can anyone help me to find the solution please? Thanks.

    • Satya
      Satya almost 10 years
      have you enabled extension=php_openssl.dll in php.ini
    • user3471037
      user3471037 almost 10 years
      I already enabled it.
    • Satya
      Satya almost 10 years
      and /i guess you restarted Apache after enabling the extension
  • tttpapi
    tttpapi over 9 years
    I have the same problem and even this solution did not help me.
  • gebi
    gebi over 8 years
    Make sure to restart the whole xampp control panel (as stated in the answer). Restarting only apache from the xampp control panel is not enough, probably because apache doesn't see the new environment variable(s) this way.
  • Anton Boritskiy
    Anton Boritskiy over 8 years
    "Add an environment variable "OPENSSL_CONF" with value" - this should be a system environment variable not the one set with Apache's SetEnv instruction. Spent quite some time before realized that.
  • Alan
    Alan over 8 years
    @AntonBoritskiy true, thanks for pointing this out. I've edited the answer.
  • Black
    Black almost 8 years
    I am using version 8.1.2 of typo3 and there is no $TYPO3_CONF_VARS['SYS']['binSetup'] in DefaultConfiguration.php
  • Simon Zyx
    Simon Zyx almost 7 years
    this worked for me with xampp 7.1.7 and typo3 8.7.3, too
  • Nils Lindemann
    Nils Lindemann about 5 years
    This worked. It seems to be irrelevant if PHP is on the PATH or if in the PHP.ini extension=openssl is commented out and if openssl.cafile and curl.cainfo points to an existing CRT or PEM file... i dont understand this at all, but im happy that the Typo3 installer (tested with v9) is happy now :-/