Be a Supporter!

php upload

  • 367 Views
  • 3 Replies
New Topic Respond to this Topic
Loccie
Loccie
  • Member since: Feb. 27, 2004
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
php upload 2008-01-08 01:00:05 Reply

I made a file upload system but as soon as I upload a file that's big (like 5mb for example) FF says: "The connection to the server was reset while the page was loading.". I assume I have to change something in php.ini but I have no idea what.

JeremysFilms
JeremysFilms
  • Member since: Feb. 18, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to php upload 2008-01-08 01:18:58 Reply

I think you may have to change a part that limits the total allowable file size upload and overrides any other limitations

Loccie
Loccie
  • Member since: Feb. 27, 2004
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to php upload 2008-01-08 11:56:13 Reply

At 1/8/08 01:18 AM, JeremysFilms wrote: I think you may have to change a part that limits the total allowable file size upload and overrides any other limitations

You mean the maximum file size in php.ini? I put upload_max_filesize to 10M but it's still showing that.

BoneIdol
BoneIdol
  • Member since: Aug. 14, 2006
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to php upload 2008-01-08 13:01:56 Reply

There's two settings in php.ini that limit your maximum upload size; upload_max_filesize and post_max_size.

You also have to make sure that the MAX_FILE_SIZE field in your upload form is an adequate size. You should not rely on this to control the upload size though, as the user can easily change it with the right tools.

There's a few more php.ini settings that can cause an upload to fail, such as max_execution_time and memory_limit. This is especially true with multiple uploads in one script or if you use libraries like GD to create thumbnails.


Sufficiently advanced incompetence is indistinguishable from malice.