ExportJob.php failed because of Undefined index: SERVER_NAME

Issue #392 new
Jan Záruba
created an issue

I am getting this error [error] [php] Undefined index: SERVER_NAME (/opt/zurmo/3.1.2 /yii/framework/web/CHttpRequest.php:305) when trying to export large set of data. I remember I had exactly the same problem in version 3.0.5 whe trying to run a job from user interface

Steps to reproduce:

  1. Import at least 1000 Accounts (attaching csv with random account names)

  2. Go to Accounts

  3. Export All --> All Results

  4. You should get message "large amount of data requested..."

  5. See stacktrace in application.log


as described here you have to add at the end of app/protected/config/console.php line: $common_config['components']['request']['hostInfo'] = 'https://hostname';

Attaching the stacktrace

Comments (5)

  1. Jan Záruba reporter

    Another workaround is to create customConsole.php in app/protected/config containing: <?php $common_config['components']['request']['hostInfo'] = 'http://servername; $common_config['components']['request']['scriptUrl'] = '/zurmo/app/index.php'; return $common_config; ?>

    The fix should be following two lines $common_config['components']['request']['hostInfo'] = 'http://servername; $common_config['components']['request']['scriptUrl'] = '/zurmo/app/index.php';

    should be added by installer to app/protected/config/console.php

  2. Log in to comment