1

This I believe is a PHP issue, but please feel free to chime in. I am trying to upload a file, I have set the max size to 10240 (10mb's). I am trying to upload a file, (in Ubuntu 13.04) from the desktop to my localhost site. This file size is 18.9kb's its a zip. I have checked the size 50 times.

I var_dump the file coming in: $_FILES['file']['size'] to check the size as it's spazzing out through a custom error stating "this file exceeds the allowed size of 10mb's."

The size dumped? 18888 thats roughly 18mb's

Oo.

That's not right, the file I am uploading is 18.9kb's

Is there something I should be looking for? Im not sure how to fix this. I am running PHP 5.4.latest

1 Answer 1

1

If you just used the integer 10240 for upload_max_filesize, then it's measured in bytes, so your limit is 10KB, not 10MB

Also be aware that you need to ensure post_max_size is at least as large as this too, and see this manual page for other pitfalls (thanks zsawyer).

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

1 Comment

+1 for hint at the other pitfall (here are more hints)

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.