4

I got the following error message in my php error logs:

PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 5 bytes) in /lib/Zend/Db/Statement/Pdo.php on line 284

However, I want the complete stack trace, any idea how do I get it?

2 Answers 2

1

You can see Xdebug with stack trace.

http://www.xdebug.org/

Sign up to request clarification or add additional context in comments.

Comments

0

Looks like your PHP config (php.ini) doesn't allow more than 1GB of memory, thats really huge for PHP scripting.

make sure u don't procedure an endless loop. When perform an endless loop with huge files or large database queries, it can happen that the memory gets full before the script stopped working by max_execution_time error.

If your provider allows, you can extend the memory usage by give it ini_set("memory_limit","2G") or more if needed (not recommended).

if u really want to debug this, use php "self-debuggers" in this case, put

echo "<pre>".print_r(debug_backtrace(),true)."</pre>";
exit;

before the error occurs, this display the full stack tree with args, methods, ...

You also can store the output of debug_backtrace() in a var and handle it by yourself.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.