修改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. setTimeOut() 和 setTimeInterval()

    setTimeOut()は.指定された時間「待ってから」指定された動作を行う関数です.setTimeOut():等待指定时间,执行指定方法. setTimeInterval()は.指定された時間「間隔 ...

  2. BZOJ 1556 墓地秘密

    2333333333333333333333333333333333333333333333 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊 辣鸡出题人辣鸡出题人辣鸡出题人辣鸡出题人辣鸡 ...

  3. java-过滤器-监听器-拦截器

    1.过滤器 Servlet中的过滤器Filter是实现了javax.servlet.Filter接口的服务器端程序,主要的用途是过滤字符编码.做一些业务逻辑判断等.其工作原理是,只要你在web.xml ...

  4. 【转】XCode环境变量及路径设置 -- 待学习

    原文网址:http://www.cnblogs.com/oc-bowen/p/5140541.html 一般我们在xcode里面配置包含工程目录下头文件的时候,都要关联着相对路径和绝对路径,如果只是自 ...

  5. Android 高仿豌豆荚 一键安装app 功能 实现

    以往我们那些应用市场 帮我们安装app的时候  我们都得点确定,当然你如果 root 以后 不用点确定 也能自动安装了,后来豌豆荚 推出了一个功能 非root的手机也能不点确定 直接帮你安装好.(如果 ...

  6. android 横竖屏限制如何配置

    在开发android的应用中,有时候需要限制横竖屏切换.只需要在AndroidManifest.xml文件中加入android:screenOrientation属性限制. ndroid:screen ...

  7. PhoneGap API Documentation API Reference

    API Reference-API参考 Accelerometer-加速度计 Tap into the device's motion sensor.-点击进入该设备的运动传感器. Camera-相机 ...

  8. Maps

    Maps.uniqueIndex()将列表转换为map  //iterator各个元素作为Map.values, key为Function.apply返回值 Maps.uniqueIndex(ps.i ...

  9. 理解Mysql的索引与优化

    转自:http://www.cnblogs.com/hustcat/archive/2009/10/28/1591648.html 写在前面:索引对查询的速度有着至关重要的影响,理解索引也是进行数据库 ...

  10. [Java]获取图片高和宽

    通过javax.imageio.ImageIO类中的read()函数读取的图片,存放在类java.awt.image.BufferedImage类中.调用BufferedImage类中的getWidt ...