stream_socket_enable_crypto(): this stream does not support SSL/crypto
twocode

    PHP调用邮件类时报错

    stream_socket_enable_crypto(): this stream does not support SSL/crypto

    就是php.ini下openssl扩展默认情况下是没有打开:

    wamp下:

     ;extension=php_openssl.dll

    Lamp下:

     sudo apt-get install openssl libcurl3-openssl-dev #需要先安装openssl

     #进入php源码解压目录

     cd /path/to/php/ext/openssl

     /usr/local/php/bin/phpize

     ./configure --with-php-config=/usr/local/php/bin/php-config --with-openssl

     make

     sudo make install

     安装成功后在php.ini中加上

     extension=openssl.so   

     重启Apache|nginx后生效~!


相关文章:
,请先登录查看所有评论
网友评论已关闭