Jump to content


Photo

PHP Error[8]: Undefined index: SERVER_NAME


  • Please log in to reply
10 replies to this topic

#1 julienym

julienym

    Member

  • Members
  • PipPip
  • 22 posts

Posted 25 April 2013 - 10:48 PM

Hi !
Just restored a backup on bitnami, I guess my server_name was changed, or need to change, but can't find out where...
 
Here is my cron monitor job error:
 
PHP Error[8]: Undefined index: SERVER_NAME
    in file /opt/bitnami/apps/zurmo/htdocs/yii/framework/web/CHttpRequest.php at line 305
#0 /opt/bitnami/apps/zurmo/htdocs/app/protected/core/components/ConsoleApplication.php(142): CHttpRequest->getHostInfo()
#1 /opt/bitnami/apps/zurmo/htdocs/app/protected/modules/jobsManager/jobs/MonitorJob.php(89): ConsoleApplication->createAbsoluteUrl()
#2 /opt/bitnami/apps/zurmo/htdocs/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(103): MonitorJob->run()
#3 /opt/bitnami/apps/zurmo/htdocs/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(69): runMonitorJob()
#4 /opt/bitnami/apps/zurmo/htdocs/app/protected/commands/JobManagerCommand.php(119): runFromJobManagerCommand()
#5 /opt/bitnami/apps/zurmo/htdocs/yii/framework/console/CConsoleCommandRunner.php(67): JobManagerCommand->run()
#6 /opt/bitnami/apps/zurmo/htdocs/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run()
#7 /opt/bitnami/apps/zurmo/htdocs/yii/framework/base/CApplication.php(169): ConsoleApplication->processRequest()
#8 /opt/bitnami/apps/zurmo/htdocs/app/protected/commands/bootstrap.php(60): ConsoleApplication->run()
#9 /opt/bitnami/apps/zurmo/htdocs/app/protected/commands/zurmoc.php(38): require_once()
#10 /opt/bitnami/apps/zurmo/htdocs/app/protected/commands/zurmoc(4): require_once()


#2 julienym

julienym

    Member

  • Members
  • PipPip
  • 22 posts

Posted 25 April 2013 - 10:57 PM

Just resetted memcache and its fine !

 

telnet localhost 11211
flush_all
quit


#3 julienym

julienym

    Member

  • Members
  • PipPip
  • 22 posts

Posted 25 April 2013 - 10:58 PM

nope actually it was stuck, but same problem...



#4 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 26 April 2013 - 12:36 AM

We can provide a hosted instance if you are having issues with Bitnami: http://zurmo.com/free-trial. We will give them the upgrade script to 1.5 so maybe that will resolve your issue.


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#5 julienym

julienym

    Member

  • Members
  • PipPip
  • 22 posts

Posted 26 April 2013 - 01:30 AM

Already at 1.5.13...

Is this a support forum for paid account only ? Really appreciate your offer, but can't afford that now...



#6 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 26 April 2013 - 02:48 AM

Just to confirm, you started on 1.5.13 and did NOT upgrade from a previous version, correct? We have had so many people trying to upgrade without the script and I want to confirm this is not the case.

We offer hosted trials for people that want to test Zurmo without having to deal with installation. The trial is free. There are also paid versions that include hosting, support, and certain integrations. These forums are for everyone and we do our best to assist with different questions and issues. We have Developer Sessions every Tuesday at 10:00AM Chicago Time (http://zurmo.org/for...arning-session/). You can always join an upcoming session and ask any questions to our technical team (including installation questions).


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#7 Lithreal

Lithreal

    Member

  • Members
  • PipPip
  • 19 posts

Posted 12 September 2013 - 06:13 PM

I am getting this same error with a fresh install of 2.2.1 using bitnami. Was there any update on how to resolve this? It is causing the Monitor Cron to constantly get stuck.

 

PHP Error[8]: Undefined index: SERVER_NAME
    in file C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\yii\framework\web\CHttpRe
quest.php at line 305
#0 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\core\components\Cons
oleApplication.php(178): ZurmoHttpRequest->getHostInfo()
#1 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\modules\jobsManager\
jobs\MonitorJob.php(96): ConsoleApplication->createAbsoluteUrl()
#2 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\modules\jobsManager\
utils\JobsManagerUtil.php(108): MonitorJob->run()
#3 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\modules\jobsManager\
utils\JobsManagerUtil.php(74): runMonitorJob()
#4 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\commands\JobManagerC
ommand.php(119): runFromJobManagerCommandOrBrowser()
#5 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\yii\framework\console\CConsoleComm
andRunner.php(67): JobManagerCommand->run()
#6 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\yii\framework\console\CConsoleAppl
ication.php(91): CConsoleCommandRunner->run()
#7 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\yii\framework\base\CApplication.ph
p(169): ConsoleApplication->processRequest()
#8 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\commands\bootstrap.p
hp(60): ConsoleApplication->run()
#9 C:\BitNami\zurmo-2.2.1-0\apps\zurmo\htdocs\app\protected\commands\zurmoc.php(
38): require_once()



