Error 500 with Resolve hosts
Closed this issue · 8 comments
Koubiacz commented
jinnatar commented
Running into the same issue. Any updates on what's going on?
gadamo commented
@Artanicus It should be fixed in the latest master, can you give it a try?
jinnatar commented
With latest HEAD the error is slightly different:
Error 500
Only variables should be passed by reference
gadamo commented
@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
jinnatar commented
- 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
gadamo commented
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);
gadamo commented
@Artanicus Pull the latest master, it should work for your setup now.