Ad Widget

Collapse

Zabbix 5.0 LTS install on Raspberry Pi Web GUI issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ct9918
    Junior Member
    • Jan 2021
    • 2

    #1

    Zabbix 5.0 LTS install on Raspberry Pi Web GUI issue

    I have just installed Zabbix on my Raspberry Pi running Raspbian 10 Buster following the guide linked here: https://bestmonitoringtools.com/how-.../#llc_comments

    However when I go to load into the web gui I do not get a gui at all. Instead the page simply reads out what appears to be php code in plain text (See pasted text below). I have checked that all the required php dependencies are installed but I am not to sure what else to try. I have googled and also tried to search this forum for a solution but I haven't found one so far.

    Anyone have any ideas for me? Let me know if you want an additional info.

    Cheers!


    <?php /* ** Zabbix ** Copyright (C) 2001-2021 Zabbix SIA ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ require_once dirname(__FILE__).'/include/classes/user/CWebUser.php'; CWebUser::disableSessionCookie(); require_once dirname(__FILE__).'/include/config.inc.php'; require_once dirname(__FILE__).'/include/forms.inc.php'; $page['title'] = _('ZABBIX'); $page['file'] = 'index.php'; // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields = [ 'name' => [T_ZBX_STR, O_NO, null, null, 'isset({enter}) && {enter} != "'.ZBX_GUEST_USER.'"', _('Username')], 'password' => [T_ZBX_STR, O_OPT, null, null, 'isset({enter}) && {enter} != "'.ZBX_GUEST_USER.'"'], 'sessionid' => [T_ZBX_STR, O_OPT, null, null, null], 'reconnect' => [T_ZBX_INT, O_OPT, P_SYS, null, null], 'enter' => [T_ZBX_STR, O_OPT, P_SYS, null, null], 'autologin' => [T_ZBX_INT, O_OPT, null, null, null], 'request' => [T_ZBX_STR, O_OPT, null, null, null], 'form' => [T_ZBX_STR, O_OPT, null, null, null] ]; check_fields($fields); $config = select_config(); if (hasRequest('reconnect') && CWebUser::isLoggedIn()) { if ($config['saml_auth_enabled'] == ZBX_AUTH_SAML_ENABLED && $config['saml_slo_url'] !== '' && CSession::keyExists('saml_data')) { redirect('index_sso.php?slo'); } CWebUser::logout(); redirect('index.php'); } $autologin = hasRequest('enter') ? getRequest('autologin', 0) : getRequest('autologin', 1); $request = getRequest('request', ''); if ($request) { $test_request = []; preg_match('/^\/?(?<filename>[a-z0-9\_\.]+\.php)(?<request>\?.*)?$/i', $request, $test_request); $request = (array_key_exists('filename', $test_request) && file_exists('./'.$test_request['filename'])) ? $test_request['filename'].(array_key_exists('request', $test_request) ? $test_request['request'] : '') : ''; } if (!hasRequest('form') && $config['http_auth_enabled'] == ZBX_AUTH_HTTP_ENABLED && $config['http_login_form'] == ZBX_AUTH_FORM_HTTP && !hasRequest('enter')) { redirect('index_http.php'); exit; } // login via form if (hasRequest('enter') && CWebUser::login(getRequest('name', ZBX_GUEST_USER), getRequest('password', ''))) { if (CWebUser::$data['autologin'] != $autologin) { API::User()->update([ 'userid' => CWebUser::$data['userid'], 'autologin' => $autologin ]); } $redirect = array_filter([CWebUser::isGuest() ? '' : $request, CWebUser::$data['url'], ZBX_DEFAULT_URL]); redirect(reset($redirect)); exit; } if (CWebUser::isLoggedIn() && !CWebUser::isGuest()) { redirect(CWebUser::$data['url'] ? CWebUser::$data['url'] : ZBX_DEFAULT_URL); } $messages = clear_messages(); echo (new CView('general.login', [ 'http_login_url' => ($config['http_auth_enabled'] == ZBX_AUTH_HTTP_ENABLED) ? (new CUrl('index_http.php'))->setArgument('request', getRequest('request')) : '', 'saml_login_url' => ($config['saml_auth_enabled'] == ZBX_AUTH_SAML_ENABLED) ? (new CUrl('index_sso.php'))->setArgument('request', getRequest('request')) : '', 'guest_login_url' => CWebUser::isGuestAllowed() ? (new CUrl())->setArgument('enter', ZBX_GUEST_USER) : '', 'autologin' => $autologin == 1, 'error' => (hasRequest('enter') && $messages) ? array_pop($messages) : null ]))->getOutput();








  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    It seems that Apache HTTP Server and PHP are not linked. If each package is installed successfully, try restarting Apache.

    Code:
    # systemctl restart apache2

    Comment

    • ct9918
      Junior Member
      • Jan 2021
      • 2

      #3
      Thanks the reply Atsushi, I should have also stated I have tried this already and reboot the entire system post install.

      Comment

      Working...