This documentation refers to an older version of CiviCRM (3.4 / 4.0). The current stable version is 4.1. Please introduce all documentation changes and new material here.

Skip to end of metadata
Go to start of metadata
This page refers to CiviCRM 3.4 and 4.0, current STABLE version.

Documentation Search


CiviCRM 3.4 and 4.0 Documentation

Support and Participation

Developer Resources


CiviCRM books!

Make sure to check out the FLOSS Manual Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Importing LARGE quantities of data.

If you have trouble importing large data files, try the following.

  1. This setting relates to the file size limitation (how big a file you can import) — change the CIVICRM_MAX_IMPORT_FILESIZE value in sites/default/civicrm.settings.php to something like 8388600.
  2. There is also some overhead in PHP to consider and PHP will only wait for a specified time before timing out. Setting the max_execution_time will help extend the time period that PHP will wait before timing out.

The appendix below indicates the php.ini settings and where/how they can be overridden. Some can be overridden in the .htaccess file or some settings can be set in other ways (php.ini, httpd.conf or .htaccess, etc.). Most shared hosts do not allow individuals to make changes to php.ini or httpd.conf files.

That being said however, the php execution limit can be overridden in the .htaccess file which is located at the root of your CiviCRM site. I modified mine to the following and it worked and thus, my large imports worked. I hope this is useful.

Add the max_execution_time setting to the .htaccess file at the site root — a complete example is below. 360 is in seconds so, in this case, PHP would wait for 6 minutes before timing out. Up it as you feel it's needed for your case.

php_value magic_quotes_gpc 0
php_value max_execution_time 360
php_value register_globals 0
php_value session.auto_start 0

http://us3.php.net/manual/en/ini.php#ini.list

PHP_INI_USER 1 Entry can be set in user scripts or in Windows registry
PHP_INI_PERDIR 2 Entry can be set in php.ini, .htaccess or httpd.conf
PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf
PHP_INI_ALL 7 Entry can be set anywhere

Also see http://drupal.org/node/29268 .

Labels
  • None