I need to upload a video file. Here's my code
if(($_FILES["file"]["type"]=="application/octet-stream") || ($_FILES["file"]["type"]=="video/x-ms-wmv"))
{
if($_FILES["file"]["error"] > 0)
{
echo "Error: ".$_FILES["file"]["error"]."<br />";
}
else if(file_exists("videos/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],"videos/".$_FILES["file"]["name"]);
$filename=$_FILES["file"]["name"];
$type=$_FILES["file"]["type"];
$size=($_FILES["file"]["size"]/1024);
$path="".$_FILES["file"]["name"];
if(($ins=mysql_query("insert into achieva_video values('','".$_REQUEST['vname']."','".$_REQUEST['courid']."','".$filename."','".$path."','".$size."','".$type."','Active')"))==true)
{
header("location:viewcoursevideo.php?ins=1");
}
else
{
echo("<script>alert('Failure Please try again later');</script>");
}
}
}
else
{
echo "<script>alert('Invalid File Type');</script>)";
}
I'm bit confused with this warning message when I try to upload a video file.
"PHP Warning: POST Content-Length of 9311816 bytes exceeds the limit of 8388608 bytes in Unknown on line 0"
I've set the following preferences in the php ini:
memory limit = 150M
upload file size = 120M
post max size = 120M
The file has not been updated. it takes long time and just shows this warning.