phpthumb 在开发机器 ubuntu 上工作,而不在服务器 ubuntu 上工作

发布于 2024-10-09 04:11:51 字数 13369 浏览 0 评论 0原文

我在 http://support 中交叉发布.silisoftware.com/phpBB3/viewtopic.php?f=2&t=255&p=806 但如果有答案,我会更新双方的情况。

我使用 capistrano 部署到我的服务器。所以涉及到符号链接。

开发机和服务器都使用ubuntu 10.04,

代码完全相同,但开发机没有问题,而服务器有问题。

这是我的开发机器上的服务器调试消息的 php 包列表

dpkg -l | grep php
ii  libapache2-mod-php5               5.3.2-1ubuntu4.5                  server-side, HTML-embedded scripting languag
ii  php5                              5.3.2-1ubuntu4.5                  server-side, HTML-embedded scripting languag
ii  php5-cli                          5.3.2-1ubuntu4.5                  command-line interpreter for the php5 script
ii  php5-common                       5.3.2-1ubuntu4.5                  Common files for packages built from the php
ii  php5-curl                         5.3.2-1ubuntu4.5                  CURL module for php5
ii  php5-gd                           5.3.2-1ubuntu4.5                  GD module for php5
ii  php5-imagick                      2.1.1RC1-1build3                  ImageMagick module for php5
ii  php5-mcrypt                       5.3.2-0ubuntu1                    MCrypt module for php5
ii  php5-mysql                        5.3.2-1ubuntu4.5                  MySQL module for php5
ii  phpmyadmin                        4:3.3.2-1                         MySQL web administration tool

