# Cant upload large files in the panel (but simple php upload script works)

**URL:** <https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449>\
**Category:** Questions\
**Tags:** v2\
**Created:** [March 19, 2019, 5:05pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449 "2019-03-19T17:05:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 19, 2019, 5:05pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/1 "2019-03-19T17:05:14Z")

</div>

Hi, I’m trying to upload a file of ~80mb through the panel. This fails (Status 500) and the server response is: `{"status":"error","code":2,"message":"The file is missing in file: \/path\/to\/site\/kirby\/vendor\/getkirby\/toolkit\/lib\/upload.php on line: 198"}`

My php.ini looks like this (also checked via phpinfo()):  
post\_max\_size = 250M  
upload\_max\_filesize = 250M  
memory\_limit = 300M  
max\_execution\_time = 300

Panel Uploads work for files smaller than 64mb. Uploads through a simple upload script also work for files larger than 64mb. Only large files uploaded through the panel fail.

My Kirby and Panel versions are 2.5.7

Does anyone have any ideas as to what might cause this?

---

<div class="post-metadata">

**Author:** ![bvdputte](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bvdputte/32/8179_2.png) [@bvdputte](https://forum.getkirby.com/u/bvdputte)\
**Post date:** [March 19, 2019, 5:13pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/2 "2019-03-19T17:13:13Z")

</div>

Maybe you could try updating Kirby to the latest version first (2.5.12) ? And have you tried different browsers?

---

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 19, 2019, 5:48pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/3 "2019-03-19T17:48:22Z")

</div>

Thanks for the quick reply. I’ve updated Kirby to 2.5.12 and tried Chrome, as well as Firefox. But unfortunately the problem still persists.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 19, 2019, 6:08pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/4 "2019-03-19T18:08:31Z")

</div>

What type of file are you trying to upload?

---

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 19, 2019, 6:11pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/5 "2019-03-19T18:11:47Z")

</div>

I want to upload a video. But I’ve also already tried a zip archive with no luck.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 19, 2019, 6:30pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/6 "2019-03-19T18:30:57Z")

</div>

If it really stops at 64mb, that sounds rather like uploads are restricted by the hosting provider. Where is your website hosted?

---

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 19, 2019, 6:40pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/7 "2019-03-19T18:40:08Z")

</div>

1and1 ionos is the host.

Thats my current guess as well. But I don’t understand why I’m able to upload the same files with the following script, but not with kirby:

test.html

```
<html>
<body>
<form action="upload.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" /> 
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

```

upload.php

```
<?php move_uploaded_file($_FILES["file"]["tmp_name"], "/path/to/site/" . $_FILES["file"]["name"]); ?>
<html>
<head></head>
<body>
<?php
if ($_FILES["file"]["error"] > 0) {
  echo "Error: " . $_FILES["file"]["error"] . "<br />";
} else {
  echo "Upload: " . $_FILES["file"]["name"] . "<br />";
  echo "Type: " . $_FILES["file"]["type"] . "<br />";
  echo "Size: " .($_FILES["file"]["size"] )." Bytes<br />";
  echo "Temp Storage: " . $_FILES["file"]["tmp_name"];
}
?>
</body>
</html>
```

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [March 19, 2019, 6:43pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/8 "2019-03-19T18:43:33Z")

</div>

It seems to originate when Kirby is trying to move the file after uploading it: [https://github.com/getkirby-v2/kirby/blob/a0ab4f5cdaced5bced734bdca9e9cc24f0e473a5/vendor/getkirby/toolkit/lib/upload.php#L130-L143](https://github.com/getkirby-v2/kirby/blob/a0ab4f5cdaced5bced734bdca9e9cc24f0e473a5/vendor/getkirby/toolkit/lib/upload.php#L130-L143)

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 19, 2019, 7:08pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/9 "2019-03-19T19:08:41Z")

</div>

I had the same issue with 1und1 about two years ago (not with Kirby, but another in-house application) and talked to their support just to find out that it just wasn’t possible to upload any bigger files. We then had to change providers. Don’t understand why your upload script works, then, though.

But I just tested to upload the same 100 mb file in a Kirby installation on an 1und1 server and on another one, and it wasn’t possible on the 1und1 server, but worked on the other server. Max. was indeed around 64mb.

---

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 19, 2019, 11:15pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/10 "2019-03-19T23:15:22Z")

</div>

Okay thanks for the quick help so far. I’ll try to contact the 1and1 support tomorrow. In the meantime I confirmed that the simple upload script does indeed work with a ~150mb file. Also I am able to upload large files with kirby on a local server. I can’t really explain this behavior.

---

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 20, 2019, 11:55am UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/11 "2019-03-20T11:55:42Z")

</div>

I just had a call with the 1and1 support and they confirmed the upload\_max\_filesize limit of 64M. Me being able to upload larger files with the simple script seems to be bug or maybe even a vulnerability.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 20, 2019, 12:01pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/12 "2019-03-20T12:01:48Z")

</div>

Ok, then that’s solved even if it is not really a solution for you and probably means changing your hosting provider.

---

<div class="post-metadata">

**Author:** ![Till](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/till/32/6418_2.png) [@Till](https://forum.getkirby.com/u/Till)\
**Post date:** [March 20, 2019, 12:09pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/13 "2019-03-20T12:09:39Z")

</div>

Yep…

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:23pm UTC](https://forum.getkirby.com/t/cant-upload-large-files-in-the-panel-but-simple-php-upload-script-works/13449/14 "2025-02-06T17:23:18Z")

</div>

Archived on February 6, 2025, 5:23pm UTC


