-2

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) in /home/---/domains/---/public_html/---/system/storage/cache/e0/e04e1f01ecc413b48d48f7d0acd02b41afe20667628afe21e97945b89e1c590a.php on line 51

I have this error, when I load this in controller/common/header.php:

$this->load->controller("account/login");

My php.ini:

magic_quotes_gpc = Off
register_globals = Off
default_charset = UTF-8
memory_limit = 64M
max_execution_time = 36000
upload_max_filesize = 999M
post_max_size=999M
safe_mode = Off
mysql.connect_timeout = 20
session.auto_start = Off
session.use_only_cookies = On
session.use_cookies = On
session.use_trans_sid = Off
session.cookie_httponly = On
session.gc_maxlifetime = 3600
allow_url_fopen = On
;display_errors = 1
;error_reporting = E_ALL
3
  • we cant see your code which is consuming the memory causing the error, so i dont know how we are suppose to help you.
    – user10051234
    Feb 6, 2019 at 21:35
  • But do you expect your code to need that much memory? if not you probably have a undesirable loop eating memory. eg Recursion.
    – Scuzzy
    Feb 6, 2019 at 22:03
  • My guess is infinite recursion tried to allocate 8192 bytes typically when this is a low value that is the reason. If you up the memory above that amount and it still happens, then that's another marker for it. Feb 6, 2019 at 23:50

1 Answer 1

1

Please try to set your memory limit higher.

memory_limit = 256M

Than reload you webserver.

2
  • I get same problem. Feb 6, 2019 at 21:32
  • 268,435,456 Bytes is 256 Megabytes
    – Scuzzy
    Feb 6, 2019 at 22:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.