Skip to main content

upload file di linux gagal.

January 28, 2010 by mazrizky

mazrizky's picture

Dear para suhu codeigniter semua.
Saya masih newbie di dalam pngembangan aplikasi web dengan codeigniter. Dalam aplikasi yang saya buat, saya menggunakan OS Linux( CentOS) dalam penyipanan databasenya. Saat menjalankan fungsi upload file (yang saya upload file flv), file tersebut gagal terupload dengan keterangan di display error : 'The filetype you are attempting to upload is not allowed'.
Akan tetapi, jika saya jalankan di OS Windows, fungsi upload tersebut dapat berjalan dengan baik.
Bagaimana solusinya supaya di Centos perintah upload file tersebut bisa jalan sebagaimana di Windows?
makasih.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

ookk

February 13, 2010 by bella, 1 year 51 weeks ago
Comment: 5897

bella's picture

iya benar chmod tapi chmod kalau u buat folder.
$config['upload_path'] = $dir;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '2000';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$this->upload->initialize($config);
if (!$this->upload->do_upload('image')){
$error = $this->upload->display_errors();

}else{
}

"if (!$this->upload->do_upload('image'))"
nah yg syntk diatas yg tanda petik $this->upload->do_upload('image');
image nama field harus ditulis kalau tidak diwindows tidak masalah tapi linux bermsalah

RE: upload file di linux gagal

January 29, 2010 by ant1xf1233, 2 years 1 week ago
Comment: 5871

ant1xf1233's picture

rubah destination folder permission 777
contoh ; bash# : chmod /var/www/CI/upload 777

mudah mudahan membantu

regard
xfree

Premium Drupal Themes by Adaptivethemes