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

Hi s2smedia,

Are you're trying to export a lot of records in one go? I think the issue is that CMSB is running out of memory while attempting the export. The easiest way to resolve the problem is to increase the amount of memory CMSB is allowed to use from 128MB to 512MB. You can do this by changing line 172 of lib/init.php to this:

  umask(0);                             // use default permission on created files
  ini_set('open_basedir', null);        // PHP 5.3+ disable open_basedir restrictions (we also set this with php.ini for earlier php versions)
  if (!ini_get('suhosin.memory_limit')) { // don't increase memory if suhosin doesn't allow it (or script will die): http://www.hardened-php.net/suhosin/configuration.html#suhosin.memory_limit
    ini_set('memory_limit', '512M');            // raise memory limit (if allowed)
  }
  ini_set('magic_quotes_runtime', 0);   // disable magic_quotes_runtime (backslashes quotes in input)

This involves making a change to a core CMSB file, so ensure you've made a full backup of the site first, and you'll have to reimplement the change if you upgrade CMSB.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

now I get this error:

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