Welcome Guest, Not a member yet? Register   Sign In
BUG: Large file, empty field
#1

[eluser]Alex van der Vegt[/eluser]
Hello,

I want to use a the file uploading script of ci for uploading a file of 15mb.
Well all my server settings are fine and my script is working if it is not in ci.

When i putt it in ci and i submit the form, i can upload small file (max 8mb) but when the files are greater it is saying no input file specified. It looks like the file field is being emptyed when a file is greater as 8 mb.

Does somebody know how to solve this?
#2

[eluser]Seppo[/eluser]
Have you changed your PHP settings on upload_max_filesize and post_max_size?
#3

[eluser]Alex van der Vegt[/eluser]
Yes i've sett both, also the max_execution_time, max_input_time and the memory_limit.
As i said my upload script is perfectly working without ci, but when i putt it in a controller it doesn't neither does the file uploading class. They both work in ci till a max of 8mb.

Is ci making sessions or something, cause when i upload greater files as 8mb it says: no input file specified.

I hope someone can help me with this.
#4

[eluser]Pygon[/eluser]
EDIT: Nevermind -- you said it was working outside of CI.
#5

[eluser]Alex van der Vegt[/eluser]
Yes outside of ci i can upload 15mb files it is in the same directory as ci so all my server values are correct. My code is also correct cause smaller files (max 8mb) can upload.
So i don't get this
#6

[eluser]Alex van der Vegt[/eluser]
BTW here is my code maybe there is something not right, which i can't imagine because i can upload (max 8mb files)
Code:
function uploadPsd()
    {
        $this->load->library("validation");
        
        // Rules
        $rules["email"] = "required|valid_email";
        $this->validation->set_message("required", "Het %s veld is verplicht.");
        $this->validation->set_message("valid_email", "Het door u ingevoerde emailadres is niet juist.");
        
        $this->validation->set_rules($rules);
        
        if ($this->validation->run() == FALSE)
        {
            // DISPLAY ERRORS
        }
        else
        {        
            $config["upload_path"] = "psds/";
            $config["allowed_types"] = "psd|rar|zip";
            $config["max_size"] = "15360";
            $config["encrypt_name"] = TRUE;
            
            $this->load->library("upload", $config);
        
            if ( ! $this->upload->do_upload("psd"))
            {
                // DISPLAY ERRORS
            }    
            else
            {
                // Data in database zetten
                $fileInfo = $this->upload->data();
                $uploadData = array(
                       "bnr" => $fileInfo["raw_name"],
                       "email" => $this->input->post("email"),
                       "ip" => $this->input->ip_address(),
                       "status" => 0,
                    "date" => date("Y-m-d")
                );

                $this->db->insert("psds", $uploadData);

                // UPLOAD SUCCEEDED
            }
        }
    }

people need to input an file and their emailadress. Than hit upload.
#7

[eluser]xwero[/eluser]
Are you getting errors? What does the log say?
#8

[eluser]Alex van der Vegt[/eluser]
I don't get any errors, its just a blank page if i use the validation.
When i remove the validation and only the upload class it says: no input file specified.

Where can i find the error log?
#9

[eluser]xwero[/eluser]
You have to enable it in the config file. You can put it where you want.
#10

[eluser]Alex van der Vegt[/eluser]
Edited




Theme © iAndrew 2016 - Forum software by © MyBB