Не работают превью изображений в админке

Добрый день!
Впервые столкнулся с такой проблемой. Создал на хостинге новый сайт, залил modx, начал перенос верстки. И тут обнаружилось, что в админке превью картинок не отображаются. Вообще никакие. Так же на фронтенде с использованием и phpthumbof и phpthumbon тоже не генерируются, а изображения без модификаций выводятся. Старательно гуглил этот вопрос, и везде разные решения, ни одно из предложенных не помогло. Где-то предлагали менять DOCUMENT_ROOT, а он у меня верный, где-то проверяли GD и imagick, где-то что-то еще.

GD и imagick установлены. Версия PHP 5.5. На этом хостинге держу еще один сайт на REVO, прям в этом же аккаунте, сайты почти одинаковы функционально и на том все отлично работает.

Логи такие
[2016-02-17 13:02:10] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 572
[2016-02-17 13:02:14] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /home/e/username/new.sitename.ru/public_html/core/cache/phpthumb/new.sitename.ru__srca0d8cb147d0cb11f5e4335a66ad798e2_par13f58490979c1faafde48f3846f4b1c3_dat1455700279.png
[2016-02-17 13:02:14] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 572

Я так понимаю, что что-то не то с библиотекой phpthumb, а вот что, что-то не понял :)
Дмитрий
17 февраля 2016, 10:12
modx.pro
7 141
0
Поблагодарить автора Отправить деньги

Комментарии: 5

Дмитрий Суворов
17 февраля 2016, 20:40
0
А картинки лежат на сервере? Как к ним путь указан?
    Михаил Боровов
    18 февраля 2016, 20:36
    0
    У меня решилось путем выставления прав на корневую папку с сайтом 777.
    Ну и обновил imagick на сервере.
      Дмитрий
      19 февраля 2016, 13:33
      0
      Извиняюсь за долгий ответ. Воевал с этой багой.
      Абсолютно ничего не помогает. Точнее как. Изображения в админке заработали, показываются.
      Но проблема во фронтенде не исчезла. Изображения не сжимаются ни phphthumbOF ни phpthumbON.
      Права выставил уже всевозможные, картинки на сервере, пути нормальные, по прямому запросу открываются. не работает именно кэширование и сжатие.

      Логи изменились тоже.

      [2016-02-19 13:22:52] (ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: /assets/components/gallery/connector.php - Debug: Array
      (
          [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
          [1] => setCacheDirectory() starting with config_cache_directory = "/home/e/username/new.sitename.ru/public_html/core/cache/phpthumb/" in file "phpthumb.class.php" on line 961
          [2] => setting config_cache_directory to realpath(/home/e/username/new.sitename.ru/public_html/core/cache/phpthumb) = "/home/e/username/new.sitename.ru/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 989
          [3] => setCacheDirectory() starting with config_cache_directory = "/home/e/username/new.sitename.ru/public_html/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 961
          [4] => setting config_cache_directory to realpath(/home/e/username/new.sitename.ru/public_html/assets/components/phpthumbof/cache) = "/home/e/username/new.sitename.ru/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 989
          [5] => setSourceFilename(/assets/components/gallery/connector.php) set $this->sourceFilename to "/assets/components/gallery/connector.php" in file "phpthumb.class.php" on line 271
          [6] => CleanUpCacheDirectory() set to purge (30.0 days; 100.00 MB; 10,000 files) in file "phpthumb.class.php" on line 667
          [7] => CleanUpCacheDirectory() skipped because "/home/e/username/new.sitename.ru/public_html/assets/components/phpthumbof/cache/phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 677
          [8] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 919
          [9] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
          [10] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
          [11] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
          [12] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 953
          [13] => ResolveFilenameToAbsolute() prepending $this->config_document_root (/home/e/username/new.sitename.ru/public_html/) to $filename (/assets/components/gallery/connector.php) resulting in ($AbsoluteFilename = "/home/e/username/new.sitename.ru/public_html//assets/components/gallery/connector.php") in file "modphpthumb.class.php" on line 262
          [14] => $this->sourceFilename set to "/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php" in file "phpthumb.class.php" on line 849
          [15] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php" = "f8d5b08316494a625d48606f84a80409" in file "phpthumb.class.php" on line 3443
          [16] => SetCacheFilename() _par set from md5(_farC_h150_w300_dpi150_q75) in file "phpthumb.class.php" on line 3476
          [17] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
          [18] => GetImageSize(/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php) says image is x in file "phpthumb.class.php" on line 3246
          [19] => GetImageSize("/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php") failed in file "phpthumb.class.php" on line 3279
          [20] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1508
          [21] => phpThumb_tempnam() returning "/home/e/username/new.sitename.ru/public_html/pThumbH71K0T" in file "phpthumb.class.php" on line 4275
          [22] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1445
          [23] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1445
          [24] => GetImageSize(/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php) FAILED with error "" in file "phpthumb.class.php" on line 1602
          [25] => GetImageSize(/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php) failed in file "phpthumb.class.php" on line 1749
          [26] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 2132
          [27] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1442
          [28] => ImageMagick called as (convert -density '150' -thumbnail '300x150' -quality '75' -interlace line  '/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php[0]' jpeg:'/home/e/username/new.sitename.ru/public_html/pThumbH71K0T' 2>&1) in file "phpthumb.class.php" on line 2151
          [29] => ImageMagick failed with message (convert: no decode delegate for this image format `PHP' @ error/constitute.c/ReadImage/501.
      convert: no images defined `jpeg:/home/e/username/new.sitename.ru/public_html/pThumbH71K0T' @ error/convert.c/ConvertImageCommand/3230.) in file "phpthumb.class.php" on line 2156
          [30] => deleting "/home/e/username/new.sitename.ru/public_html/pThumbH71K0T" in file "phpthumb.class.php" on line 2188
          [31] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3286
          [32] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3215
          [33] => SetOrientationDependantWidthHeight() setting w="300", h="150" in file "phpthumb.class.php" on line 3231
          [34] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
          [35] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
          [36] => starting ImageCreateFromFilename(/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php) in file "phpthumb.class.php" on line 3518
          [37] => empty $filename or GetImageSize(/home/e/username/new.sitename.ru/public_html/assets/components/gallery/connector.php) failed in file "phpthumb.class.php" on line 3567
          [38] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
          [39] => attempting ImageCreateFromStringReplacement($rawimagedata (2258 bytes), true) in file "phpthumb.class.php" on line 3589
          [40] => ImageCreateFromStringReplacement() calling built-in ImageCreateFromString() in file "phpthumb.class.php" on line 4159
          [41] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
          [42] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
          [43] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
          [44] => phpThumb() v1.7.13-201406261000
      http://phpthumb.sourceforge.net
      
      Error messages disabled.
      
      edit phpThumb.config.php and (temporarily) set
      $PHPTHUMB_CONFIG['disable_debug'] = false;
      to view the details of this error in file "phpthumb.class.php" on line 4050
          [45] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
      )
      
      [2016-02-19 13:25:45] (ERROR @ /assets/components/gallery/connector.php) [Gallery] Album Type: 1
        Антон Пастухов
        19 февраля 2016, 15:51
        1
        +1
        phpThumbOf официально мертв, phpThumbOn — тоже. Попробуйте pThumb, может статься, что проблема решится сама собой.
          Александр
          28 ноября 2017, 00:08
          +1
          Доброго дня.

          Мне помогло следующее:
          в админке в верхнем меню Media -> Источник файлов -> Filesystem -> в параметре «basePath» должно быть пусто, у меня почему-то была точка.
            Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
            5