Fix Google reCaptcha invalid-json error

使用 Google reCaptcha 驗證碼進行後端驗證,拋出 invalid-json 錯誤,分享解決這問題的方法:

解決方法:

開啟檢查 PHP.ini 設定,搜尋「allow_url_fopen」,若值不是 On 請改成 On 開啟它,如下:

allow_url_fopen = On

接著搜尋「extension=php_openssl.dll」,確認是否開啟,前方有分號「;」代表沒開啟

;extension=php_openssl.dll

將前方的分號「;」移除,如下:

extension=php_openssl.dll

重新啟動 SERVER

 [……]

閱讀更多

Warning: file_get_contents(): Unable to find the wrapper “https” …

解決錯誤訊息:

Warning: file_get_contents(): Unable to find the wrapper “https” – did you forget to enable it when you configured PHP?

解決方法:

需要開啟 php php_openssl 的這個 extension
開啟 php.ini,搜尋:「extension=php_openssl.dll」

;extension=php_openssl.dll

將前方的分號「;」移除

extension=php_openssl.dll

重新啟動 SERVER[……]

閱讀更多