i have a site where a user can upload a video file
when i upload a small file 5MB it work fine , upload that file and redirects to the video list, but when i upload a 15MB file , the file is uploaded ok , but after the file was uploaded in the folder it doesnt redirect , instead shows a 500 internal server error.
here is my code
if(isset($_POST['upload_file']))
{
$user_id = $current_user->ID;
$title = $_POST['title'];
$video_upload = "";
if ( ! function_exists( 'wp_handle_upload' ) ) require_once( ABSPATH . 'wp-admin/includes/file.php' );
$uploadedfile = $_FILES['video_file'];
$upload_overrides = array( 'test_form' => false );
add_filter('upload_dir', 'my_upload_vid_dir');
$movefile = wp_handle_upload( $uploadedfile, $upload_overrides );
remove_filter('upload_dir', 'my_upload_dir');
if ( $movefile ) {
$video_upload = $movefile["url"];
}
if(have_rows('videos', 'user_'.$current_user->ID))
$videos = get_field('videos', 'user_'.$current_user->ID);
else
$videos = array();
//insert video to array
if($video_upload != "")
{
$videos[] = array( 'file_path' => $video_upload , 'title_video' => $title );
update_field("videos", $videos, 'user_'.$current_user->ID);
}
wp_redirect( site_url("video-upload") ); exit;
}
once again the file is uploaded sucessfully i can see the file in the folder , but after upload i expect that the page be redirected to wp_redirect( site_url("video-upload") ); , but it shows 500 internal server error , someone that can help??? , sorry about my english