openssl 安装好了 php如何打开,开启openssl
一、php配置項打開,一共3處要改:
~~~
文件位置:
D:\phpStudy\php\php-5.6.27-nts\php.ini
~~~
第一處:2個地方去掉前面的 ;
~~~
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "./"
; On windows:
extension_dir = "ext"
~~~
第二處:1個地方去掉前面的 ;
~~~
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
~~~
第三處:1個地方去掉前面的 ;并在后面加上CA證書路徑。
注意:因為SSL連接需要認證,所以繼續下面的步驟之前,需要準備好CA證書(在phpstudy中建議把證書保存到D:\phpStudy\php\verify目錄中,因為其它版本的PHP也要用到),可以從https://curl.haxx.se/docs/caextract.html處下載。
~~~
[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile=D:\phpStudy\php\verify\cacert.pem
~~~
二、php.ini配置完成保存,重啟phpstudy。

沒有報錯了,說明問題解決。
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的openssl 安装好了 php如何打开,开启openssl的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 修改oracle用户权限,详解如何实现O
- 下一篇: php跨域同步登录,织梦PC端移动端会员