我試圖在我的 Wampserver 上打開一個站點的 index_dev.php 檔案,但我收到了這個錯誤:
Internal Server Error - PHP Warning - Configure the "curl.cainfo", "openssl.cafile" or "openssl.capath" php.ini setting to enable the CurlHttpClient
我試圖對如何在 WAMP 上啟用 curl 進行一些研究,但我看到的所有資訊都是針對 PHP 5.x
至于配置,我不知道應該對我的 php.ini 檔案中的“curl.cainfo”、“openssl.cafile”或“openssl.capath”設定做什么。
在此先感謝您的幫助!
uj5u.com熱心網友回復:
轉到https://curl.se/docs/caextract.html并下載最新.pem檔案。
將.pem檔案復制到.....好吧,我把我的C:\wamp64\bin\php叫做cacert.pem
這包含一大堆證書,因為該檔案是由 Mozilla 創建的,所以我們有點信任它。
現在使用 WAMPManager,編輯當前php.ini檔案
left click wampmanager -> PHP -> php.ini
找到這個引數,它會被注釋掉 ;
;openssl.cafile=
將其更改為
openssl.cafile="c:/wamp64/bin/php/cacert.pem"
保存編輯,然后重新啟動 Apache 以激活更改
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/410366.html
標籤:
