1) Go to extensions and you'll see the Extras ⇒ View & Install Extensions:
Testing connection to extension server failed: cURL error 6: name lookup timed out
https://extensions.bolt.cm/ is unreachable.
If I use curl at CLI, it works well with https://extensions.bolt.cm/.
For testing purposes, I've created a scipt:
<?php
function nxs_cURLTest($url, $msg, $testText){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
$response = curl_exec($ch);
$errmsg = curl_error($ch);
$cInfo = curl_getinfo($ch);
curl_close($ch);
echo "Testing ... ".$url." - ".$cInfo['url']."<br />";
if (stripos($response, $testText)!==false) {
echo "....".$msg." - OK<br />";
echo "<br> Response-Data:<br>";
print_r(htmlentities($response));
}
else
{
echo "....<b style='color:red;'>".$msg." - Problem</b><br /><pre>";
print_r($errmsg);
echo "<br> cInfo:</br>";
print_r($cInfo);
print_r(htmlentities($response));
echo "</pre>There is a problem with cURL. You need to contact your server admin or hosting provider.";
}
}
nxs_cURLTest("https://extensions.bolt.cm/", "HTTPS to NXS", "bolt");
?>
Also works fine, and output HTML of the Extension-Page. Even tried to use http: instead of https, with same result (error msg).
So wonder why curl within bolt not work at all!
Problem still exist on Bolt 3.0.0
Have try to debug the Problem.
So I opend /vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php/ and change the line 377:
if (isset($options['connect_timeout'])) {
$conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
}
I have change the last Number to 10000, save, and reload the Bolt-Backend.
Then the failure-Message disappear.
I think it is a very important knowledge. Please add it to the documentations here: https://docs.bolt.cm/3.0/howto/curl-ca-certificates#version-changer (or in an own topic).
You can change the "connect_timeout" value in vendor/bolt/bolt/src/Composer/PackageManager.php on line 394:
$this->app['guzzle.client']->head($uri, ['query' => $query, 'exceptions' => true, 'connect_timeout' => 5, 'timeout' => 10]);```
Most helpful comment
Have try to debug the Problem.
So I opend /vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php/ and change the line 377:
I have change the last Number to 10000, save, and reload the Bolt-Backend.
Then the failure-Message disappear.
I think it is a very important knowledge. Please add it to the documentations here: https://docs.bolt.cm/3.0/howto/curl-ca-certificates#version-changer (or in an own topic).