1
I am trying to make a video upload form but I have a problem that makes it impossible to upload because I always get the following error:
Warning: POST Content-Length of 69509336 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Even changing php.ini so that the posts have no limits
post_max_size=0
What can I do to solve this problem?
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit"/>
</form>
<?php
$randomNum=substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyz"), 0, 11);
$randomNum64 = base64_encode($randomNum);
$base64 = base64_encode($randomNum);
if(isset($_FILES['file'])){
$errors= array();
$file_name = $_FILES['file']['name'];
$file_size =$_FILES['file']['size'];
$file_tmp =$_FILES['file']['tmp_name'];
$file_type=$_FILES['file']['type'];
$file_ext=strtolower(end(explode('.',$_FILES['image']['name'])));
if(empty($errors)==true){
move_uploaded_file($file_tmp,"uploads/".$file_name);
echo "Success";
}else{
print_r($errors);
}
}
?>
This is a server limitation, if you go to php.ini and search by post_max_size you can check which limit size you have to pass data through POST.
– user60252
I am using the local XAMPP server, the code I put from PHP ini was what I put in my file
– Luhan Salimena