ini_set('max_execution_time',0);
ini_set('memory_limit','1000M');
These are the first two lines at the very top of my script.
I was under the impression if I ran something via cron memory limits didn’t apply, but I was wrong. Safe mode is off and when I test to see if these values are being set they are but I keep getting the good ol’ “PHP Fatal: Memory exhausted” error.
Any ideas what I may be doing wrong? And whats the “more elegant way” of writing “infinite” for the “memory limit” value is it -1 or something?
3
Answers
Changed memory limit to -1 instead of '1000M' now everything works perfectly.
possible that suhosin is running on your Server? If yes, you have to set the “suhosin.memory_limit” inside your php.ini.
Suhosin does now allow to allocate more memory, even if safemode is off.
You can’t use non-numeric values (“M”, “K”) outside php.ini proper. Setting
10000000
would probably work.