<![CDATA[ phpthumb not working with destination files in symlinks - SOLVED - My Forums]]> https://forums.modx.com/thread/?thread=38156 <![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215164 JNet May 07, 2011, 12:59 PM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215164 <![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215163
Just search for ’phpthumb’. The first option setting_phpthumb_allow_src_above_docroot - change that to true. No upgrade worries that way either tongue]]>
okyanet May 07, 2011, 12:45 PM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215163
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215162
I do have an idea how you might get around this:

*** EDIT - removed, see system settings in post below ***

That might do it but I can’t be sure and haven’t tested it. You might want to look at some of the other config options there too.
]]>
okyanet May 07, 2011, 12:41 PM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215162
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215161
I will test and report back. Thanks for the idea about the snippet call. Solved 1 of my issues smiley


[2011-05-07 13:08:42] (ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: assets/newpetimages/173/original/ROSWELL.jpg - Debug: Array
(
    [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
    [1] => setCacheDirectory() starting with config_cache_directory = "/home/foha/domains/foha.org/public_html/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
    [2] => setting config_cache_directory to realpath(/home/foha/domains/foha.org/public_html/core/cache/phpthumb) = "/home/foha/domains/foha.org/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
    [3] => setCacheDirectory() starting with config_cache_directory = "/home/foha/domains/foha.org/public_html/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 919
    [4] => setting config_cache_directory to realpath(/home/foha/domains/foha.org/public_html/assets/components/phpthumbof/cache) = "/home/foha/domains/foha.org/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
    [5] => setSourceFilename(assets/newpetimages/173/original/ROSWELL.jpg) set $this->sourceFilename to "assets/newpetimages/173/original/ROSWELL.jpg" in file "phpthumb.class.php" on line 243
    [6] => skipping CleanUpCacheDirectory() set to purge (30.0 days; 100.00MB; 10,000 files) in file "phpthumb.class.php" on line 652
    [7] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884
    [8] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895
    [9] => $this->thumbnailFormat set to $this->f "png" in file "phpthumb.class.php" on line 902
    [10] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912
    [11] => !$this->config_allow_src_above_docroot therefore setting "/home/foha/domains/foha.org/foha/public/system/mainimages/173/original/ROSWELL.jpg" (outside "/home/foha/domains/foha.org/public_html") to null in file "phpthumb.class.php" on line 1066
    [12] => $this->sourceFilename set to "" in file "phpthumb.class.php" on line 813
    [13] => phpThumb() v1.7.9-200712090829

"" does not exist in file "phpthumb.class.php" on line 3647
    [14] => setCacheDirectory() starting with config_cache_directory = "/home/foha/domains/foha.org/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 919
    [15] => setting config_cache_directory to realpath(/home/foha/domains/foha.org/public_html/assets/components/phpthumbof/cache) = "/home/foha/domains/foha.org/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
    [16] => !$this->config_allow_src_above_docroot therefore setting "/home/foha/domains/foha.org/foha/public/system/mainimages/173/original/ROSWELL.jpg" (outside "/home/foha/domains/foha.org/public_html") to null in file "phpthumb.class.php" on line 1066
    [17] => SetCacheFilename() _src set from md5($this->sourceFilename) "" = "d41d8cd98f00b204e9800998ecf8427e" in file "phpthumb.class.php" on line 3077
    [18] => SetCacheFilename() _par set from md5(_farC_zc1_h115_w116_dpi150) in file "phpthumb.class.php" on line 3110
    [19] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
    [20] => GetImageSize("") failed in file "phpthumb.class.php" on line 2920
    [21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
    [22] => ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1279
    [23] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
    [24] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876
    [25] => SetOrientationDependantWidthHeight() setting w="116", h="115" in file "phpthumb.class.php" on line 2892
    [26] => exif_thumbnail() does not exist, cannot extract EXIF thumbnail in file "phpthumb.class.php" on line 2974
    [27] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
    [28] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
    [29] => ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1279
    [30] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278
    [31] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330
    [32] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332
    [33] => phpThumb() v1.7.9-200712090829

Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647
    [34] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
)
]]>
JNet May 07, 2011, 12:15 PM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215161
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215160
I guess you could get around the path issue by using a regular snippet call like this:
<img src="[[!phpthumbof? &input=`/firstpartofPath/[[+pathtoimage]]` &options=`w=300&h=300&zc=1`]]" />

I haven’t tested it but I don’t see why that wouldn’t work. Try it out and I’m happy to help if it needs further troubleshooting. Don’t forget that detailed error log either wink]]>
okyanet May 07, 2011, 03:59 AM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215160
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215159
The problem, as you stated is that phpthumb is only rendering the part of the url the database field has stored.

So how do I run phpthumb with the entire url for example <img src=/firstpartofPath/[[+pathtoimage-fromdatabase:phpthumbof]] />

I guess a snippet melding the two would be the answer ? Anything easier?]]>
JNet May 06, 2011, 11:28 AM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215159
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215158

First, remove the phpThumbOf extender and just check that the full image loads correctly. At least then you will know that the paths are correct.
At first after viewing error messages saying that phpthumb couldnt find the file I assumed phpthumb was only processing [[+pathtoimage]] rather than the URL information infront of it (assets/sysmlinkfolder/)
Your assumption was correct there, you will need to include the full image path including ’assets/symlinkfolder/’ in your image tv, otherwise I don’t see how phpThumb is going to find them. Is the image folder publicly accessible?

Second, check your error log in modx manager and find the entry generated by phpThumbOf. There have been some path issues when modx is installed outside of the root folder; there may be a similar issue in your case here. You’ll get an idea of what the problem might be in the log - feel free to post it here if you’re still stuck!]]>
okyanet May 05, 2011, 03:08 AM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215158
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215157
unfortunately that is not the error - just a typo in my post]]>
JNet May 04, 2011, 07:22 PM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215157
<![CDATA[Re: phpthumb not working with destination files in symlinks]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215156 src not scr smiley

]]>
okyanet May 04, 2011, 03:45 AM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215156
<![CDATA[phpthumb not working with destination files in symlinks - SOLVED]]> https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215155
These photos are stored outside of the modx directory (a few steps above). But i have created a symlink inside of the modx directory to these images.


These photos are referenced using Rowboat which uses a chunk as a template. For example

<img scr="assets/symlinkfolder/[[+pathtoimage:phpthumbofcode]]" />

At first after viewing error messages saying that phpthumb couldnt find the file I assumed phpthumb was only processing [[+pathtoimage]] rather than the URL information infront of it (assets/sysmlinkfolder/)

However I DID try it with just a tv <img scr="[[tv.myimagetv:phpthumbofcode]]" /> but it doesn’t work. I pointed the TV inside of the symlink to the files.

Any help would be greatly appreciated. As always, will try to figure it out myself and post back.
]]>
JNet Apr 30, 2011, 04:43 PM https://forums.modx.com/thread/38156/phpthumb-not-working-with-destination-files-in-symlinks---solved#dis-post-215155