bareos-webui Ubuntu 22.04 php script showed instead of login page

144 views
Skip to first unread message

Birgit Ducarroz

unread,
Feb 8, 2023, 9:02:40 AM2/8/23
to bareos-users
Hi,

I just installed a brand new Ubuntu 22.04 with the latest Bareos Version and the webui.
Depending my browser, It shows this:

. * */ if(isset($_SERVER['APPLICATION_ENV']) && $_SERVER['APPLICATION_ENV'] == 'development') { error_reporting(E_ALL); ini_set("display_errors", 1); define('REQUEST_MICROTIME', microtime(true)); } /** * This makes our life easier when dealing with paths. Everything is relative * to the application root now. */ chdir(dirname(__DIR__)); // Decline static file requests back to the PHP built-in webserver if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { return false; } // Setup autoloading require 'init_autoloader.php'; // Run the application! Zend\Mvc\Application::init(require 'config/application.config.php')->run();

or this:

<?php /** * * bareos-webui - Bareos Web-Frontend * * @link https://github.com/bareos/bareos for the canonical source repository * @copyright Copyright (c) 2013-2019 Bareos GmbH & Co. KG (http://www.bareos.org/) * @license GNU Affero General Public License (http://www.gnu.org/licenses/) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ if(isset($_SERVER['APPLICATION_ENV']) && $_SERVER['APPLICATION_ENV'] == 'development') { error_reporting(E_ALL); ini_set("display_errors", 1); define('REQUEST_MICROTIME', microtime(true)); } /** * This makes our life easier when dealing with paths. Everything is relative * to the application root now. */ chdir(dirname(__DIR__)); // Decline static file requests back to the PHP built-in webserver if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { return false; } // Setup autoloading require 'init_autoloader.php'; // Run the application! Zend\Mvc\Application::init(require 'config/application.config.php')->run();

Can someone please help me?
Thank you a lot!

Bruno Friedmann

unread,
Feb 9, 2023, 10:09:25 AM2/9/23
to bareos-users
Look like your webserver didn't interprete php code and simply return them as text page.

You need to check if you have activated the fcgid mod be sure also to have the following instruction set inside this module

After that a restart of php-fpm and webserver should work.

DUCARROZ Birgit

unread,
Feb 10, 2023, 8:40:10 AM2/10/23
to bareos...@googlegroups.com, Michael Höner
HejHej,

Thanks to Bruno Friedman! Your hint (and some Swiss chocolate) helped me :-)

So for the Ubuntu 22.04 LTS installation I just needed to execute the
following commands and now it works like a charm!

sudo apt install php
sudo apt install libapache2-mod-php
sudo systemctl restart apache2

Have a nice week-end.

Greetings,
Birgit



On 10.02.23 12:29, Michael Höner wrote:
> Hello Birgit i have the same problem and i think it is the missing
> zendframework only i cant get it installed on my debian 10. Have you
> already solved your problem? Greetings Michael Birgit Ducarroz schrieb
> am Mittwoch, 8. Februar 2023 um 15: 02: 40
>
> Hello Birgit
> i have the same problem and i think it is the missing zendframework only
> i cant get it installed on my debian 10.
> Have you already solved your problem?
>
> Greetings Michael
>
>
> Birgit Ducarroz schrieb am Mittwoch, 8. Februar 2023 um 15:02:40 UTC+1:
> Hi,
>
> I just installed a brand new Ubuntu 22.04 with the latest Bareos Version
> and the webui.
> Depending my browser, It shows this:
>
> . * */ if(isset($_SERVER['APPLICATION_ENV']) &&
> $_SERVER['APPLICATION_ENV'] == 'development') { error_reporting(E_ALL);
> ini_set("display_errors", 1); define('REQUEST_MICROTIME',
> microtime(true)); } /** * This makes our life easier when dealing with
> paths. Everything is relative * to the application root now. */
> chdir(dirname(__DIR__)); // Decline static file requests back to the PHP
> built-in webserver if (php_sapi_name() === 'cli-server' &&
> is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
> return false; } // Setup autoloading require 'init_autoloader.php'; //
> Run the application! Zend\Mvc\Application::init(require
> 'config/application.config.php')->run();
>
> or this:
>
> <?php /** * * bareos-webui - Bareos Web-Frontend * * @link
> https://github.com/bareos/bareos
> <https://urldefense.com/v3/__https://github.com/bareos/bareos__;!!Dc8iu7o!wwW_wi59i3pQPjWHAsfsjcDTVF-g__8CsuM6K7N9W0xAkpW2LlKQ99-kQQq-Qmt68eOzJ5ZO3KMAu2fQhF80vEQBaEh1$> for the canonical source repository * @copyright Copyright (c) 2013-2019 Bareos GmbH & Co. KG (http://www.bareos.org/ <https://urldefense.com/v3/__http://www.bareos.org/__;!!Dc8iu7o!wwW_wi59i3pQPjWHAsfsjcDTVF-g__8CsuM6K7N9W0xAkpW2LlKQ99-kQQq-Qmt68eOzJ5ZO3KMAu2fQhF80vGsN2VuL$>) * @license GNU Affero General Public License (http://www.gnu.org/licenses/ <https://urldefense.com/v3/__http://www.gnu.org/licenses/__;!!Dc8iu7o!wwW_wi59i3pQPjWHAsfsjcDTVF-g__8CsuM6K7N9W0xAkpW2LlKQ99-kQQq-Qmt68eOzJ5ZO3KMAu2fQhF80vLyLc2GC$>) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/ <https://urldefense.com/v3/__http://www.gnu.org/licenses/__;!!Dc8iu7o!wwW_wi59i3pQPjWHAsfsjcDTVF-g__8CsuM6K7N9W0xAkpW2LlKQ99-kQQq-Qmt68eOzJ5ZO3KMAu2fQhF80vLyLc2GC$>>. * */ if(isset($_SERVER['APPLICATION_ENV']) && $_SERVER['APPLICATION_ENV'] == 'development') { error_reporting(E_ALL); ini_set("display_errors", 1); define('REQUEST_MICROTIME', microtime(true)); } /** * This makes our life easier when dealing with paths. Everything is relative * to the application root now. */ chdir(dirname(__DIR__)); // Decline static file requests back to the PHP built-in webserver if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { return false; } // Setup autoloading require 'init_autoloader.php'; // Run the application! Zend\Mvc\Application::init(require 'config/application.config.php')->run();
OpenPGP_0xD86E168D606536D7.asc
OpenPGP_signature

Bruno Friedmann

unread,
Feb 13, 2023, 10:17:04 AM2/13/23
to bareos-users
The abnormal things here is that you need to install manually php, which should have been required by the php-fpm package.
You don't have to use anymore  libapache2-mod-php (was the old fashion way).

Reply all
Reply to author
Forward
0 new messages