echothrust/echofish

Error 500 with Resolve hosts

Closed this issue · 8 comments

Hello

When I click " Resolve Hosts" in the "Manage Hosts" menu.

erre500

A 500 error occurs
"WebUser and its behaviors do not have a method or closure named "addFlash".

What can I do?

Thanks

Running into the same issue. Any updates on what's going on?

@Artanicus It should be fixed in the latest master, can you give it a try?

With latest HEAD the error is slightly different:
Error 500
Only variables should be passed by reference

@Artanicus Please provide more details about your setup. Feel free to add any details you think may be relevant, but make sure you include:

  • Database server and version (mysql -V)
  • PHP version
  • Host(s) operating system and version
  • mysql Ver 15.1 Distrib 10.0.29-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
  • PHP 7.0.13-0ubuntu0.16.04.1
  • Ubuntu 16.04

Reproducing the setup, I get the same error. Here is the stack trace:

2017/02/07 10:00:41 [error] [php] Only variables should be passed by reference (/var/www/echofish.git/htdocs/protected/models/Host.php:162)
Stack trace:
#0 /var/www/echofish.git/yii/framework/yiilite.php(3652): CInlineAction->runWithParams()
#1 /var/www/echofish.git/yii/framework/yiilite.php(6895): HostController->runAction()
#2 /var/www/echofish.git/yii/framework/yiilite.php(6904): CFilterChain->run()
#3 /var/www/echofish.git/yii/framework/yiilite.php(4030): CAccessControlFilter->filter()
#4 /var/www/echofish.git/yii/framework/yiilite.php(6937): HostController->filterAccessControl()
#5 /var/www/echofish.git/yii/framework/yiilite.php(6892): CInlineFilter->filter()
#6 /var/www/echofish.git/yii/framework/yiilite.php(3642): CFilterChain->run()
#7 /var/www/echofish.git/yii/framework/yiilite.php(3627): HostController->runActionWithFilters()
#8 /var/www/echofish.git/yii/framework/yiilite.php(1761): HostController->run()
#9 /var/www/echofish.git/yii/framework/yiilite.php(1681): CWebApplication->runController()
#10 /var/www/echofish.git/yii/framework/yiilite.php(1202): CWebApplication->processRequest()
#11 /var/www/echofish.git/htdocs/index.php(13): CWebApplication->run()
REQUEST_URI=/echofish/index.php?r=settings/host/resolve_all
in /var/www/echofish.git/htdocs/protected/models/Host.php (162)
in /var/www/echofish.git/htdocs/protected/modules/settings/controllers/HostController.php (174)
in /var/www/echofish.git/htdocs/index.php (13)

It has to do with new features in version 7.0 of php. I was able to mitigate the problem by breaking line 162 of models/Host.php:

-                                       $this->short=array_shift(explode('.',$this->fqdn));
+                                       $fqdn_parts=explode('.',$this->fqdn);
+                                       $this->short=array_shift($fqdn_parts);

@Artanicus Pull the latest master, it should work for your setup now.

Single host resolving now works, but the issue continues for resolving all. I split this out into a new bug since it's clearly php7 specific: #52