#8 Lithreal

Lithreal

    Member

  • Members
  • PipPip
  • 19 posts

Posted 13 September 2013 - 02:44 PM

I solved this error by uncommenting the hostinfo line 56 of the phpperinstance file, in case anyone runs into this in the future.



#9 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 13 September 2013 - 06:41 PM

I solved this error by uncommenting the hostinfo line 56 of the phpperinstance file, in case anyone runs into this in the future.

Excellent, thank you for sharing the solution.


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#10 BHruska

BHruska

    Member

  • Members
  • PipPip
  • 26 posts

Posted 31 December 2014 - 07:48 PM

I am having this issue trying to run marketing campaigns.  The perinstance.php file has that line correctly identifying my host.  

 

    $instanceConfig['components']['request']['hostInfo']         = 'http://zurmo.instylesuites.com';
 

Here's my application log:

 

2014/12/21 18:30:06 [error] [php] Undefined index: SERVER_NAME (/var/www/zurmo/yii/framework/web/CHttpRequest.php:305)
Stack trace:
#0 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(149): MonitorJob->run()
#1 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(106): runMonitorJob()
#2 /var/www/zurmo/app/protected/commands/JobManagerCommand.php(120): runFromJobManagerCommandOrBrowser()
#3 /var/www/zurmo/yii/framework/console/CConsoleCommandRunner.php(67): JobManagerCommand->run()
#4 /var/www/zurmo/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run()
#5 /var/www/zurmo/yii/framework/base/CApplication.php(169): ConsoleApplication->processRequest()
#6 /var/www/zurmo/app/protected/commands/bootstrap.php(64): ConsoleApplication->run()
#7 /var/www/zurmo/app/protected/commands/zurmoc.php(38): require_once()
#8 /var/www/zurmo/app/protected/commands/zurmoc(4): require_once()
 
2014/12/29 15:20:06 [error] [php] Undefined index: SERVER_NAME (/var/www/zurmo/yii/framework/web/CHttpRequest.php:305)
Stack trace:
#0 /var/www/zurmo/app/protected/modules/marketing/utils/GlobalMarketingFooterUtil.php(248): resolveAbsoluteUrlWithHashAndPreviewForFooter()
#1 /var/www/zurmo/app/protected/modules/marketing/utils/GlobalMarketingFooterUtil.php(121): resolveUnsubscribeUrl()
#2 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/SpecialMergeTagsAdapter.php(196): resolveUnsubscribeUrlByArray()
#3 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/SpecialMergeTagsAdapter.php(182): resolveGlobalMarketingFooterUrl()
#4 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/SpecialMergeTagsAdapter.php(72): resolveUnsubscribeUrl()
#5 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/MergeTagsToModelAttributesAdapter.php(107): resolve()
#6 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/MergeTagsToModelAttributesAdapter.php(65): resolveMergeTagToStandardOrRelatedAttribute()
#7 /var/www/zurmo/app/protected/modules/emailTemplates/utils/MergeTagsUtil.php(123): resolveMergeTagsArrayToAttributesFromModel()
#8 /var/www/zurmo/app/protected/modules/emailTemplates/utils/MergeTagsUtil.php(144): ContactMergeTagsUtil->resolveMergeTagsArrayToAttributes()
#9 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(217): ContactMergeTagsUtil->resolveMergeTags()
#10 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(169): resolveMergeTags()
#11 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(162): resolveContentForMergeTags()
#12 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(153): resolveContentsForMergeTags()
#13 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(90): resolveContent()
#14 /var/www/zurmo/app/protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php(131): processDueItem()
#15 /var/www/zurmo/app/protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php(91): CampaignQueueMessagesInOutboxJob->processCampaignItemInQueue()
#16 /var/www/zurmo/app/protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php(61): CampaignQueueMessagesInOutboxJob->processRun()
#17 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(205): CampaignQueueMessagesInOutboxJob->run()
#18 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(110): runNonMonitorJob()
#19 /var/www/zurmo/app/protected/commands/JobManagerCommand.php(120): runFromJobManagerCommandOrBrowser()
#20 /var/www/zurmo/yii/framework/console/CConsoleCommandRunner.php(67): JobManagerCommand->run()
#21 /var/www/zurmo/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run()
#22 /var/www/zurmo/yii/framework/base/CApplication.php(169): ConsoleApplication->processRequest()
#23 /var/www/zurmo/app/protected/commands/bootstrap.php(64): ConsoleApplication->run()
#24 /var/www/zurmo/app/protected/commands/zurmoc.php(38): require_once()
#25 /var/www/zurmo/app/protected/commands/zurmoc(4): require_once()
 
