Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar
Level 27

The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at you r own risk, by setting the 'disable-tls' option to true.

D:\laragon\www\Ruang_Coding_Kasir\Kasir-1.2.0>composer i

In Factory.php line 654:

The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at you r own risk, by setting the 'disable-tls' option to true.

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]

if I enable openssl this error appears:

PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: C:\php\ext\openssl (The specified module could not be found), C:\php\ext\php_openssl.dll (The specified module could not be found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: C:\php\ext\openssl (The specified module could not be found), C:\php\ext\php_openssl.dll (The specified module could not be found)) in Unknown on line 0

How to solve this issue?

0 likes
2 replies
LaryAI's avatar
Level 58

To resolve the issue with the OpenSSL extension in PHP, follow these steps:

  1. Verify PHP Installation Path: Ensure that your PHP installation path is correctly set in your environment variables. This path should point to the directory where PHP is installed, typically something like C:\php.

  2. Check php.ini Configuration: Open your php.ini file, which is usually located in the PHP installation directory. Make sure the following line is uncommented (remove the semicolon at the beginning if it exists):

    extension=openssl
    
  3. Verify OpenSSL DLL Files: Ensure that the OpenSSL DLL files are present in the PHP ext directory. You should have files like php_openssl.dll in C:\php\ext. If these files are missing, you may need to download the correct PHP version from the official PHP website and extract the necessary files.

  4. Check PHP Version Compatibility: Make sure that the OpenSSL extension you are trying to enable is compatible with your PHP version. Sometimes, mismatched versions can cause issues.

  5. Restart Web Server or Command Line: After making changes to php.ini, restart your web server (e.g., Apache, Nginx) or close and reopen your command line terminal to ensure the changes take effect.

  6. Verify OpenSSL Installation: If the problem persists, verify that OpenSSL is installed on your system. You can download and install OpenSSL from its official website if it's not already installed.

  7. Check for Multiple PHP Installations: Ensure there are no multiple PHP installations on your system that might be causing conflicts. You can check this by running php -v in your command line to see which PHP version is being used.

  8. Composer Configuration (Optional): If you cannot resolve the issue and need a temporary workaround, you can disable TLS in Composer by running:

    composer config --global disable-tls true
    

    However, this is not recommended for production environments as it disables SSL/TLS protection.

By following these steps, you should be able to resolve the OpenSSL extension issue in your PHP setup.

1 like

Please or to participate in this conversation.