[Eisfair] [E1 4.9.210-eisfair-64-VIRT] NextCloud einrichten

Marcus Röckrath marcus.roeckrath at gmx.de
Sa Okt 23 09:52:25 CEST 2021


Hallo Jürgen,

Juergen Edner wrote:

>>>> Activate configuration now (y/n) [yes]? y
>>>> nextcloud version (eisfair-64): 1.12.2
>>>> Database type  : mysql (mysql)
>>>> Database server: localhost:3306
>>>> Trusted domain(s): ---->Gelöscht<-----
>>>> Apache2 SSL support: enabled
>>>> MySQL PHP7-WEB support: enabled
>>>> MySQL PHP7-CLI support: enabled
>>>> MySQL support: Mail support: enabled
>>>> PHP7-WEB APC cache: enabled
>>>> PHP7-WEB Redis cache: enabled
>>>> PHP7-CLI APC cache: enabled
>>>> PHP7-CLI Redis cache: enabled
>>>> Redis support: enabled
>>>> PHP7-WEB memory limit: >= 512M
>>>> PHP7-CLI memory limit: >= 512M
>>>> PHP7-CLI configuration access: possible

Nachdem ich versucht habe, das Skript nextcloud.sh nachzuvollziehen,
verstehe ich nicht, wieso die nachfolgende Meldung erscheint, obwohl
scheinbar bis dahin kein Fehler festgestellt wurde, und die nachfolgenden
Test bis zu Meldung auch ohne Befund scheinen, denn es erscheint nach Check
des Zugriff auf die CLI Konfiguration keine weitere Meldung:

if ! check_php_cli_config_access
then
   config_error=1
fi

Hier wird also config_eror nicht auf 1 gesetzt? Kann der schon vor diesem
Test auf 1 gesetzt worden sein, wenn (s. o.) alles korrekt erscheint?

Nun folgen weitere Tests:

# get list of loaded php modules
php_webmodules=`get_loaded_php_modules 'web'`
php_climodules=`get_loaded_php_modules 'cli'`

if [ -z "${php_webmodules}" ]
then
  if [ "${php_package}" = 'php7-fpm' ]
  then
    myecho --pack ${module_name} --error "PHP7FPM-WEB module test failure,
make sure that the web server/fpm is running!"
  else
    myecho --pack ${module_name} --error "PHP${php_major_version}-WEB module
test failure, make sure that the web server is running!"
  fi
  config_error=1
fi

Dieser kann laut obigem Output auch nicht zu config_error = 1 führen, da
sonst eine Ausgabe hätte erfolgen müssen, gleiches gilt IMHO für die
nachfolgenden Tests; mit setzen von config_error=1 müsste gleichzeitig eine
Fehlerausgabe erfolgen.

if [ -z "${php_climodules}" ]
then
  myecho --pack ${module_name} --error "PHP${php_major_version}-CLI module
test failure, make sure that the cli program exists!"
  config_error=1
fi
[...]
for PHP_MOD in imagick intl opcache pcntl
do
  if ! is_php_module_loaded "${PHP_MOD}" "${php_webmodules}"
  then
     print_php_module_status 'web' "${PHP_MOD}"
     config_error=1
  fi
  if ! is_php_module_loaded "${PHP_MOD}" "${php_climodules}"
  then
    print_php_module_status 'cli' "${PHP_MOD}"
    config_error=1
  fi
done

Und nun wird config_error ausgewertet:

if [ ${config_error} -eq 1 ]
then
  myecho --pack ${module_name} --error "PHP pre-requisites not met, fix it
and re-run configuration!"
  exit 1
fi

Mir ist irgendwie schleierhaft, wie config_error auf 1 gesetzt wird, ohne
das man eine spezifische Fehlermeldung kommt, die laut meinem Verständnis
des Codes aber kommen sollte.

-- 
Gruß Marcus
[eisfair-Team]


Mehr Informationen über die Mailingliste Eisfair