Welcome Guest, Not a member yet? Register   Sign In
upload problem "The upload destination folder does not appear to be writable."
#1

[eluser]LDMajor[/eluser]
I just cant figure out whats wrong with it

I am creating the folder and than uploading
Code:
$user=$this->input->post('name');
.
.
.
.
$pathme=realpath('photos')."/".$user;
.
.
.
.
// create folder
                if (! is_dir($pathme)) {
                    mkdir($pathme);
                    chmod($pathme, 0777);
                }
                // upload
                $config['upload_path'] = $pathme;
                $config['allowed_types'] = 'gif|jpg|png|bmp|jpeg';
                $config['max_size']    = '2048';
                $config['max_width']  = '370';
                $config['encrypt_name']= TRUE;
                $this->load->library('upload', $config);
                if ( ! $this->upload->do_upload('mainpic')) {
                    $data['errormess']="<tr><td colspan=\"3\"><span class=\"err\">אנא עבור\עברי על הטופס ותקן\י את השגיאות הקיימות</span></td></tr>";
                    $data['e_pic']="<tr><td colspan=\"3\"><span class=\"err\">בעיה בהעלאת התמונות אנא צרו קשר</span></td></tr>";
                    print_r ($this->upload->display_errors());
                    echo "<br />";
                    echo $pathme;
                } else {
                    print_r ($this->upload->data());
                    echo "<br />";
                }
as you can see I am printing the path and the path is fine

Output:
The upload destination folder does not appear to be writable.

/home/mdl/domains/d.mdl.co.il/public_html/photos/nmdlsd


I checked several times manually through the FTP
and the folder is writable (CHMOD 777)

Also i checked almost all the threads about uploading problems that i found
(found the REALPATH function that way)

Thanks for the help guys...
Dan.
#2

[eluser]LDMajor[/eluser]
:coolsmirk:
#3

[eluser]LDMajor[/eluser]
I am run out of ideas =[
#4

[eluser]oll[/eluser]
A 777 folder may be not writable for apache user (or whatever user who runs the apache server) if a directory before is not "crossable".
You should check the apache server logs.
#5

[eluser]LDMajor[/eluser]
[quote author="oll" date="1223816726"]A 777 folder may be not writable for apache user (or whatever user who runs the apache server) if a directory before is not "crossable".
You should check the apache server logs.[/quote]

so how can i fix this?
#6

[eluser]oll[/eluser]
Hard to abstract a Howto w/o a doing a Unix filesystem permissions guide Wink

Can you output the result of the
Code:
ls -ld /home/mdl/domains/d.mdl.co.il/public_html/photos

command ?




Theme © iAndrew 2016 - Forum software by © MyBB