Could it have something to do with db cashing?
When the website is completely cashed the mentioned error doesn't appear.
But after editing any resource the cache gets completely rebuild incl pphpthumbof cache.
In general there's something wrong with my approach to Modx.
A lot of talk and code now i'm sorry...
Main problems i experience are with image tv's , gallery custom tv's & cashing
First the tv's:
With the gallery custom tv;
images get processed everytime a page get visited, i believe they are not cashed,
besides that you can;t use more then one per resource in the manager this is buggy.
Using phphumbof in combination with a custom gallery tv doesn't work.
While with Gallery they do.
So for single images i now use a normal image tv ,
but here users have to get full access to files, giving a extra filemanager_path value to the user doesn't fix this.
And the biggest problem:
Phpthumb is generating error's like this first time a page is visited
[2011-10-25 15:48:59] (ERROR @ /var/www/clients/client3/web284/web/core/model/phpthumb/phpthumb.class.php : 3210) PHP warning: file_get_contents(/var/www/clients/client3/web284/web/{"gal_src":false}): failed to open stream: No such file or directory
[2011-10-25 15:48:59] (ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: {"gal_src":false} - Debug: Array
(
[0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
[1] => setCacheDirectory() starting with config_cache_directory = "/var/www/clients/client3/web284/web/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
[2] => setting config_cache_directory to realpath(/var/www/clients/client3/web284/web/core/cache/phpthumb) = "/var/www/clients/client3/web284/web/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
[3] => setCacheDirectory() starting with config_cache_directory = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 919
[4] => setting config_cache_directory to realpath(/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache) = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
[5] => setSourceFilename({"gal_src":false}) set $this->sourceFilename to "{"gal_src":false}" in file "phpthumb.class.php" on line 243
[6] => skipping CleanUpCacheDirectory() set to purge (3,000.0 days; 10,000.00MB; 10,000 files) in file "phpthumb.class.php" on line 652
[7] => file_exists() = 0 in file "phpthumb.class.php" on line 1101
[8] => is_executable() = 0 in file "phpthumb.class.php" on line 1102
[9] => ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and `which convert` returned (/usr/bin/convert) in file "phpthumb.class.php" on line 1131
[10] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884
[11] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895
[12] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902
[13] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912
[14] => $this->sourceFilename set to "/var/www/clients/client3/web284/web/{"gal_src":false}" in file "phpthumb.class.php" on line 813
[15] => phpThumb() v1.7.9-200712090829
"/var/www/clients/client3/web284/web/{"gal_src":false}" does not exist in file "phpthumb.class.php" on line 3647
[16] => setCacheDirectory() starting with config_cache_directory = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 919
[17] => setting config_cache_directory to realpath(/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache) = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
[18] => SetCacheFilename() _src set from md5($this->sourceFilename) "/var/www/clients/client3/web284/web/{"gal_src":false}" = "3d5ea3f6f2acafcf9ff2ce689da41555" in file "phpthumb.class.php" on line 3077
[19] => SetCacheFilename() _par set from md5(_farC_zc1_h200_w200_dpi150_q75) in file "phpthumb.class.php" on line 3110
[20] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
[21] => GetImageSize("/var/www/clients/client3/web284/web/{"gal_src":false}") failed in file "phpthumb.class.php" on line 2920
[22] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
[23] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865
[24] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
[25] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876
[26] => SetOrientationDependantWidthHeight() setting w="200", h="200" in file "phpthumb.class.php" on line 2892
[27] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2979
[28] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
[29] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
[30] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865
[31] => starting ImageCreateFromFilename(/var/www/clients/client3/web284/web/{"gal_src":false}) in file "phpthumb.class.php" on line 3152
[32] => empty $filename or GetImageSize(/var/www/clients/client3/web284/web/{"gal_src":false}) failed in file "phpthumb.class.php" on line 3201
[33] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209
[34] => cannot fopen(/var/www/clients/client3/web284/web/{"gal_src":false}) in file "phpthumb.class.php" on line 3212
[35] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278
[36] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330
[37] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332
[38] => phpThumb() v1.7.9-200712090829
Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647
[39] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
)
But:
after the first time loading this error disappears.
In general cashing and images for me are the main bottle necks.
Cashing is nice but as said every edit to a resource will set the cache to rebuild resulting in all these error's and reprocessing of all images.
On another side, i have a similar problem with cashing:
http://www.edart.nl/schilderijen,-ansichtkaarten-en-giclee-prints/werken.html?key=tags&tag=dieren
i use this
[[!getResourcesTag?
&elementClass=`modSnippet`
&tpl=`product-intro3`
&parents=`[[UltimateParent? &topLevel=`3`]]`
&limit=`30`
&includeContent=`0`
&showHidden=`0`
&hideContainers=`1`
&pageVarKey=`page`
&processTVs=`1`
&includeTVs=`1`
&processTVList=`Image 1,Bestelnummer`
&includeTVList=`Image 1,Bestelnummer`
]]
and in the chunck this:
<div class="productintrotype3">
<h2 class="productintrotype3"><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle:ellipsis=`10`]]</a></h2>
<div class="entry-content">
<div class="productimage">
<a href="[[~[[+id]]]]" title="[[*pagetitle]]">
<img src="[[++site_url]]assets/components/gallery/files/[[+tv.Image 1:phpthumbof`w=102&h=102`]]"></a>
</div>
<br />
<b>Bestelnummer</b>: [[+tv.Bestelnummer]]<br />
<div class="clear"></div>
</div><!-- end .entry-content -->
</div>
it generates this error:
[2011-10-25 15:14:02] (ERROR @ /var/www/clients/client3/web235/web/core/cache/includes/elements/modsnippet/4.include.cache.php : 384) PHP warning: in_array() expects parameter 2 to be array, boolean given
or this example
http://www.edart.nl/schilderijen,-ansichtkaarten-en-giclee-prints/werken/bibberhondje.html
Here proccessing time of the page is above 5 sec, after cashing it's fast.
But again editing something will resort in cash being rebuild including phpthumbof cashe images.
Hope someone will help me get a grip on these things.