musicmaster Posted May 30, 2016 Share Posted May 30, 2016 (edited) In my php_error_log file I have the following error: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 69 bytes) in C:\xampp\htdocs\_natura\classes\Tools.php on line 979 This is Prestashop 1.6.1.0 and that line is part of following function: public static function displayError($string = 'Fatal error', $htmlentities = true, Context $context = null) { global $_ERRORS; if (is_null($context)) $context = Context::getContext(); @include_once(_PS_TRANSLATIONS_DIR_.$context->language->iso_code.'/errors.php'); if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $string == 'Fatal error') return ('<pre>'.print_r(debug_backtrace(), true).'</pre>'); if (!is_array($_ERRORS)) return $htmlentities ? Tools::htmlentitiesUTF8($string) : $string; $key = md5(str_replace('\'', '\\\'', $string)); $str = (isset($_ERRORS) && is_array($_ERRORS) && array_key_exists($key, $_ERRORS)) ? $_ERRORS[$key] : $string; return $htmlentities ? Tools::htmlentitiesUTF8(stripslashes($str)) : $str; } Line 978 is "if (!is_array($_ERRORS))". I am puzzled what to make of this error. I am working on a 8GB computer and this is just the login screen so I wouldn't expect memory problems. Neither do I understand how an is_array command can cause a memory problem. Can anyone enlighten me? Edited May 30, 2016 by musicmaster (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted May 30, 2016 Share Posted May 30, 2016 the error occurs when memory allocated for PHP is running out. you may check it here for some advises. http://stackoverflow.com/questions/3534274/php-memory-exhausted Link to comment Share on other sites More sharing options...
tuk66 Posted May 30, 2016 Share Posted May 30, 2016 Set memory_limit=256M in the php.ini configuration file. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now