2010-12-23 15:37:31 Error: Array
(
[0] => phpThumb() v1.7.9-200805132119 in file "phpthumb.class.php" on line 216
[1] => setSourceFilename(uploads/products/8cb42ecccafe-2.jpg) set $this->sourceFilename to "uploads/products/8cb42ecccafe-2.jpg" in file "phpthumb.class.php" on line 243
[2] => file_exists(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1105
[3] => is_executable(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1106
[4] => using ImageMagick path from $this->config_imagemagick_path (/usr/bin/convert) in file "phpthumb.class.php" on line 1108
[5] => ImageMagick version checked with ""/usr/bin/convert" --version" in file "phpthumb.class.php" on line 1152
[6] => ImageMagick did not return recognized version string (Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP) in file "phpthumb.class.php" on line 1158
[7] => ImageMagick convert --version says "" in file "phpthumb.class.php" on line 1160
[8] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 888
[9] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 899
[10] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 916
[11] => $this->sourceFilename set to "/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg" in file "phpthumb.class.php" on line 817
[12] => setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 923
[13] => $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 959
[14] => SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 3076
[15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2920
[16] => GetImageSize(/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg) says image is 426x318 in file "phpthumb.class.php" on line 2930
[17] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
[18] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
[19] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3015
[20] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3273
[21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1252
[22] => phpThumb_tempnam() returning "/var/www/wp/app/webroot/pThumbHd2wYY" in file "phpthumb.class.php" on line 3929
[23] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1192
[24] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1192
[25] => GetImageSize(/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg) SUCCEEDED: Array
(
[0] => 426
[1] => 318
[2] => 2
[3] => width="426" height="318"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
in file "phpthumb.class.php" on line 1332
[26] => GetImageSize(/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg) returned [w=426;h=318;f=2] in file "phpthumb.class.php" on line 1337
[27] => source dimensions set to 426x318 in file "phpthumb.class.php" on line 1340
[28] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
[29] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
[30] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1824
[31] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1189
[32] => ImageMagick called as ("/usr/bin/convert" -density 150 -background "#FFFFFF" -thumbnail 32x32 -quality 75 -interlace line "/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg[0]" jpeg:"/var/www/wp/app/webroot/pThumbHd2wYY" 2>&1) in file "phpthumb.class.php" on line 1843
[33] => GetImageSize(/var/www/wp/app/webroot/pThumbHd2wYY) returned [w=32;h=24;f=2] in file "phpthumb.class.php" on line 1864
[34] => ImageMagickThumbnailToGD::ImageCreateFromJPEG() succeeded, $this->gdimg_source is now (32x24) in file "phpthumb.class.php" on line 1870
[35] => ImageMagickThumbnailToGD() returning $this->IMresizedData (815 bytes) in file "phpthumb.class.php" on line 1871
[36] => deleting "/var/www/wp/app/webroot/pThumbHd2wYY" in file "phpthumb.class.php" on line 1876
[37] => ImageMagickThumbnailToGD() succeeded in file "phpthumb.class.php" on line 3278
[38] => Not using EXIF thumbnail data because $this->gdimg_source is already set in file "phpthumb.class.php" on line 3325
[39] => CalculateThumbnailDimensions() [x,y,w,h] initially set to [0,0,32,24] in file "phpthumb.class.php" on line 2785
[40] => CreateGDoutput() returning canvas "32x24" in file "phpthumb.class.php" on line 2894
[41] => ImageResizeFunction($o, $s, 0, 0, 0, 0, 32, 24, 32, 24) in file "phpthumb.class.php" on line 3908
[42] => memory_get_usage() after copy-resize = 13097812 in file "phpthumb.class.php" on line 390
[43] => memory_get_usage() after ImageDestroy = 13097936 in file "phpthumb.class.php" on line 392
[44] => AntiOffsiteLinking() says this is allowed in file "phpthumb.class.php" on line 2087
[45] => skipping AlphaChannelFlatten() because !$this->is_alpha in file "phpthumb.class.php" on line 2143
[46] => GenerateThumbnail() completed successfully in file "phpthumb.class.php" on line 404
)


2010-12-24 01:48:35 Error: Array
(
    [0] => phpThumb() v1.7.9-200805132119 in file "phpthumb.class.php" on line 216
    [1] => setSourceFilename(uploads/products/8cb42ecccafe-1.jpg) set $this->sourceFilename to "uploads/products/8cb42ecccafe-1.jpg" in $
    [2] =>   file_exists(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1105
    [3] => is_executable(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1106
    [4] => using ImageMagick path from $this->config_imagemagick_path (/usr/bin/convert) in file "phpthumb.class.php" on line 1108
    [5] => ImageMagick version checked with ""/usr/bin/convert" --version" in file "phpthumb.class.php" on line 1152
    [6] => ImageMagick did not return recognized version string (Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP) in file "phpthumb.class.php" on line 1158
    [7] => ImageMagick convert --version says "" in file "phpthumb.class.php" on line 1160
    [8] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 888
    [9] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 899
    [10] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 916
    [11] => $this->sourceFilename set to "/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg" i$
    [12] => setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 923
    [13] => $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 959
    [14] => SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 3076
    [15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2920
    [16] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg) says image is 426x$
    [17] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
    [18] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
    [19] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3015
    [20] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3273
    [21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1252
    [22] => phpThumb_tempnam() returning "/var/www/ombi60.biz/releases/20101224014356/app/webroot/pThumbsEVu99" in file "phpthumb.class.$
    [23] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1192
    [24] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1192
    [25] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg) SUCCEEDED: Array
(
    [0] => 426
    [1] => 318
    [2] => 2
    [3] => width="426" height="318"
    [bits] => 8
    [channels] => 3
    [mime] => image/jpeg
)
 in file "phpthumb.class.php" on line 1332
    [26] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg) returned [w=426;h=$
    [27] => source dimensions set to 426x318 in file "phpthumb.class.php" on line 1340
    [28] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
    [29] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
    [30] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1824
    [31] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1189
    [32] => ImageMagick called as ("/usr/bin/convert" -density 150 -background "#FFFFFF" -thumbnail 32x32 -quality 75 -interlace line  "$
    [33] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/pThumbsEVu99) returned [w=32;h=24;f=2] in file "phpthum$
    [34] => ImageMagickThumbnailToGD::ImageCreateFromJPEG() succeeded, $this->gdimg_source is now (32x24) in file "phpthumb.class.php" o$
    [35] => ImageMagickThumbnailToGD() returning $this->IMresizedData (815 bytes) in file "phpthumb.class.php" on line 1871
    [36] => deleting "/var/www/ombi60.biz/releases/20101224014356/app/webroot/pThumbsEVu99" in file "phpthumb.class.php" on line 1876
    [37] => ImageMagickThumbnailToGD() succeeded in file "phpthumb.class.php" on line 3278
    [38] => Not using EXIF thumbnail data because $this->gdimg_source is already set in file "phpthumb.class.php" on line 3325

 [39] => CalculateThumbnailDimensions() [x,y,w,h] initially set to [0,0,32,24] in file "phpthumb.class.php" on line 2785
    [40] => CreateGDoutput() returning canvas "32x24" in file "phpthumb.class.php" on line 2894
    [41] => ImageResizeFunction($o, $s, 0, 0, 0, 0, 32, 24, 32, 24) in file "phpthumb.class.php" on line 3908
    [42] => memory_get_usage() after copy-resize = 21742752 in file "phpthumb.class.php" on line 390
    [43] => memory_get_usage() after ImageDestroy = 21742912 in file "phpthumb.class.php" on line 392
    [44] => AntiOffsiteLinking() says this is allowed in file "phpthumb.class.php" on line 2087
    [45] => skipping AlphaChannelFlatten() because !$this->is_alpha in file "phpthumb.class.php" on line 2143
    [46] => GenerateThumbnail() completed successfully in file "phpthumb.class.php" on line 404
    [47] => !$this->config_allow_src_above_docroot therefore setting "/var/www/ombi60.biz/current/app/webroot//uploads/products/thumb/ic$
    [48] => RenderToFile() failed because "/" is not writable in file "phpthumb.class.php" on line 531
)

I am cross-posting in http://support.silisoftware.com/phpBB3/viewtopic.php?f=2&t=255&p=806
but i will update both sides if an answer comes through.

i use capistrano to deploy to my server. so there is symlink involved.

both development machine and server uses ubuntu 10.04

code is exactly the same on both, but development machine had no problems whereas server has a problem.

this is a list of packages of php for my server

dpkg -l | grep php
ii  libapache2-mod-php5               5.3.2-1ubuntu4.5                  server-side, HTML-embedded scripting languag
ii  php5                              5.3.2-1ubuntu4.5                  server-side, HTML-embedded scripting languag
ii  php5-cli                          5.3.2-1ubuntu4.5                  command-line interpreter for the php5 script
ii  php5-common                       5.3.2-1ubuntu4.5                  Common files for packages built from the php
ii  php5-curl                         5.3.2-1ubuntu4.5                  CURL module for php5
ii  php5-gd                           5.3.2-1ubuntu4.5                  GD module for php5
ii  php5-imagick                      2.1.1RC1-1build3                  ImageMagick module for php5
ii  php5-mcrypt                       5.3.2-0ubuntu1                    MCrypt module for php5
ii  php5-mysql                        5.3.2-1ubuntu4.5                  MySQL module for php5
ii  phpmyadmin                        4:3.3.2-1                         MySQL web administration tool

Debug messages on my development machine.

2010-12-23 15:37:31 Error: Array
(
[0] => phpThumb() v1.7.9-200805132119 in file "phpthumb.class.php" on line 216
[1] => setSourceFilename(uploads/products/8cb42ecccafe-2.jpg) set $this->sourceFilename to "uploads/products/8cb42ecccafe-2.jpg" in file "phpthumb.class.php" on line 243
[2] => file_exists(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1105
[3] => is_executable(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1106
[4] => using ImageMagick path from $this->config_imagemagick_path (/usr/bin/convert) in file "phpthumb.class.php" on line 1108
[5] => ImageMagick version checked with ""/usr/bin/convert" --version" in file "phpthumb.class.php" on line 1152
[6] => ImageMagick did not return recognized version string (Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP) in file "phpthumb.class.php" on line 1158
[7] => ImageMagick convert --version says "" in file "phpthumb.class.php" on line 1160
[8] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 888
[9] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 899
[10] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 916
[11] => $this->sourceFilename set to "/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg" in file "phpthumb.class.php" on line 817
[12] => setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 923
[13] => $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 959
[14] => SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 3076
[15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2920
[16] => GetImageSize(/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg) says image is 426x318 in file "phpthumb.class.php" on line 2930
[17] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
[18] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
[19] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3015
[20] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3273
[21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1252
[22] => phpThumb_tempnam() returning "/var/www/wp/app/webroot/pThumbHd2wYY" in file "phpthumb.class.php" on line 3929
[23] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1192
[24] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1192
[25] => GetImageSize(/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg) SUCCEEDED: Array
(
[0] => 426
[1] => 318
[2] => 2
[3] => width="426" height="318"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
in file "phpthumb.class.php" on line 1332
[26] => GetImageSize(/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg) returned [w=426;h=318;f=2] in file "phpthumb.class.php" on line 1337
[27] => source dimensions set to 426x318 in file "phpthumb.class.php" on line 1340
[28] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
[29] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
[30] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1824
[31] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1189
[32] => ImageMagick called as ("/usr/bin/convert" -density 150 -background "#FFFFFF" -thumbnail 32x32 -quality 75 -interlace line "/var/www/wp/app/webroot/uploads/products/8cb42ecccafe-2.jpg[0]" jpeg:"/var/www/wp/app/webroot/pThumbHd2wYY" 2>&1) in file "phpthumb.class.php" on line 1843
[33] => GetImageSize(/var/www/wp/app/webroot/pThumbHd2wYY) returned [w=32;h=24;f=2] in file "phpthumb.class.php" on line 1864
[34] => ImageMagickThumbnailToGD::ImageCreateFromJPEG() succeeded, $this->gdimg_source is now (32x24) in file "phpthumb.class.php" on line 1870
[35] => ImageMagickThumbnailToGD() returning $this->IMresizedData (815 bytes) in file "phpthumb.class.php" on line 1871
[36] => deleting "/var/www/wp/app/webroot/pThumbHd2wYY" in file "phpthumb.class.php" on line 1876
[37] => ImageMagickThumbnailToGD() succeeded in file "phpthumb.class.php" on line 3278
[38] => Not using EXIF thumbnail data because $this->gdimg_source is already set in file "phpthumb.class.php" on line 3325
[39] => CalculateThumbnailDimensions() [x,y,w,h] initially set to [0,0,32,24] in file "phpthumb.class.php" on line 2785
[40] => CreateGDoutput() returning canvas "32x24" in file "phpthumb.class.php" on line 2894
[41] => ImageResizeFunction($o, $s, 0, 0, 0, 0, 32, 24, 32, 24) in file "phpthumb.class.php" on line 3908
[42] => memory_get_usage() after copy-resize = 13097812 in file "phpthumb.class.php" on line 390
[43] => memory_get_usage() after ImageDestroy = 13097936 in file "phpthumb.class.php" on line 392
[44] => AntiOffsiteLinking() says this is allowed in file "phpthumb.class.php" on line 2087
[45] => skipping AlphaChannelFlatten() because !$this->is_alpha in file "phpthumb.class.php" on line 2143
[46] => GenerateThumbnail() completed successfully in file "phpthumb.class.php" on line 404
)


2010-12-24 01:48:35 Error: Array
(
    [0] => phpThumb() v1.7.9-200805132119 in file "phpthumb.class.php" on line 216
    [1] => setSourceFilename(uploads/products/8cb42ecccafe-1.jpg) set $this->sourceFilename to "uploads/products/8cb42ecccafe-1.jpg" in $
    [2] =>   file_exists(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1105
    [3] => is_executable(/usr/bin/convert) = 1 in file "phpthumb.class.php" on line 1106
    [4] => using ImageMagick path from $this->config_imagemagick_path (/usr/bin/convert) in file "phpthumb.class.php" on line 1108
    [5] => ImageMagick version checked with ""/usr/bin/convert" --version" in file "phpthumb.class.php" on line 1152
    [6] => ImageMagick did not return recognized version string (Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP) in file "phpthumb.class.php" on line 1158
    [7] => ImageMagick convert --version says "" in file "phpthumb.class.php" on line 1160
    [8] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 888
    [9] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 899
    [10] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 916
    [11] => $this->sourceFilename set to "/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg" i$
    [12] => setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 923
    [13] => $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 959
    [14] => SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 3076
    [15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2920
    [16] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg) says image is 426x$
    [17] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
    [18] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
    [19] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3015
    [20] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3273
    [21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1252
    [22] => phpThumb_tempnam() returning "/var/www/ombi60.biz/releases/20101224014356/app/webroot/pThumbsEVu99" in file "phpthumb.class.$
    [23] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1192
    [24] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1192
    [25] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg) SUCCEEDED: Array
(
    [0] => 426
    [1] => 318
    [2] => 2
    [3] => width="426" height="318"
    [bits] => 8
    [channels] => 3
    [mime] => image/jpeg
)
 in file "phpthumb.class.php" on line 1332
    [26] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/uploads/products/8cb42ecccafe-1.jpg) returned [w=426;h=$
    [27] => source dimensions set to 426x318 in file "phpthumb.class.php" on line 1340
    [28] => SetOrientationDependantWidthHeight() starting with "426"x"318" in file "phpthumb.class.php" on line 2899
    [29] => SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2915
    [30] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1824
    [31] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1189
    [32] => ImageMagick called as ("/usr/bin/convert" -density 150 -background "#FFFFFF" -thumbnail 32x32 -quality 75 -interlace line  "$
    [33] => GetImageSize(/var/www/ombi60.biz/releases/20101224014356/app/webroot/pThumbsEVu99) returned [w=32;h=24;f=2] in file "phpthum$
    [34] => ImageMagickThumbnailToGD::ImageCreateFromJPEG() succeeded, $this->gdimg_source is now (32x24) in file "phpthumb.class.php" o$
    [35] => ImageMagickThumbnailToGD() returning $this->IMresizedData (815 bytes) in file "phpthumb.class.php" on line 1871
    [36] => deleting "/var/www/ombi60.biz/releases/20101224014356/app/webroot/pThumbsEVu99" in file "phpthumb.class.php" on line 1876
    [37] => ImageMagickThumbnailToGD() succeeded in file "phpthumb.class.php" on line 3278
    [38] => Not using EXIF thumbnail data because $this->gdimg_source is already set in file "phpthumb.class.php" on line 3325

 [39] => CalculateThumbnailDimensions() [x,y,w,h] initially set to [0,0,32,24] in file "phpthumb.class.php" on line 2785
    [40] => CreateGDoutput() returning canvas "32x24" in file "phpthumb.class.php" on line 2894
    [41] => ImageResizeFunction($o, $s, 0, 0, 0, 0, 32, 24, 32, 24) in file "phpthumb.class.php" on line 3908
    [42] => memory_get_usage() after copy-resize = 21742752 in file "phpthumb.class.php" on line 390
    [43] => memory_get_usage() after ImageDestroy = 21742912 in file "phpthumb.class.php" on line 392
    [44] => AntiOffsiteLinking() says this is allowed in file "phpthumb.class.php" on line 2087
    [45] => skipping AlphaChannelFlatten() because !$this->is_alpha in file "phpthumb.class.php" on line 2143
    [46] => GenerateThumbnail() completed successfully in file "phpthumb.class.php" on line 404
    [47] => !$this->config_allow_src_above_docroot therefore setting "/var/www/ombi60.biz/current/app/webroot//uploads/products/thumb/ic$
    [48] => RenderToFile() failed because "/" is not writable in file "phpthumb.class.php" on line 531
)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

黯然 2024-10-16 04:11:51

解决方案是设置 phpthumb.class.php 第 142 行

var $config_allow_src_above_docroot = true;

这可能是由于 capistrano 使用符号链接,但不能确定。

the solution is to set phpthumb.class.php line 142

var $config_allow_src_above_docroot = true;

this is probably due to the capistrano using symlink but cannot be sure.

夏见 2024-10-16 04:11:51

您可以使用 setParameter 函数修复此问题:

$phpThumb->setParameter('config_allow_src_above_docroot', true);

You can fix this using the setParameter function:

$phpThumb->setParameter('config_allow_src_above_docroot', true);
相权↑美人 2024-10-16 04:11:51

我有同样的情况,我通过 codeigniter 中的“根路径”FCPATH 解决了
或者(define('FCPATH', dirname(__FILE__).'/'); 在您的index.php 文件中)
或者(define('FCPATH', __DIR__.'/'); 在您的index.php 文件中)
例如:define('FCPATH', 'C:/xampp/htdocs/your_project/');

$relative_path = 'images/upload/demo.jpg';
$phpThumb->RenderToFile(FCPATH .$relative_path);

I have same situation, I solved by 'root path' FCPATH in codeigniter
Or ( define('FCPATH', dirname(__FILE__).'/'); in your index.php file)
Or ( define('FCPATH', __DIR__.'/'); in your index.php file)
Ex:define('FCPATH', 'C:/xampp/htdocs/your_project/');

$relative_path = 'images/upload/demo.jpg';
$phpThumb->RenderToFile(FCPATH .$relative_path);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文