OpenSSL support disabled in Apache/PHP on Windows

2020-05-29 11:53发布

问题:

openssl is disabled apache2.4 with php7.1

in phpinfo(); results give me this

OpenSSL support disabled (install ext/openssl)

  1. i changed this in php.ini

extension=php_openssl.dll

  1. i use this code using WINDOWS CMD

set OPENSSL_CONF=/path/to/openssl.cnf

  1. its enabled when use in CMD this but its disabled in phpinfo();

php --ri openssl OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.0.2j 26 Sep 2016 Openssl default config => C:/jampp/php71/extras/ssl/openssl.cnf

its now working in CMD and but phpinfo(); not and in laravel 5 show me this error

Call to undefined function openssl_encrypt()

Thanks

回答1:

Thank you all its just need includes the (DLLs files of php) into httpd.conf

LoadFile "C:/jampp/php/libeay32.dll"
LoadFile "C:/jampp/php/ssleay32.dll"
LoadFile "C:/jampp/php/php7ts.dll"
LoadFile "C:/jampp/php/libpq.dll"