Welcome Guest, Not a member yet? Register   Sign In
image upload
#1

[eluser]reviloera[/eluser]
am using fedora 13 when uploading image i get this error
The upload destination folder does not appear to be writable. the image folder i have set to chmod 777
what can the problem be thanx.
Code:
function execute_all()
    {
        

        if($_FILES['userfile']['error'] != 4)
        {
            $this->do_uploadx();
        }
    }

    function do_uploadx()
    {
          $config['upload_path']    = './images/';
          $config['allowed_types']  = 'gif|jpg|png';
          $config['max_size']       = '200';
          $config['max_width']      = '1024';
          $config['max_height']     = '768';
          

          $this->load->library('upload', $config);

          if(!$this->upload->do_upload())
          {
              $error = $this->upload->display_errors();
              echo $error;
          }
          else
          {
              echo $this->upload->data();
          }
    }
images is in the root of CI
#2

[eluser]Cristian Gilè[/eluser]
Please, post your code and some information about your CI dir structure.


Cristian Gilè
#3

[eluser]reviloera[/eluser]
thread updated
#4

[eluser]Mutsop[/eluser]
Well its as its says... your folder isn't writable
Use your ftp client and right click on the folder and there should be some chmod button
set it on 777
#5

[eluser]reviloera[/eluser]
I have used the terminal and my folder is set to 777
#6

[eluser]Cristian Gilè[/eluser]
Quote:images is in the root of CI

Is the images folder at the same level of index.php file?


Cristian Gilè
#7

[eluser]reviloera[/eluser]
fixed the problem selinux was preventing apache to write on the folder so i disabled it and it worked thax all




Theme © iAndrew 2016 - Forum software by © MyBB