tri5
Forum Replies Created
-
Forum: Plugins
In reply to: [Disqus Comment System] Unable to connect to the Disqus API servers@israeliteknight you can maybe try to emulate the behavior of curl by using a polyfill. i just searched google and the first entry was this.
https://github.com/maxnyby/cURL-polyfill
Just include it somewhere in the wp code, in the /index.php perhaps (the soonner you include in the code the better). There actually is a slim chance by modifying this class you can somehow overcome the issue you are having, since it is built upon fopen() method, which might (or might not) support https connections. I did not tested it although.
Other options would be migrating your site to an another provider, or running your own VPS (where you can basically configure your web environment to your requirements) are seem to be alternatives in your case.
Forum: Plugins
In reply to: [Disqus Comment System] Unable to connect to the Disqus API servers@boomhauer usually the forward- and backslashes are translated by PHP on windows systems (you can even mix them up in one sentence, no matter), but it’s better to use forward slashes only to keep the compatibility with *nix systems as well in case you wish to upgrade to a different operating system. However for webpages, targeted to windows systems only the backslash is going to be just fine.
If you wish to maximize compatibility for file operations the PHP’s “directory separator” constant can be used to properly build path strings:
CURLOPT_CAINFO => __DIR__ . DIRECTORY_SEPARATOR . 'cacert.pem'
This will ensure the slash in the path will always be compatible with the running environment.
Forum: Plugins
In reply to: [Disqus Comment System] Unable to connect to the Disqus API serversIn the lib/api/disqus/url.php:55 the _dsq_curl_urlopen() function uses CURL to fetch certain informations from the webs. CURL won’t be able to validate the https connections unless you have certificates set. This is why plugin fails to operate.
Solution is https://curl.haxx.se/docs/caextract.html get the cacert.pem and place the file in the lib/api/disqus/ folder. This will provide aid in the validation process.
Add these two keys to the $c_options array as well:
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_CAINFO => __DIR__ .’/cacert.pem’This will help to load the certs and apply it for the connection, so the validation won’t fail.
Alternatively this validation process can be disabled, but it is not recommended for live products.
https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html