[英]How to enable CurlHttpClient for WAMP in PHP 7.4+?
我正在嘗試為我的 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”設置做什么。
在此先感謝您的幫助!
Go 到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 以激活更改
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.