Ive tried everything, I am pretty sure is something easy to solve but I cant just figure it out yet.
Thanks.
pd.
I am using WAMP 2.2 PHP 5.4.3 Apache 2.4.2
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.6
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 6b
PNG Support enabled
libPNG Version 1.2.46
WBMP Support enabled
XBM Support enabled
You are trying to create a thumb from a thumb which is not possible. Try this
$thumb = Yii::app()->phpThumb->create($folder . $result['filename']);
//$thumb->create($folder . $result['filename']); this line is wrong, so delete it
$thumb->resize(100, 100);
$thumb->save($folder . "thumb\\" . $result['filename']);
{
$model=new CategoryPlaces;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['CategoryPlaces']))
{
$model->attributes=$_POST['CategoryPlaces'];
$rnd = rand(0,9999);
$uploadedFile=CUploadedFile::getInstance($model,'image');
// random number + file name
$fileName = "{$rnd}-{$uploadedFile}";
// get image with Number
$model->image = $fileName;
//$thumb=Yii::app()->phpThumb->create($uploadedFile);
// $thumb->resize(100,100);
$thumb = Yii::app()->phpThumb->create(Yii::app()->baseUrl.'/images/'.$model->image);
$thumb->resize(128,128);
// $thumb->save(Yii::app()->baseUrl.'/images/articoli/thumbnails/thumb_'.$model->image);
i have erorr like this
[color="#FF0000"]Alias "ext.EPhpThumb.EPhpThumb" is invalid. Make sure it points to an existing PHP file and the file is readable. [/color]
when I put this code into config/main.php, I get this messages:
b Fatal error: Uncaught exception ‘CException’ with message ‘Property “CWebApplication.phpThumb” is not defined.’ in C:\wamp\framework\base\CComponent.php on line 130
( ! ) CException: Property "CWebApplication.phpThumb" is not defined. in C:\wamp\framework\base\CComponent.php on line 130[/b]
Without this code I get another message:
move_uploaded_file(assets/pic/raw/24432_414865008596494_436127221_n.jpg): failed to open stream: No such file or directory