CodeIgniter Forums

Full Version: file upload not working in my server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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

El Forum

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

El Forum

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

El Forum

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

El Forum

[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;
}