修改apache上传文件大小限制

PHP上传文件大小限制解决方法:

第一: 
在php.ini里面查看如下行:

upload_max_filesize = 8M    
post_max_size = 10M    
memory_limit = 20M

把这些值改成我所说的,看看有没有问题,另外要确认上传的 <form> 里没有类似下面的这行

<input type="hidden" name="MAX_FILE_SIZE" value="500000"> 
这样也是限制上传大小用的。

第二: 
如果是apache 2 需要修改

/etc/httpd/conf.d/php.conf 
LimitRequestBody 524288将524288(=512×1024)改大,比如5M(=5×1024×1024)这样上传就不会出现如上问题,上传不响应,上传现实该页无法现实也将得到解决!

第三: 
如果是phpwind论坛的上传限制,最好在后台的附件设置处,进行上传附件大小进行设置

discuz的设置如下:

1. 系统管理后台--用户--用户组--选定某个用户组--附件相关--最

大附件尺寸
2. 系统管理后台--帖子--附件类型尺寸--添加要上传的文件类型并设置大


3. 系统管理后台--工具--更新缓存

php,Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)的更多相关文章

  1. Fatal error: Allowed memory size of 8388608 bytes exhausted

    这两天安装bugfree,更换了一个数据量较大的库,结果打开bug详情页要么是空白页,要么就报如题的错误,错误信息还包括C:\wamp\www\bugfree\Include\Class\ADOLit ...

  2. Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D

    Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D 从数据库 ...

  3. (转载)PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in

    (转载)http://blog.csdn.net/beyondlpf/article/details/7794028 Fatal error: Allowed memory size of 13421 ...

  4. PHP的内存限制 Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in   Fa ...

  5. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)

    一段PHP程序执行报错: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261181 ...

  6. Allowed memory size of 134217728 bytes exhausted (tried to allocate 2 bytes)

    出现  Allowed memory size of 134217728 bytes exhausted (tried to allocate 2 bytes)时在php.ini文件中配置 memor ...

  7. PHPExcel 报 Allowed memory size of 8388608 byte

    使用 phpExcel 报 Allowed memory size of 8388608 bytes exhausted 错误,原因是php页面消耗的最大内存默认是为 8M (在PHP的ini件里可以 ...

  8. php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法

    是因为php页面消耗的最大内存默认是为128M (在PHP的ini件里可以看到) ,如果文件太大或图片太大在读取的时候会发生上述错误. 解决办法: 1.修改 php.ini 将memory_limit ...

  9. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in

    最近莫名出现这个错误. 研究一下原因很奇葩呢. 原因:sql获取数据库中数据,取出数据赋给变量,数据太多,超过memory_limit内存设置了. 解决方法:设置memory_limit不建议.优化代 ...

随机推荐

  1. [反汇编练习] 160个CrackMe之021

    [反汇编练习] 160个CrackMe之021. 本系列文章的目的是从一个没有任何经验的新手的角度(其实就是我自己),一步步尝试将160个CrackMe全部破解,如果可以,通过任何方式写出一个类似于注 ...

  2. 新浪微博顶部新评论提示层效果——position:fixed

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. margin collapse 之父子关系的DIV

    打算花点时间将知识整理一下,虽然平时现用现查都能完成工作,可是当遇到面试这种事情的时候,临时查就来不及了... 关于margin,整理若干知识点如下: 一:父子关系的DIV标签以及未加margin时的 ...

  4. trunc的使用

    1.日期比较时精确到日,可以使用 TRUNC(sysdate,'dd')函数.函数支持格式有:yyyy MM  dd  hh Mi可以用 select TRUNC(sysdate,'yyyy') fr ...

  5. ora-0000 normal跟/etc/hosts有关

    当hosts文件配置错误时,用sqlplus登录后startup nomount,就会报错ORA-00000 [oracle11g@testdb2 dbs]$ sqlplus "/ as s ...

  6. js对象的引用

    /*var a = [1,2,3]; var b = [1,2,3]; alert( a == b ); //false*/ //基本类型:赋值的时候只是值得复制 /* var a = 5; var ...

  7. Markdown解决需要输入两个回车才能为一个空行的问题

    markdownDataDiv.children().each(function(){ $(this).html($(this).html().replaceAll("\n",&q ...

  8. UIView动画学习笔记

    UIView的动画是通过修改控件的属性来达到动画的效果,如:渐变, 移动. 废话不多说,直接上代码: - (void)loadView{ [super loadView]; _leftView = [ ...

  9. 解决:cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

    在win下用Go语言的cgo时(比如下面场景)我们会用到的GCC编译器,Win下我们一般用MinGW. Golang连接Oracle数据库:win下 golang 跨平台编译 MinGW全称Minim ...

  10. EFSQLserver

    1.增加一条烽据 FLYNEWQKEntities dataContext = new FLYNEWQKEntities(); Log log = new Log(); log.Data1 = &qu ...