0

So I'm using Codeigniter and I want to upload files. It's working fine except for this one thing.

Here's config code:

$this->conf = array(
    'max_size' => '1024',
    'encrypt_name' => TRUE,
    'allowed_types' => 'avi|mov|mpg|wmv|flv',
    'upload_path' => 'assets/media/videos/'
);

Uploading a 5MB mpg file, it shows the error File is too big.., but when I try to upload an 18MB mpg file, it just refreshes the page.

I'm at a loss here. I don't know where to start. Any helpful tips will be greatly appreciated. Also, let me know if I need to add more code, like I said, I've no idea where to start.

Here's what I've tried so far:

  1. changed upload max size on php.ini to 100M
  2. the answer found here: Strange CodeIgniter file upload error but print_r($_FILES) doesn't even get executed, the page just refreshes.

1 Answer 1

2

Its not just upload max size, you'll want to up the following settings:

post_max_size
memory_limit

Also set_time_limit to something high as well or the upload is just timing out, hence why your seeing a blank array.

Sign up to request clarification or add additional context in comments.

1 Comment

That worked perfectly. Thanks. No idea why they still have upload_max_filesize in there, though. This was driving me nuts all day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.