CodeIgniter Forums
file upload not working in my server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: file upload not working in my server (/thread-8289.html)



file upload not working in my server - El Forum - 05-13-2008

[eluser]Sumon[/eluser]
Here is my code
Code:
if(basename($_FILES['filePhoto']['name'])!="")
{
$config['upload_path'] = './gallery/member_picture/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$config['max_size']    = '100';
$config['max_width']  = '1024';
$config['max_height']  = '768';
$this->load->library('upload', $config);
$FileFieldName="filePhoto";
$this->upload->do_upload($FileFieldName);
}

This code works fine in my localhost / local PC but not working in server. No image uploaded as well i am not getting any working. Moreover, folder path are absolutely same for local and server.


file upload not working in my server - El Forum - 05-13-2008

[eluser]GSV Sleeper Service[/eluser]
an obvious one, but have you checked permissions on the folder?


file upload not working in my server - El Forum - 05-13-2008

[eluser]Sumon[/eluser]
yes i did. all my folders associated with image permission are now 0777.


file upload not working in my server - El Forum - 05-13-2008

[eluser]gtech[/eluser]
any errors, tried setting the log_threashold in the config?


file upload not working in my server - El Forum - 05-14-2008

[eluser]Sumon[/eluser]
thanks. it's now working. but i am getting another exciting error. that is, when i use
Code:
echo form_open_multipart("member/Signup");
it works perfectly fine. But instead of my above form opening method when i use
Code:
<form  name="my_form" action="<?=$this->config->item('base_url')?>member/Signup" style=" float:left; width:500px;" method="post" enctype="multipart/form-data" >
it's not working. One further consideration is that, when i use CI code to generate form CSS not working for it but for straight code it's working. here is the CSS

Code:
form {
    margin:10px; padding: 0;
    border: 1px solid #f2f2f2;
    background-color: #FAFAFA;
}