CSV Export Fatal error

I tried exporting from CMS and now get this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in XXXXXXXXX/viewer_functions.php on line 430

now I get this error:

Fatal error: Maximum execution time of 30 seconds exceeded in XXXXXXXXX/csvExport.php on line 0

By Dave - September 22, 2015

Hi s2smedia, 

Basically you're hitting the memory and time limits that your server allows.  Without modifying the code, one option would be to export fewer records at a time, perhaps by using the search fields to export all records that matched one criteria and then another export for records matching remaining criteria (eg: active vs archived users).  

Depending on the server configuration, sometimes you can bypass some of the limits.  If you want to try bypassing the max execution time you can add this to the plugin (csvExport.php) before the line that says "DON'T UPDATE ANYTHING BELOW THIS LINE": 

// DON'T UPDATE ANYTHING BELOW THIS LINE

set_time_limit(60*2); // allow up to 2 minutes of execute time

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com