Craft\Exception

cURL error “7” encountered while attempting to download “https://backupheroes.co.uk/uploads/images/blogging-336375_1920.jpg”. The error was: “Failed to connect to backupheroes.co.uk port 443 after 3219 ms: Couldn't connect to server”

/home/msvitcou/public_html/BackupHeroes/craft/plugins/imager/models/Imager_ImagePathsModel.php(267)

255             $httpStatus = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));
256             curl_close($ch);
257             fclose($fp);
258 
259             if ($curlErrorNo !== 0) {
260                 unlink($destinationPath);
261                 $msg = Craft::t('cURL error “{curlErrorNo}” encountered while attempting to download “{imageUrl}”. The error was: “{curlError}”', array('imageUrl' => $imageUrl, 'curlErrorNo' => $curlErrorNo, 'curlError' => $curlError));
262                 
263                 if (craft()->imager->getSetting('suppressExceptions')===true) {
264                     ImagerPlugin::log($msg, LogLevel::Error);
265                     return null;
266                 } else {
267                     throw new Exception($msg);
268                 }
269             }
270 
271             if ($httpStatus !== 200) {
272                 if (!($httpStatus == 404 && strrpos(mime_content_type($destinationPath), 'image') !== false)) { // remote server returned a 404, but the contents was a valid image file
273                     unlink($destinationPath);
274                     $msg = Craft::t('HTTP status “{httpStatus}” encountered while attempting to download “{imageUrl}”', array('imageUrl' => $imageUrl, 'httpStatus' => $httpStatus));
275                     
276                     if (craft()->imager->getSetting('suppressExceptions')===true) {
277                         ImagerPlugin::log($msg, LogLevel::Error);
278                         return null;
279                     } else {

Stack Trace

#0
+
 /home/msvitcou/public_html/BackupHeroes/craft/plugins/imager/models/Imager_ImagePathsModel.php(205): Craft\Imager_ImagePathsModel->_downloadFile("/home/msvitcou/public_html/BackupHeroes/craft/storage/runtime/im...", "https://backupheroes.co.uk/uploads/images/blogging-336375_1920.j...")
200 
201         // check if the file is already downloaded
202         if (!IOHelper::fileExists($this->sourcePath . $this->sourceFilename) ||
203           ((craft()->imager->getSetting('cacheDurationRemoteFiles') !== false) && (IOHelper::getLastTimeModified($this->sourcePath . $this->sourceFilename)->format('U') + craft()->imager->getSetting('cacheDurationRemoteFiles') < time()))
204         ) {
205             $this->_downloadFile($this->sourcePath . $this->sourceFilename, $image);
206 
207             if (!IOHelper::fileExists($this->sourcePath . $this->sourceFilename)) {
208                 $msg = Craft::t('File could not be downloaded and saved to “{sourcePath}”', array('sourcePath' => $this->sourcePath));
209                 
210                 if (craft()->imager->getSetting('suppressExceptions')===true) {
#1
+
 /home/msvitcou/public_html/BackupHeroes/craft/plugins/imager/models/Imager_ImagePathsModel.php(36): Craft\Imager_ImagePathsModel->_getPathsForUrl("https://backupheroes.co.uk/uploads/images/blogging-336375_1920.j...")
31                 if (strncmp($image, 'http', 4) === 0 || strncmp($image, 'https', 5) === 0 || strncmp($image, '//', 2) === 0) { // external file
32                     $this->isRemote = true;
33                     if (strncmp($image, '//', 2) === 0) {
34                         $image = 'https:' . $image;
35                     }
36                     $this->_getPathsForUrl($image);
37                 } else { // relative path, assume that it's relative to document root
38                     $this->_getPathsForLocaleFile($image);
39                 }
40             }
41 
#2
+
 /home/msvitcou/public_html/BackupHeroes/craft/plugins/imager/services/ImagerService.php(263): Craft\Imager_ImagePathsModel->__construct("https://backupheroes.co.uk/uploads/images/blogging-336375_1920.j...")
258             
259             return $r;
260         }
261         
262         // get pathsmodel for image
263         $pathsModel = new Imager_ImagePathsModel($image);
264 
265         // create imagine instance
266         $this->imagineInstance = $this->_createImagineInstance();
267 
268         /**
2024-03-28 11:17:02 LiteSpeed / Craft CMS 2.6.3012