jrbasso/MeioUpload — Issue #93: phpThumb error
Author: colderis
Created: 2011-12-09 21:32:59+00:00
State: open

Like 15 minutes ago, I came here for expose a phpThumb error.
When trying to explain my problem, I found the answer ...

So I post it for helping others who have the same problem, and of course for warn the developers of this plugin.

I had this phpThumb error :

phpThumb() v1.7.11-201108081537
http://phpthumb.sourceforge.net

Error messages disabled

First, I noticed an error on line 847 in 'MeioUpload/Model/Behavior/MeioUploadBehavior.php' :

$thumbSaveAs = WWW_ROOT . DIRECTORY_SEPARATOR . $thumbSaveAs;

the directory separator constant is already set in the WWW_ROOT in /index.php line 30 :

define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS);

I replaced it.
And then I added in function _createThumbnail : :

$phpThumb->config_disable_debug = false;

for output the PHPThumb error.
Here I saw (I'm on Mac os x) :

"/Users/me/Sites/cake/app/Vendor/phpThumb/uploads/myModel/myFile.jpg" does not exist

well, the error came from the $saveAs variable.
So I added after the line 847 in 'MeioUpload/Model/Behavior/MeioUploadBehavior.php' :

$saveAs = WWW_ROOT.$saveAs;

__Fixed__

This is probably not the good place for correct the saveAs variable but for now its works fine.

*I use CakePHP 2.0.4*
*Sorry for my bad english*