php,Allowed memory size of 8388608 bytes exhausted (tried to allocate 1298358 bytes)
修改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)的更多相关文章
- Fatal error: Allowed memory size of 8388608 bytes exhausted
这两天安装bugfree,更换了一个数据量较大的库,结果打开bug详情页要么是空白页,要么就报如题的错误,错误信息还包括C:\wamp\www\bugfree\Include\Class\ADOLit ...
- 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 从数据库 ...
- (转载)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 ...
- 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 ...
- 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 ...
- 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 ...
- PHPExcel 报 Allowed memory size of 8388608 byte
使用 phpExcel 报 Allowed memory size of 8388608 bytes exhausted 错误,原因是php页面消耗的最大内存默认是为 8M (在PHP的ini件里可以 ...
- php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法
是因为php页面消耗的最大内存默认是为128M (在PHP的ini件里可以看到) ,如果文件太大或图片太大在读取的时候会发生上述错误. 解决办法: 1.修改 php.ini 将memory_limit ...
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 44 bytes) in
最近莫名出现这个错误. 研究一下原因很奇葩呢. 原因:sql获取数据库中数据,取出数据赋给变量,数据太多,超过memory_limit内存设置了. 解决方法:设置memory_limit不建议.优化代 ...
随机推荐
- PHP面向对象(PHP对象在内存中的分配)
对 像在PHP 里面和整型.浮点型一样,也是一种数据类,都是存储不同类型数据用的, 在运行的时候都要加载到内存中去用,那么对象在内存里面是怎么体现的呢?内存从逻 辑上 说大体上是分为4 段,栈空间段. ...
- BZOJ 2120/BZOJ 2453
分块傻逼题. memset很慢的...而且其实也没有用.... #include<iostream> #include<cstdio> #include<cstring& ...
- ecshop init.php文件分析(转)
<?php /** * ECSHOP 前台公用文件 */ //防止非法调用 defined-判断常量是否已定义,如果没返回false if (!defined('IN_ECS')) { die( ...
- android 相对布局
RelativeLayout布局 android:layout_marginTop="25dip" //顶部距离 android:gravity="left" ...
- mysql 概念和逻辑架构
1.MySQL整体逻辑架构 mysql 数据库的逻辑架构如下图: 第一层,即最上一层,所包含的服务并不是MySQL所独有的技术.它们都是服务于C/S程序或者是这些程序所需要的 :连接处理,身份验证,安 ...
- PHP String函数分类
1.查找字符位置函数: strpos ($str,search,[int]): 查找search在$str中的第一次位置从int开始: stripos ($str,search,[int]): ...
- Arduino开发常见错误
使用Ethernet时需要指定访问服务器的ip,我用的是本机做服务器.但是有一天重启了路由器,ip地址就变了!程序得跟着改! Arduino突然烧写不了程序:可能是正在运行的程序让arduino死机了 ...
- PHP中cookie与session总结
PHP session 变量用于存储有关用户会话的信息,或更改用户会话的设置.Session 变量保存的信息是单一用户的,并且可供应用程序中的所有页面使用. 理解:session用于单一用户与服务器的 ...
- C# "error CS1729: 'XXClass' does not contain a constructor that takes 0 arguments"的解决方案
出现这种错误的原因时,没有在子类的构造函数中指出仅有带参构造函数的父类的构造参数. 具体来讲就是: 当子类要重用父类的构造函数时, C# 语法通常会在子类构造函数后面调用 : base( para_t ...
- java 学习资料
最近一直在从java基础开始学习java,感觉个人学习思路还是比较混乱的. 看到Java工程师成神之路中介绍了需要学习的知识点,并在<成神之路系列文章>中分章分节的开始介绍其中所有的知识点 ...