Blogger Information
Blog 15
fans 0
comment 0
visits 20690
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP-openssl
李子的博客
Original
3123 people have browsed it

开发的电脑是win10(x64),为了学习laravel5.7,php已经升级为php7.3(x64),但是laravel5.7安装好后报错


Call to undefined function openssl_cipher_iv_length()


phpinfo()看到 Phar下:OpenSSL supportdisabled (install ext/openssl),就表示oepnssl扩展无效。


网上搜索了一大堆什么拷贝libeay32.dll和ssleay32.dll,都不行,php7.3的64位下,根本没有这2个文件。


下面开始上解决办法:


1、查看自己的php版本


我的phpinfo()看到


PHP Extension BuildAPI20180731,TS,VC15


 


2、下载openssl扩展dll(最核心最核心最核心的步骤)


通过步骤1,我知道需要下载VC15的版本,打开官方下载网址:


https://windows.php.net/downloads/php-sdk/deps/vc15/x64/


我下载了openssl-1.1.0j-vc15-x64.zip


解压后bin目录能看到libcrypto-1_1-x64.dll和libssl-1_1-x64.dll,拷到php和apache的bin下


3、php和apache的配置


这里的配置都是一样的,网上很多


1) php.ini


extension=php_openssl.dll



extension_dir = "E:\Program Files\php73\ext"


2)apache的httpd.conf


LoadModule ssl_module modules/mod_ssl.so


 


重启apache后,终于成功了,phpinfo()能看到openssl模块,OpenSSL support    enabled,大功告成。

--------------------- 

作者:michaelzhouh 

来源:CSDN 

原文:https://blog.csdn.net/michaelzhouh/article/details/86135727 

版权声明:本文为博主原创文章,转载请附上博文链接!


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!