We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 54521
    • 1 Posts
    Добрый вечер.

    Скопировал сайт на новый домен в соседнюю папку. И перестала работать галерея — все картинки битые.

    Например, так картинка видна:
    www.domodedovo-remont.ru/assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=500&h=500&zc=0&far=&q=90&src=%2Fassets%2Fgallery%2F1%2F2.jpg

    А вот так уже нет:
    www.anvan.me/assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=500&h=500&zc=0&far=&q=90&src=%2Fassets%2Fgallery%2F1%2F2.jpg

    В админке тоже не отображаются картинки в галерее.

    Похоже, что по какой-то причине не может создавать кеш картинок…

    При заходе в галерею в логах ошибок нет, а вот если выбрать какую-то картинку то вот такой лог ошибок:

    [2018-08-23 23:45:49] (ERROR @ /var/www/p409724/data/www/anvan.me/core/model/phpthumb/phpthumb.class.php: 4267) PHP warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/p409724/data:.)
    [2018-08-23 23:45:49] (ERROR @ /var/www/p409724/data/www/anvan.me/core/model/phpthumb/phpthumb.class.php: 4273) PHP warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/p409724/data:.)
    [2018-08-23 23:45:49] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not cache thumb "/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg" to file at: /var/www/p409724/data/www/anvan.me/assets/components/gallery/cache/_var_www_p409724_data_www_anvan.me_assets_gallery_1_130.jpg.70d84de5f461548073cc48c50a7a2bec.jpg — Debug: Array
    (
    [0] => phpThumb() v1.7.13-201406261000 in file «phpthumb.class.php» on line 220
    [1] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root () to $filename (/assets/gallery/1/130.jpg) resulting in ($AbsoluteFilename = "/assets/gallery/1/130.jpg") in file «phpthumb.class.php» on line 1216
    [2] => resolvePath: /assets/gallery/1/130.jpg (allowed_dirs: Array
    (
    )
    ) in file «phpthumb.class.php» on line 1096
    [3] => resolvePath: iteration, path=/assets/gallery/1/130.jpg, base path = /var/www/p409724/data/www/anvan.me/assets/components/gallery in file «phpthumb.class.php» on line 1115
    [4] => open_basedir: "/var/www/p409724/data:." in file «phpthumb.class.php» on line 1082
    [5] => resolvePath: stop at component 5 in file «phpthumb.class.php» on line 1131
    [6] => resolvePath: stop at path=/assets/gallery/1/130.jpg in file «phpthumb.class.php» on line 1134
    [7] => resolvePath: no match, returning null in file «phpthumb.class.php» on line 1136
    [8] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/var/www/p409724/data/www/anvan.me/assets/components/gallery") to null in file «phpthumb.class.php» on line 1261
    [9] => setSourceFilename() set $this->sourceFilename to "" in file «phpthumb.class.php» on line 271
    [10] => setSourceFilename(/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg) set $this->sourceFilename to "/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg" in file «phpthumb.class.php» on line 271
    [11] => CleanUpCacheDirectory() set to purge (NULL days; NULL MB; NULL files) in file «phpthumb.class.php» on line 667
    [12] => CleanUpCacheDirectory() skipped because "/var/www/p409724/data/www/anvan.me/assets/components/gallery/cache//phpThumbCacheStats.txt" is recently modified in file «phpthumb.class.php» on line 677
    [13] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file «phpthumb.class.php» on line 925
    [14] => $this->thumbnailFormat set to $this->config_output_format «jpeg» in file «phpthumb.class.php» on line 936
    [15] => $this->thumbnailFormat set to $this->f «jpeg» in file «phpthumb.class.php» on line 943
    [16] => $this->thumbnailQuality set to «90» in file «phpthumb.class.php» on line 953
    [17] => resolvePath: /var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg (allowed_dirs: Array
    (
    )
    ) in file «phpthumb.class.php» on line 1096
    [18] => resolvePath: iteration, path=/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg, base path = /var/www/p409724/data/www/anvan.me in file «phpthumb.class.php» on line 1115
    [19] => resolvePath: stop at component 11 in file «phpthumb.class.php» on line 1131
    [20] => resolvePath: stop at path=/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg in file «phpthumb.class.php» on line 1134
    [21] => resolvePath: path parsed, over in file «phpthumb.class.php» on line 1140
    [22] => $this->sourceFilename set to "/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg" in file «phpthumb.class.php» on line 849
    [23] => SetCacheFilename() _src set from md5($this->sourceFilename) "/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg" = «82ec0812d13d548dd628d1eadef1de41» in file «phpthumb.class.php» on line 3443
    [24] => SetCacheFilename() _par set from md5(_h500_w500_dpi150_q90) in file «phpthumb.class.php» on line 3476
    [25] => starting ExtractEXIFgetImageSize() in file «phpthumb.class.php» on line 3236
    [26] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg) says image is 2048x1536 in file «phpthumb.class.php» on line 3246
    [27] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file «phpthumb.class.php» on line 1508
    [28] => phpThumb_tempnam() returning "/var/www/p409724/data/www/anvan.me/assets/components/gallery" in file «phpthumb.class.php» on line 4275
    [29] => ImageMagickSwitchAvailable(thumbnail) = 0 in file «phpthumb.class.php» on line 1445
    [30] => IMuseExplicitImageOutputDimensions = 0 in file «phpthumb.class.php» on line 1583
    [31] => ImageMagickSwitchAvailable(density) = 0 in file «phpthumb.class.php» on line 1445
    [32] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg) SUCCEEDED: Array
    (
    [0] => 2048
    [1] => 1536
    [2] => 2
    [3] => width=«2048» height=«1536»
    [bits] => 8
    [channels] => 3
    [mime] => image/jpeg
    )
    in file «phpthumb.class.php» on line 1600
    [33] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg) returned [w=2048;h=1536;f=2] in file «phpthumb.class.php» on line 1605
    [34] => source dimensions set to 2048x1536 in file «phpthumb.class.php» on line 1608
    [35] => SetOrientationDependantWidthHeight() starting with «2048»x«1536» in file «phpthumb.class.php» on line 3215
    [36] => SetOrientationDependantWidthHeight() setting w=«500», h=«500» in file «phpthumb.class.php» on line 3231
    [37] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file «phpthumb.class.php» on line 2132
    [38] => ImageMagickSwitchAvailable(quality;interlace) = 0 in file «phpthumb.class.php» on line 1442
    [39] => ImageMagick called as ('' -background '#FFFFFF' -resize '500x500' '/var/www/p409724/data/www/anvan.me/assets/gallery/1/130.jpg[0]' jpeg:'/var/www/p409724/data/www/anvan.me/assets/components/gallery' 2>&1) in file «phpthumb.class.php» on line 2151
    [40] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/components/gallery) returned [w=;h=;f=] in file «phpthumb.class.php» on line 2168
    [41] => $this->useRawIMoutput set to TRUE because ImageCreateFromJPEG(/var/www/p409724/data/www/anvan.me/assets/components/gallery) failed in file «phpthumb.class.php» on line 2178
    [42] => deleting "/var/www/p409724/data/www/anvan.me/assets/components/gallery" in file «phpthumb.class.php» on line 2181
    [43] => Skipping rest of GenerateThumbnail() because ($this->useRawIMoutput == true) in file «phpthumb.class.php» on line 346
    [44] => RenderOutput copying $this->IMresizedData (0 bytes) to $this->outputImage in file «phpthumb.class.php» on line 433
    )

    [2018-08-23 23:45:50] (DEBUG @ /assets/components/gallery/connector.php)

    Execution time: 0.0002 s

    [2018-08-23 23:45:50] (ERROR @ /var/www/p409724/data/www/anvan.me/core/model/phpthumb/phpthumb.class.php: 4267) PHP warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/p409724/data:.)
    [2018-08-23 23:45:50] (ERROR @ /var/www/p409724/data/www/anvan.me/core/model/phpthumb/phpthumb.class.php: 4273) PHP warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/p409724/data:.)
    [2018-08-23 23:45:50] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not cache thumb "/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg" to file at: /var/www/p409724/data/www/anvan.me/assets/components/gallery/cache/_var_www_p409724_data_www_anvan.me_assets_gallery_1_131.jpg.0a21ccec46689257f623b0a7262ed229.jpg — Debug: Array
    (
    [0] => phpThumb() v1.7.13-201406261000 in file «phpthumb.class.php» on line 220
    [1] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root () to $filename (/assets/gallery/1/131.jpg) resulting in ($AbsoluteFilename = "/assets/gallery/1/131.jpg") in file «phpthumb.class.php» on line 1216
    [2] => resolvePath: /assets/gallery/1/131.jpg (allowed_dirs: Array
    (
    )
    ) in file «phpthumb.class.php» on line 1096
    [3] => resolvePath: iteration, path=/assets/gallery/1/131.jpg, base path = /var/www/p409724/data/www/anvan.me/assets/components/gallery in file «phpthumb.class.php» on line 1115
    [4] => open_basedir: "/var/www/p409724/data:." in file «phpthumb.class.php» on line 1082
    [5] => resolvePath: stop at component 5 in file «phpthumb.class.php» on line 1131
    [6] => resolvePath: stop at path=/assets/gallery/1/131.jpg in file «phpthumb.class.php» on line 1134
    [7] => resolvePath: no match, returning null in file «phpthumb.class.php» on line 1136
    [8] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/var/www/p409724/data/www/anvan.me/assets/components/gallery") to null in file «phpthumb.class.php» on line 1261
    [9] => setSourceFilename() set $this->sourceFilename to "" in file «phpthumb.class.php» on line 271
    [10] => setSourceFilename(/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg) set $this->sourceFilename to "/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg" in file «phpthumb.class.php» on line 271
    [11] => CleanUpCacheDirectory() set to purge (NULL days; NULL MB; NULL files) in file «phpthumb.class.php» on line 667
    [12] => CleanUpCacheDirectory() skipped because "/var/www/p409724/data/www/anvan.me/assets/components/gallery/cache//phpThumbCacheStats.txt" is recently modified in file «phpthumb.class.php» on line 677
    [13] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file «phpthumb.class.php» on line 925
    [14] => $this->thumbnailFormat set to $this->config_output_format «jpeg» in file «phpthumb.class.php» on line 936
    [15] => $this->thumbnailFormat set to $this->f «jpeg» in file «phpthumb.class.php» on line 943
    [16] => $this->thumbnailQuality set to «90» in file «phpthumb.class.php» on line 953
    [17] => resolvePath: /var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg (allowed_dirs: Array
    (
    )
    ) in file «phpthumb.class.php» on line 1096
    [18] => resolvePath: iteration, path=/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg, base path = /var/www/p409724/data/www/anvan.me in file «phpthumb.class.php» on line 1115
    [19] => resolvePath: stop at component 11 in file «phpthumb.class.php» on line 1131
    [20] => resolvePath: stop at path=/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg in file «phpthumb.class.php» on line 1134
    [21] => resolvePath: path parsed, over in file «phpthumb.class.php» on line 1140
    [22] => $this->sourceFilename set to "/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg" in file «phpthumb.class.php» on line 849
    [23] => SetCacheFilename() _src set from md5($this->sourceFilename) "/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg" = «d936c1230b5b6e181f0d8ce40400ab94» in file «phpthumb.class.php» on line 3443
    [24] => SetCacheFilename() _par set from md5(_h500_w500_dpi150_q90) in file «phpthumb.class.php» on line 3476
    [25] => starting ExtractEXIFgetImageSize() in file «phpthumb.class.php» on line 3236
    [26] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg) says image is 2048x1536 in file «phpthumb.class.php» on line 3246
    [27] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file «phpthumb.class.php» on line 1508
    [28] => phpThumb_tempnam() returning "/var/www/p409724/data/www/anvan.me/assets/components/gallery" in file «phpthumb.class.php» on line 4275
    [29] => ImageMagickSwitchAvailable(thumbnail) = 0 in file «phpthumb.class.php» on line 1445
    [30] => IMuseExplicitImageOutputDimensions = 0 in file «phpthumb.class.php» on line 1583
    [31] => ImageMagickSwitchAvailable(density) = 0 in file «phpthumb.class.php» on line 1445
    [32] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg) SUCCEEDED: Array
    (
    [0] => 2048
    [1] => 1536
    [2] => 2
    [3] => width=«2048» height=«1536»
    [bits] => 8
    [channels] => 3
    [mime] => image/jpeg
    )
    in file «phpthumb.class.php» on line 1600
    [33] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg) returned [w=2048;h=1536;f=2] in file «phpthumb.class.php» on line 1605
    [34] => source dimensions set to 2048x1536 in file «phpthumb.class.php» on line 1608
    [35] => SetOrientationDependantWidthHeight() starting with «2048»x«1536» in file «phpthumb.class.php» on line 3215
    [36] => SetOrientationDependantWidthHeight() setting w=«500», h=«500» in file «phpthumb.class.php» on line 3231
    [37] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file «phpthumb.class.php» on line 2132
    [38] => ImageMagickSwitchAvailable(quality;interlace) = 0 in file «phpthumb.class.php» on line 1442
    [39] => ImageMagick called as ('' -background '#FFFFFF' -resize '500x500' '/var/www/p409724/data/www/anvan.me/assets/gallery/1/131.jpg[0]' jpeg:'/var/www/p409724/data/www/anvan.me/assets/components/gallery' 2>&1) in file «phpthumb.class.php» on line 2151
    [40] => GetImageSize(/var/www/p409724/data/www/anvan.me/assets/components/gallery) returned [w=;h=;f=] in file «phpthumb.class.php» on line 2168
    [41] => $this->useRawIMoutput set to TRUE because ImageCreateFromJPEG(/var/www/p409724/data/www/anvan.me/assets/components/gallery) failed in file «phpthumb.class.php» on line 2178
    [42] => deleting "/var/www/p409724/data/www/anvan.me/assets/components/gallery" in file «phpthumb.class.php» on line 2181
    [43] => Skipping rest of GenerateThumbnail() because ($this->useRawIMoutput == true) in file «phpthumb.class.php» on line 346
    [44] => RenderOutput copying $this->IMresizedData (0 bytes) to $this->outputImage in file «phpthumb.class.php» on line 433 [ed. note: polarwolf last edited this post 5 years, 7 months ago.]
      • 54199
      • 108 Posts
      А что в параметрах gallery.files_path и gallery.files_url?