Problem with non-ssl url and cURL
-
Hi,
I’m using WP-Piwik 1.0.2 with Piwik 2.13.1 on WordPress 4.2.2 with PHP 5.4.41-0+deb7u1, cURL 7.26.0-1+wheezy13.
I’ve encountered an quite puzzling problem, which resolved itself somehow?! I post this here mainly for documentation.It looks like that cURL doesnt always like to connect to http-urls (not https!) if CURLOPT_SSL_VERIFYPEER is true.
My blog told me out of nowhere “WP-Piwik 1.0.2 was not able to connect to Piwik using your configuration. Check the >> Connect to Piwik << section below.”
I’ve checked the settings, used the testscript, also resetted the plugin, nothing worked.
So I searched the plugincode for the place where the connection to Piwik is made and created a little testscript out of the used cURL options. With CURLOPT_SSL_VERIFYPEER false it worked, with true it failed (didnt even try to open anything, as my apache logs tell me).I’ve changed “HTTP connection via” to “fopen” and it worked again. “Disable SSL peer verification” also worked, but I dont like it.
Curiously I checked other blogs on my machine and that of my girlfriend encountered the same problem, but another not.
Now my blog also allows the use of cURL again, without any trouble.This is quite disturbing, maybe anybody has an idea what was going on? Some disturbance of the might?
I use fopen from now on, as I had a similar problem some time ago (nothing was tracked) and hope this is more stable.
Regards,
Toby
- The topic ‘Problem with non-ssl url and cURL’ is closed to new replies.