[development] Using Batch API in hook_install

Lin Clark lin.w.clark at gmail.com
Wed Sep 29 18:44:40 UTC 2010

Hi all,

Is using Batch API from hook_install discouraged?

On installation, my module retrieves 9 files from the Web, parses them, and
enters some information into the database. I wanted to use Batch API to do

It is working in the Web interface, but when I try to enable my module with
Drush, I get the following error
WD php: Warning: Cannot modify header information - headers already sent by

(output started at /drush/includes/drush.inc:797) in
drupal_goto() (line 677 of /drupal-head/includes/common.inc).

I wanted to use Batch API because some people with slower connections might
have timeout problems when retrieving the files and because it is a neat way
to tell the user what is happening.

Is there another way I should be doing this?


Lin Clark
DERI, NUI Galway <http://www.deri.ie/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100929/43690498/attachment.html 

More information about the development mailing list