<![CDATA[ New phpthumb snippet can't create thumbnails in assets/cache/images - My Forums]]> https://forums.modx.com/thread/?thread=89129 <![CDATA[New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490061
I'm running MODx Evo 1.0.12 on PHP 5.3.28 (also tried on 5.5.7) and thumbnails don't want to create in assets/cache/images

I tried to CHMOD assets/cache/images 755 and 777.

I guess snippet may work well as
[[phpthumb? &input=`[+vignette+]` &options=`w=200,h=200,zc=1`]]
calls assets/cache/images/200x200-yeux_bleu.785.jpg but the thumbnails is not created in assets/cache/images.
When I try to view the image in Firefox, I get a 403 error.

In phpThumb.config.php, I have :
$PHPTHUMB_CONFIG['cache_directory'] = dirname(__FILE__).'/../../cache/images/';  

Is that right ?

Where else can I search for a potentiel error ?

Thank you !]]>
Perrine Feb 14, 2014, 04:24 AM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490061
<![CDATA[Re: New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-506707
----

Edit:

After some searches i found a Error-Track here:
http://tracker.modx.com/issues/54

Looks like someone else had the same Problem on phpThumb for REVO on a strato-Server.
The document_root variable gets false path.informations! If you want to fix the problem:

1. create Snippet which outputs the absolute path:
<?php
echo $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];
?>


Get the output of this snippet, its the file path you need for configuring phpthumb.


2. Edit the phpThumb-Config File:
assets/snippets/phpthumb/phpThumb.config.php

Edit and comment out the following line:
$PHPTHUMB_CONFIG['document_root'] = realpath((@$_SERVER['DOCUMENT_ROOT'] && file_exists(@$_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'])) ? $_SERVER['DOCUMENT_ROOT'] : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', realpath('.'))));

to:
//$PHPTHUMB_CONFIG['document_root'] = realpath((@$_SERVER['DOCUMENT_ROOT'] && file_exists(@$_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'])) ? $_SERVER['DOCUMENT_ROOT'] : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace(DIRECTORY_SEPARATOR, '/', realpath('.'))));


then add the following line and add the path you get from the snippet under 1.
$PHPTHUMB_CONFIG['document_root'] = 'YOUR-PATH-HERE';


Your path will end with 'htdocs' - If your modx-installation is in a SUB.Directory, add the subdirectory on the end of the path as the snippet from 1. dont displays the subdirectory-path!

Looks like strato got some very weird document-path config.hack on their shared hostings! Get your customers onto your servers! laugh
Good luck!]]>
urbandigital Aug 17, 2014, 07:36 PM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-506707
<![CDATA[Re: New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490090 So, why phpthumb can't ?]]> Perrine Feb 14, 2014, 12:12 PM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490090 <![CDATA[Re: New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490077
I tried to use MODx logo.png in assets/images whith no chance

I tried to change directory assets/cache/images to assets/images or assets/.thumbs (as I know there are good CHMOD on it because FCKEditor can write) but nothing too.

There are no message in error log

Maybe a configuration of my server ? I host on shared server, at Strato.]]>
Perrine Feb 14, 2014, 09:00 AM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490077
<![CDATA[Re: New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490070 Jako Feb 14, 2014, 05:32 AM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490070 <![CDATA[Re: New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490064
But I get a 404 error as the image is not created in the folder assets/cache/images :/

Why is this image not created ??!]]>
Perrine Feb 14, 2014, 05:07 AM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490064
<![CDATA[Re: New phpthumb snippet can't create thumbnails in assets/cache/images]]> https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490063
Add .htaccess in assets/cache/images with the content

order deny,allow
allow from all

]]>
Jako Feb 14, 2014, 05:02 AM https://forums.modx.com/thread/89129/new-phpthumb-snippet-can-t-create-thumbnails-in-assets-cache-images#dis-post-490063