Error installing any module I have an error in my Drupal 7 site when I try to install any module. 

If I try the Install from a URL I get:


  HTTP error 0 occurred when trying to fetch http://ftp.drupal.org/files/projects/google_analytics-7.x-1.3.tar.gz.
  
  Unable to retrieve Drupal project from http://ftp.drupal.org/files/projects/google_analytics-7.x-1.3.tar.gz.


If I try Upload a module or theme archive to install I get:


  An AJAX HTTP request terminated abnormally. Debugging information follows. Path: StatusText: ResponseText: ReadyState: 4


The error page shows me:


  Notice: Undefined index: log in update_authorize_install_batch_finished() (line 235 of V:\www\site\modules\update\update.authorize.inc).
  Warning: Invalid argument supplied for foreach() in update_authorize_install_batch_finished() (line 235 of V:\www\site\modules\update\update.authorize.inc).
  Notice: Undefined index: log in update_authorize_install_batch_finished() (line 276 of V:\www\site\modules\update\update.authorize.inc).
  Notice: Undefined index: tasks in update_authorize_install_batch_finished() (line 277 of V:\www\site\modules\update\update.authorize.inc).
  Installation failed! See the log below for more information.


Any ideas on how I can troubleshoot this?
This looks like a ownership / permissions problem on a Linux server. Make sure to set the ownership of the drupal root folder and underlying files to the webserver's user (like 'apache', for example).

Also, make sure that the "temporary" and the "private" folders are setup correctly and with the right permissions (if in doubt, just test with 777 - don't forget to lower them to your requirements afterwards).