Q:

CodeIgniter Stacl Trace

I want to log the stack trace from time to time in my application folder.
writing to the log the result of debug_backtrace() , will cause to:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11639862 bytes) in /var/www/trunk/api.subdomain.com/libraries/MY_Log.php on line 13

because of the MVC structure, how can i get the last 10 functions calls/stack.
Thanks

A:

Try to change the memory_limit settings of your php.ini.
If you are using some hosting services and you don't have access to the php.ini, you can still change those settings using some .htaccess file and the php_value directive or ini_set function. 
.htaccess example: 
php_value memory_limit 16M

