dongpao1921 2014-02-05 07:00
浏览 388

500内部服务器错误 - 无法使用PHP上传大型视频文件

Not able to upload large video file up to(20 to 100 MB). Already setup php.ini file on server .

upload_max_filesize = 2000M

post_max_size = 2000M

max_execution_time = 120

max_file_uploads = 7

memory_limit=128M

Getting

"HTTP Error 500.0 - Internal Server Error The page cannot be displayed
 because an internal server error has occurred."

or

"This page is not available."

sometime uploading process is shows 40 to 60 percent then its automatically restart the uploading process.

using simple move_uploaded_file() php function.

<?php 
ini_set('max_execution_time', 50000);
 $target = "upload/"; 
 $target = $target . basename( $_FILES['uploaded']['name']) ; 
 if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
    {
    echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
    } 
     else 
     {
     echo "Sorry, there was a problem uploading your file.";
     }
 ?>

Thanks

  • 写回答

1条回答 默认 最新

  • douguai7291 2014-02-05 09:38
    关注

    Based on my experience about this error (trust me was not the best times of my life) 500 Internal Server Error on file uploads usually happens when your php is configured to run as fastcgi . Ask your hosting provider and/or server administrator to increase (or define if it's not already defined) the size of FcgidMaxRequestLen aka MaxRequestLen parameter.

    Check this page and search "500 Internal Server Error" on the page. http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记