[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.