I am currently working on a project which makes an ajax call to my API on the same server. All went good and fine till a few hours ago when cURL suddenly stopped working without any reason and it's giving me following error
Protocol https not supported or disabled in libcurl
But it doesn't make any sense because it worked earlier and the only thing I changed was something in the login-screen (only PHP) and the timezone on the server from default to "Europe/Berlin" with
dpkg-reconfigure tzdata
[php.ini] date.timezone = "Europe/Berlin";
I've already restarted apache2, rebooted the server, checked the php.ini file and my phpinfo, it's all the same without any errors or changes, but curl just won't work. I tried to curl other hosts & localhost but nothing works. I also checked /var/mail/root, there aren't any errors.
Few information to my server
- Debian 8
- SSL certificate by Symantec
- full-root-access without any restrictions
That's the cURL-Code I am using
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, count($params));
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
session_write_close();
$result = curl_exec($ch);
curl_close($ch);
session_start();
Like I said it worked fine and without any problems for longer than 1 month. That's the weirdest thing I've ever seen. I hope somebody can help me. If not, are there any good alternatives to curl? (POST-Requests)
Thanks in advance!