CodeIgniter, Having problems locating thumbnail image after resize on Amazon EC2 Instance -


i having problems generating thumbnail image on amazon ec2.

it works fine on local machine, error occurs when deployed amazon ec2

the error/warning try upload thumbnail amazon s3 , original image upload fine.

severity: user warning message:  s3::inputfile(): unable open input file: /tmp/file_name_thumb.jpg filename: libraries/s3.php line number: 263 

the code controller is

//this config first image $config['upload_path'] = sys_get_temp_dir(); // tried switching '/tmp'; $config['allowed_types'] = 'jpg|png'; $config['max_size'] = '500'; $config['max_width'] = '0'; $config['max_height'] = '0'; $config['overwrite'] = true;  $this->load->library('upload', $config); $this->load->library('image_lib');  //then upload $data = array('upload_data' => $this->upload->data());  // 2nd config resize $config = array(    'source_image'   => $data['upload_data']['full_path'], //path of uploaded image    'new_image'      => sys_get_temp_dir(), //path target resize, tried switching '/tmp' ;    'create_thumb'   => true,    'maintain_ratio' => true,    'width'          => 300,    'height'         => 300,    'master_dim'     => 'width',);  $this->image_lib->initialize($config); $this->image_lib->resize();  // path of thumbnail $filetempthumbname = sys_get_temp_dir().'/'.$data['upload_data']['raw_name'].'_thumb'.$data['upload_data']['file_ext']; // tried replacing sys_get_temp_dir() '/tmp'. 

the $filetempthumbname paramaters put into

$this->s3->putobject($this->s3->inputfile($filetempthumbname, false),$bucket,$name,$array(),$array()) 

my local running on osx 10.8.2 xampp , php version 5.3.1 codeigniter version 2.1.3 amazon s3 php class 0.4.0

i have chmod 777 tmp folder on amazon ec2 instance.

the resized image not there when checked tmp folder.

thank in advance.

the problem did not have gd installed on amazon ec2.

after installing it, works quite well.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -