You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-05-11 17:53:36

wushu4
Member
Registered: 2023-05-11
Posts: 2

erreur lorsque j'essaie d'ouvrir GLPI (avec IP)

Bonjour à tous !
Lorsque j'essaie de me loguer à GLPI, j'ai une erreur (plutot enorme) et je ne sais pas par quoi commencer...
La voici :

. * * --------------------------------------------------------------------- */ // Check PHP version not to have trouble // Need to be the very fist step before any include if ( version_compare(PHP_VERSION, '7.4.0', '<') || version_compare(PHP_VERSION, '8.3.0', '>=') ) { die('PHP 7.4.0 - 8.3.0 (exclusive) required'); } use Glpi\Application\View\TemplateRenderer; use Glpi\Plugin\Hooks; use Glpi\Toolbox\Sanitizer; //Load GLPI constants define('GLPI_ROOT', __DIR__); include(GLPI_ROOT . "/inc/based_config.php"); define('DO_NOT_CHECK_HTTP_REFERER', 1); // If config_db doesn't exist -> start installation if (!file_exists(GLPI_CONFIG_DIR . "/config_db.php")) { if (file_exists(GLPI_ROOT . '/install/install.php')) { Html::redirect("install/install.php"); } else { // Init session (required by header display logic) Session::setPath(); Session::start(); Session::loadLanguage('', false); // Prevent inclusion of debug informations in footer, as they are based on vars that are not initialized here. $_SESSION['glpi_use_mode'] = Session::NORMAL_MODE; // no translation $title_text = 'GLPI seems to not be configured properly.'; $missing_conf_text = sprintf('Database configuration file "%s" is missing.', GLPI_CONFIG_DIR . '/config_db.php'); $hint_text = 'You have to either restart the install process, either restore this file.'; Html::nullHeader('Missing configuration'); echo '
'; echo '
'; echo '
'; echo '
' . $title_text . '
'; echo '

'; echo $missing_conf_text; echo ' '; echo $hint_text; echo '
'; echo '
'; echo '
'; echo '
'; Html::nullFooter(); } die(); } else { include(GLPI_ROOT . "/inc/includes.php"); $_SESSION["glpicookietest"] = 'testcookie'; //Try to detect GLPI agent calls $rawdata = file_get_contents("php://input"); if (!empty($rawdata) && $_SERVER['REQUEST_METHOD'] == 'POST') { include_once(GLPI_ROOT . '/front/inventory.php'); die(); } // For compatibility reason if (isset($_GET["noCAS"])) { $_GET["noAUTO"] = $_GET["noCAS"]; } if (!isset($_GET["noAUTO"])) { Auth::redirectIfAuthenticated(); } $redirect = array_key_exists('redirect', $_GET) ? Sanitizer::unsanitize($_GET['redirect']) : ''; Auth::checkAlternateAuthSystems(true, $redirect); $theme = $_SESSION['glpipalette'] ?? 'auror'; $errors = ""; if (isset($_GET['error']) && $redirect !== '') { switch ($_GET['error']) { case 1: // cookie error $errors .= __('You must accept cookies to reach this application'); break; case 2: // GLPI_SESSION_DIR not writable $errors .= __('Checking write permissions for session files'); break; case 3: $errors .= __('Invalid use of session ID'); break; } } // redirect to ticket if ($redirect !== '') { Toolbox::manageRedirect($redirect); } TemplateRenderer::getInstance()->display('pages/login.html.twig', [ 'card_bg_width' => true, 'lang' => $CFG_GLPI["languages"][$_SESSION['glpilanguage']][3], 'title' => __('Authentication'), 'noAuto' => $_GET["noAUTO"] ?? 0, 'redirect' => $redirect, 'text_login' => $CFG_GLPI['text_login'], 'namfield' => ($_SESSION['namfield'] = uniqid('fielda')), 'pwdfield' => ($_SESSION['pwdfield'] = uniqid('fieldb')), 'rmbfield' => ($_SESSION['rmbfield'] = uniqid('fieldc')), 'show_lost_password' => $CFG_GLPI["notifications_mailing"] && countElementsInTable('glpi_notifications', [ 'itemtype' => 'User', 'event' => 'passwordforget', 'is_active' => 1 ]), 'languages_dropdown' => Dropdown::showLanguages('language', [ 'display' => false, 'display_emptychoice' => true, 'emptylabel' => __('Default (from user profile)'), 'width' => '100%' ]), 'right_panel' => strlen($CFG_GLPI['text_login']) > 0 || count($PLUGIN_HOOKS[Hooks::DISPLAY_LOGIN] ?? []) > 0 || $CFG_GLPI["use_public_faq"], 'auth_dropdown_login' => Auth::dropdownLogin(false), 'copyright_message' => Html::getCopyrightMessage(false), 'errors' => $errors ]); } // call cron if (!GLPI_DEMO_MODE) { CronTask::callCronForce(); } echo "";

Pouvez-vous m'aider ?

Offline

#2 2023-05-12 08:24:25

Chico008
Member
Registered: 2022-12-14
Posts: 383

Re: erreur lorsque j'essaie d'ouvrir GLPI (avec IP)

Bonjour

Sur quoi tu l'a installer ? quelles version apache/php
quel sgbd et version ?

c'est une erreur que tu as via ton navigateur ou dans la log apache ?

Offline

#3 2023-05-12 11:11:21

wushu4
Member
Registered: 2023-05-11
Posts: 2

Re: erreur lorsque j'essaie d'ouvrir GLPI (avec IP)

Bonjour !

Merci de m'avoir répondu.
J'étais un peu désespérée alors j'ai tout désinstallé et réinstallé hier soir.
J'avais suivi deux tutos et j'ai du mélanger des choses qui n'allaient pas ensemble, notamment des versions de PHP (je crois...).
Maintenant ça fonctionne...

Sur une VM debian 11 j'avais installé apache 2, et php 8.2 avec mariadb et GLPI 10.
C'était une erreur qui s'affichait lorsque j'essayais d'ouvrir GLPI comme ça http://adresseIP/glpi

Offline

Board footer

Powered by FluxBB