2014/12/30 09:20:05 [error] [php] Undefined index: SERVER_NAME (/var/www/zurmo/yii/framework/web/CHttpRequest.php:305)
Stack trace:
#0 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(149): MonitorJob->run()
#1 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(106): runMonitorJob()
#2 /var/www/zurmo/app/protected/commands/JobManagerCommand.php(120): runFromJobManagerCommandOrBrowser()
#3 /var/www/zurmo/yii/framework/console/CConsoleCommandRunner.php(67): JobManagerCommand->run()
#4 /var/www/zurmo/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run()
#5 /var/www/zurmo/yii/framework/base/CApplication.php(169): ConsoleApplication->processRequest()
#6 /var/www/zurmo/app/protected/commands/bootstrap.php(64): ConsoleApplication->run()
#7 /var/www/zurmo/app/protected/commands/zurmoc.php(38): require_once()
#8 /var/www/zurmo/app/protected/commands/zurmoc(4): require_once()
 
2014/12/30 09:20:05 [error] [php] Undefined index: SERVER_NAME (/var/www/zurmo/yii/framework/web/CHttpRequest.php:305)
Stack trace:
#0 /var/www/zurmo/app/protected/modules/marketing/utils/GlobalMarketingFooterUtil.php(248): resolveAbsoluteUrlWithHashAndPreviewForFooter()
#1 /var/www/zurmo/app/protected/modules/marketing/utils/GlobalMarketingFooterUtil.php(121): resolveUnsubscribeUrl()
#2 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/SpecialMergeTagsAdapter.php(196): resolveUnsubscribeUrlByArray()
#3 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/SpecialMergeTagsAdapter.php(182): resolveGlobalMarketingFooterUrl()
#4 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/SpecialMergeTagsAdapter.php(72): resolveUnsubscribeUrl()
#5 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/MergeTagsToModelAttributesAdapter.php(107): resolve()
#6 /var/www/zurmo/app/protected/modules/emailTemplates/adapters/MergeTagsToModelAttributesAdapter.php(65): resolveMergeTagToStandardOrRelatedAttribute()
#7 /var/www/zurmo/app/protected/modules/emailTemplates/utils/MergeTagsUtil.php(123): resolveMergeTagsArrayToAttributesFromModel()
#8 /var/www/zurmo/app/protected/modules/emailTemplates/utils/MergeTagsUtil.php(144): ContactMergeTagsUtil->resolveMergeTagsArrayToAttributes()
#9 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(217): ContactMergeTagsUtil->resolveMergeTags()
#10 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(169): resolveMergeTags()
#11 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(162): resolveContentForMergeTags()
#12 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(153): resolveContentsForMergeTags()
#13 /var/www/zurmo/app/protected/modules/autoresponders/utils/AutoresponderAndCampaignItemsUtil.php(90): resolveContent()
#14 /var/www/zurmo/app/protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php(131): processDueItem()
#15 /var/www/zurmo/app/protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php(91): CampaignQueueMessagesInOutboxJob->processCampaignItemInQueue()
#16 /var/www/zurmo/app/protected/modules/campaigns/jobs/CampaignQueueMessagesInOutboxJob.php(61): CampaignQueueMessagesInOutboxJob->processRun()
#17 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(205): CampaignQueueMessagesInOutboxJob->run()
#18 /var/www/zurmo/app/protected/modules/jobsManager/utils/JobsManagerUtil.php(110): runNonMonitorJob()
#19 /var/www/zurmo/app/protected/commands/JobManagerCommand.php(120): runFromJobManagerCommandOrBrowser()
#20 /var/www/zurmo/yii/framework/console/CConsoleCommandRunner.php(67): JobManagerCommand->run()
#21 /var/www/zurmo/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run()
#22 /var/www/zurmo/yii/framework/base/CApplication.php(169): ConsoleApplication->processRequest()
#23 /var/www/zurmo/app/protected/commands/bootstrap.php(64): ConsoleApplication->run()
#24 /var/www/zurmo/app/protected/commands/zurmoc.php(38): require_once()
#25 /var/www/zurmo/app/protected/commands/zurmoc(4): require_once()


#11 BHruska

BHruska

    Member

  • Members
  • PipPip
  • 26 posts

Posted 08 January 2015 - 01:59 PM

I fixed this issue by putting this line at the bottom of console.php:

 

    $common_config['components']['request']['hostInfo']         = 'http://myzurmourl.com';
 
This is similar to this line in perinstance.php:
 
    $instanceConfig['components']['request']['hostInfo']         = 'http://myzurmourl.com';
 
It seems console commands weren't initiating the $_SERVER variable, so yii was freaking out on this line:
 
$this->_hostInfo=$http.'://'.$_SERVER['SERVER_NAME'];
 
Thus giving this error in the log above:
 
2015/01/07 16:20:05 [error] [php] Undefined index: SERVER_NAME (/var/www/zurmo/yii/framework/web/CHttpRequest.php:305)
 
Perhaps the zurmo developers can make changes to avoid this problem in future versions, but in the meantime this might help some of you with the same issue.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users