I don’t get Site Kit to work with PHP 8.3 and 8.4 on some of my websites. It seems to be erratic behavior. Sometimes it works after downgrading to PHP 7.4, reconnecting Site Kit and then upgrading to 8.4 again – but more often it does not. It displays the error:
Unknown Error (code: GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.).
The configuration of PHP 7.4 seems to be no different then 8.4, and, as I said, sometimes it works. Any ideas/fixes?
Thanks for reaching out @mikeemesser, and appreciate the insights across your websites. We do test Site Kit frequently using PHP 8.3 and 8.4. In some cases, some deprecation errors or warnings can come from some of the dependencies, as opposed to anything actionable from within the Site Kit codebase.
Unknown Error (code: GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.).
I suspect this may be related to more a server configuration, but I would be happy to check this with the team. It’s possible that your host server is not configured to allow GuzzleHttp, or something went wrong with allow_url_fopen.
While I will check the above with the team, given you mention a data error which could have difference causes, please share the following on one of your impacted sites:
A screen recording of your experience on this same site should you be able to recreate the same. You can use a service such asLoom or Zight to share a screen recording, while using the same form to share this privately.
Do you see any warnings or errors when checking your Site Health status (Tools > Site Health > Status), which differs from your Site Health information requested above? Such errors may include cURL and other error references.
Let me know if you have any question with the above. Depending on what we can see, some troubleshooting steps we may then suggest could be to check for the same errors when downgrading PHP version, or running some checks with the Health Check & Troubleshooting plugin. Thank you.
Thanks for sharing the additional information @mikeemesser. From reviewing the details you kindly shared, it looks like cURL functions are disabled for the site that is not working. See below:
Rather than this being an issue specifically with Site Kit, you can reach out to your hosting provider and ensure that curl_exec and curl_multi_exec are enabled. Given the error from the screenshot you shared also indicates that allow_url_fopen isn’t enabled, you may wish to check for this also.
Let me know how you get on with the above, or ask if you have any questions. Note also that if preferred, you can remain using a version of PHP that does work for you. Site Kit at present supports all versions from 7.4 upwards.
This reply was modified 10 months, 2 weeks ago by James Osborne.
Glad to hear it @mikeemesser. If you run into any further errors or if you have any Site Kit related queries, be sure to get in touch. If you have a moment free please also consider leaving a review given it sounds like you use Site Kit across multiple sites. We’d love to hear your feedback.