php上传大文件500错误,PHP + Uploadify + MySQL上传大文件出现HTTP Error (500)

网页代码,装入Uploadify控件:

Click (+) to upload cad file (*.zip;*.rar;*.tgz)
File list

问题:大文件上传,错误

Uploadify small file to MySQL, good;  (3M小文件上传,没有问题)

20181218095022337109.png

Uploadify big file to MySQL, error: (100M大文件上传,错误)

20181218095022664257.png

思路:

1)可能在某个地方设定了限定上传文件大小

2)上传文件需要时间,可能在某个地方设定了限定上传文件的时间

1. 检查PHP ini  (问题在于PHP配置文件设定里)

echo ini_get(‘upload_max_filesize‘)."
";

>2048M   (此设置没有问题)

echo ini_get(‘post_max_size‘);

>1024M   (此设置没有问题)

max_execution_time = 300 改为 3000

max_input_time = 60           改为 600

memory_limit = 128M          改为 1280M

(after change to the red, restart IIS …. upload big file …. 修改以上参数之后,上传文件就没有问题了)

2. 检查mysql 设置(没有问题)

mysql> show VARIABLES like‘%max_allowed_packet%‘;

+--------------------------+------------+

| Variable_name            | Value      |

+--------------------------+------------+

| max_allowed_packet       | 1073741824 |

| slave_max_allowed_packet | 1073741824 |

+--------------------------+------------+

2 rows in set (0.00 sec)

3. 检查IIS configuration  (IIS配置,没有问题)

20181218095023009961.png

4. 检查PHP ini设置

echo ini_get(‘upload_max_filesize‘)."
";

>2048M

echo ini_get(‘post_max_size‘);

>1024M

max_execution_time = 300 改为 3000

max_input_time = 60           改为 600

memory_limit = 128M          改为 1280M

(after change to the red, restart IIS …. upload big file …. good! 修改以上参数之后,上传文件就没有问题了)

20181218095023550976.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值