CakePHP:致命错误:允许内存大小为536870912字节用尽(试图分配52字节) [英] CakePHP : Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 52 bytes)

查看:2312
本文介绍了CakePHP:致命错误:允许内存大小为536870912字节用尽(试图分配52字节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个运行在 CakePHP v 1.3 上的应用程序。我更新了我的 wamp 服务器到 v2.4 。更新后我得到了这个错误消息。我做了这些更改进入我的php.ini设置。

Hi i have a apps running on CakePHP v 1.3. I've updated my wamp server to v2.4.After updating i got this error message.I did these changes into my php.ini settings.


  • memory_limit = 128M

  • file_uploads = ON

  • upload_max_filesize = 128M

  • max_input_time

  • max_execution_time = 300

  • post_max_size = 128M

  • realpath_cache_size = 16k

  • realpath_cache_ttl = 120

  • memory_limit = 128M
  • file_uploads = ON
  • upload_max_filesize = 128M
  • max_input_time
  • max_execution_time = 300
  • post_max_size = 128M
  • realpath_cache_size = 16k
  • realpath_cache_ttl = 120

但我仍然得到这些错误消息:

But i'm still getting these Error message :

CakePHP : Fatal error: Allowed memory size of 536870912 bytes exhausted 
(tried to allocate 52 bytes) in C:\wamp\www\gtgcrm\cake\libs\model\
datasources\dbo\dbo_mysql.php on line 775

我错过了什么?

推荐答案

您可以通过在控制器操作中使用增加内存限制

You can increase memory limit by using in your controller action

ini_set('memory_limit', '256M');

也可以增加超时限制

set_time_limit(0); Infinite

这篇关于CakePHP:致命错误:允许内存大小为536870912字节用尽(试图分配52字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