在服务器上传图像时出错。它显示500内部服务器错误。如果我上传小图像比一切都好,但上传大尺寸图像时出现上述错误。 这是在本地服务器上本地但错误。
答案 0 :(得分:3)
检查php.ini中的upload_max_filesize
Echo ini_get ("upload_max_filesize");
答案 1 :(得分:1)
它是:
mod_fcgid:HTTP请求长度131308(到目前为止)超过MaxRequestLen(131072)
所以我通过将其添加到全局httpd.conf(来自cPanel)来更改限制:
MaxRequestLen 15728640
一切正常......
答案 2 :(得分:0)
使用下面的
检查这个允许的时间来执行你的脚本echo $maxExeTime = ini_get('max_execution_time');
并检查脚本花费的时间,并在执行文件上传脚本之前增加执行时间以增加它,您可以在代码下面使用
ini_set('max_execution_time', '0');
答案 3 :(得分:0)
检查你的php.ini文件
upload_max_filesize
答案 4 :(得分:0)
$.post(flipCountdownObj.ajax_url, data, function(response) {
var currentTime = new Date(parseInt(response) * 1000);
alert("Server says the time is " + currentTime.toLocaleTimeString());
// code to create my countdown here...
}
文件php.ini
更改为memory_limit=128M
memory_limit=256M
保存更改ctrl+s
或Apache
服务器Nginx
any size
Repeat from Step-1 above
,直到服务器接受大文件。但不要忘记保存更改并重新启动服务器,否则它将无法正常工作。