Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpThumb problem #90

Open
bendo01 opened this issue Sep 11, 2011 · 3 comments
Open

phpThumb problem #90

bendo01 opened this issue Sep 11, 2011 · 3 comments

Comments

@bendo01
Copy link

bendo01 commented Sep 11, 2011

i use phpThumb-1.7.11-201108081537-beta and place it in app/vendors/phpThumb/{files}
using cakephp 1.3.11 and php 5.3.8 , when i setting meio_upload in my model :

var $actsAs = array('Utils.Sluggable' => array('label'=>'name','separator'=>'-','update'=>'true'),'Tree','MeioUpload.MeioUpload' => array('filename'));

it works perfect,

but when i change the settings like this :
var $actsAs = array('Utils.Sluggable' => array('label'=>'name','separator'=>'-','update'=>'true'),'Tree',
'MeioUpload.MeioUpload' => array(
'filename'=>array(
'thumbsizes' => array('320x90' => array('width' => 320,'height' => 90))
)
));

it give me this error:
( ! ) Fatal error: Class 'phpthumb' not found in /opt/local/www/new_sia/app/plugins/meio_upload/models/behaviors/meio_upload.php on line 892
Call Stack

Time Memory Function Location

1 0.0000 657496 {main}( ) ../index.php:0
2 0.0275 1883080 Dispatcher->dispatch( ) ../index.php:83
3 0.0315 2066952 Dispatcher->_invoke( ) ../dispatcher.php:171
4 0.3907 7452784 call_user_func_array ( ) ../dispatcher.php:204
5 0.3907 7453080 MenusController->admin_add( ) ../dispatcher.php:204
6 0.3916 7455744 Model->save( ) ../menus_controller.php:100
7 0.3966 7481600 BehaviorCollection->trigger( ) ../model.php:1281
8 0.3991 7483856 ModelBehavior->dispatchMethod( ) ../model_behavior.php:494
9 0.3991 7484208 MeioUploadBehavior->beforeSave( ) ../model_behavior.php:169
10 0.3991 7484256 MeioUploadBehavior->upload( ) ../meio_upload.php:322
11 0.3991 7484256 MeioUploadBehavior->_uploadFile( ) ../meio_upload.php:374
12 0.4001 7485960 MeioUploadBehavior->_createThumbnails( ) ../meio_upload.php:801
13 0.4001 7486592 MeioUploadBehavior->_createThumbnail( ) ../meio_upload.php:862

when i check the behavior on line 892

// Import phpThumb class
App::import('Vendor','phpthumb', array('file' => 'phpThumb'.DS.'phpthumb.class.php'));

// Configuring thumbnail settings
$phpThumb = new phpthumb;

is phpthumb file doesn't load properly? or i miss something?

@bendo01
Copy link
Author

bendo01 commented Sep 11, 2011

i test it with this simple code:

if(App::import('Vendor', 'phpthumb', array('file' => 'phpThumb' . DS . 'phpthumb.class.php'))==false){
pr('error when loading phpthumb');
exit;
}

i don't know if this is cakephp 1.3.11 bug

@alexgenovese
Copy link

I have the same problem with cakephp 2.0.5

@ariaraujo
Copy link

Solution:
MeioUploadBehavior.php line 935 change to:
$test = App::import('Vendor', 'PhpThumb', array('file' => 'phpthumb'.DS.'phpthumb.class.php'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants