esas_nefret Posted September 20, 2011 Share Posted September 20, 2011 Hi all, When I run the script from browser, it loads fine but when I want it to run from cronjob, it gives memory exhausted error each time cron runs. What do you think about this? What are your solutions? Here is the error: "Allowed memory size of 67108864 bytes exhausted (tried to allocate 5307694 bytes) in ...." Here are the server limits: max_execution_time = 7200 max_input_time = 600 memory_limit = 1024M Thanks. Link to comment https://forums.phpfreaks.com/topic/247492-php-memory-and-cron-job-problem/ Share on other sites More sharing options...
trq Posted September 20, 2011 Share Posted September 20, 2011 PHP's cli uses a different php.ini to that of mod_php. Are you sure your looking at the correct config directives? Link to comment https://forums.phpfreaks.com/topic/247492-php-memory-and-cron-job-problem/#findComment-1270917 Share on other sites More sharing options...
esas_nefret Posted September 20, 2011 Author Share Posted September 20, 2011 Thanks for reply. I didnt hear that before. Im looking into and updating limits in user's php.ini file in public_html/user directory. So, where can I find the php.ini that you say? In which directory? Link to comment https://forums.phpfreaks.com/topic/247492-php-memory-and-cron-job-problem/#findComment-1270924 Share on other sites More sharing options...
esas_nefret Posted September 20, 2011 Author Share Posted September 20, 2011 Hi again, Ive changed default php.ini and runs perfect. Thanks for idea! Link to comment https://forums.phpfreaks.com/topic/247492-php-memory-and-cron-job-problem/#findComment-1270932 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.