Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 07/09/2023, à 17:06

Scorpio63000

Problème Apache/PHP

Bonjour à tous

Je me permet de venir vers vous afin d'avoir de l'aide.

Je tiens à préciser que je débute.

Voila pour commencer j'ai créer un dossier Backup

root@SRV-DEB-GLPI :~# mkdir /home/Scorpio/Backup

Réalisation d'un Backup via la commande :

root@SRV-DEB-GLPI :~# tar cvpjf backup-07092023.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=backup-07092023.tar.bz2 --exclude=/mnt --exclude=/sys --exclude=/boot /

J'ai réalisé une mise à jour.
J'ai fait un reboot une fois la mise à jour terminé.

Depuis mon serveur apache GLPI OCS ne fonctionne plus.

Ci-dessous voici l'erreur

root@SRV-DEB-GLPI :~# systemctl start apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.

afin d'avoir l'intégralité du journal

root@SRV-DEB-GLPI :~#  journalctl -xeu apache2.service > /home/Scorpio/Docs/apache.txt

Contenue du fichier

sept. 07 16:04:11 SRV-DEB-GLPI systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à démarrer
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unité (unit) apache2.service a commencé à démarrer.
sept. 07 16:04:12 SRV-DEB-GLPI apachectl[588]: [Thu Sep 07 16:04:12.346128 2023] [perl:error] [pid 588] Can't locate Apache/Ocsinventory/Plugins.pm in @INC (you may need to install the Apache::Ocsinventory::Plugins module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl /etc/apache2) at (eval 13) line 1.\n
sept. 07 16:04:12 SRV-DEB-GLPI apachectl[588]: [Thu Sep 07 16:04:12.346738 2023] [perl:error] [pid 588] Can't load Perl module Apache::Ocsinventory::Plugins for server (null):0, exiting...
sept. 07 16:04:12 SRV-DEB-GLPI apachectl[543]: Action 'start' failed.
sept. 07 16:04:12 SRV-DEB-GLPI apachectl[543]: The Apache error log may have more information.
sept. 07 16:04:12 SRV-DEB-GLPI systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
sept. 07 16:04:12 SRV-DEB-GLPI systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
sept. 07 16:04:12 SRV-DEB-GLPI systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a échoué
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unité (unit) apache2.service a échoué, avec le résultat failed.
sept. 07 16:07:03 SRV-DEB-GLPI systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: L'unité (unit) apache2.service a commencé à démarrer
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unité (unit) apache2.service a commencé à démarrer.
sept. 07 16:07:03 SRV-DEB-GLPI apachectl[837]: [Thu Sep 07 16:07:03.519688 2023] [perl:error] [pid 837] Can't locate Apache/Ocsinventory/Plugins.pm in @INC (you may need to install the Apache::Ocsinventory::Plugins module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl /etc/apache2) at (eval 13) line 1.\n
sept. 07 16:07:03 SRV-DEB-GLPI apachectl[837]: [Thu Sep 07 16:07:03.520660 2023] [perl:error] [pid 837] Can't load Perl module Apache::Ocsinventory::Plugins for server (null):0, exiting...
sept. 07 16:07:03 SRV-DEB-GLPI apachectl[834]: Action 'start' failed.
sept. 07 16:07:03 SRV-DEB-GLPI apachectl[834]: The Apache error log may have more information.
sept. 07 16:07:03 SRV-DEB-GLPI systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
sept. 07 16:07:03 SRV-DEB-GLPI systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
sept. 07 16:07:03 SRV-DEB-GLPI systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: L'unité (unit) apache2.service a échoué
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unité (unit) apache2.service a échoué, avec le résultat failed.

Je vous en remercie d'avance de bien vouloir m'aider

Bien cordialement.
Scorpio.

Hors ligne

#2 Le 07/09/2023, à 17:46

Vobul

Re : Problème Apache/PHP

Pour une raison que j'ignore, ton Apache cherche à charger un module perl : Can't locate Apache/Ocsinventory/Plugins.pm in @INC (you may need to install the Apache::Ocsinventory::Plugins module. Mais il ne le trouve pas et donc s'arrête là.

Soit tu l'installes à un endroit où Apache peut le trouver, soit tu désactives la config quelque part dans ta conf apache qui a besoin de ce machin-là.


Vobul
Utilisez le retour utilisable de commandes !!!
J'aime la langue française, mais je parle franglais, deal with it.
RTFM

Hors ligne

#3 Le 07/09/2023, à 18:49

Scorpio63000

Re : Problème Apache/PHP

Bonjour,
github OCSInventory-NG
Merci pour votre réponse.

Donc si je comprend bien faut que j’installe le fichier Plugins.pm?
Je ne sait ou je peux trouver sa, mais j'ai trouver ceci sur le le github OCSInventory-NG

###############################################################################
## Copyright 2005-2016 OCSInventory-NG/OCSInventory-Server contributors.
## See the Contributors file for more details about them.
## 
## This file is part of OCSInventory-NG/OCSInventory-ocsreports.
##
## OCSInventory-NG/OCSInventory-Server 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.
##
## OCSInventory-NG/OCSInventory-Server 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 OCSInventory-NG/OCSInventory-ocsreports. if not, write to the
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
## MA 02110-1301, USA.
################################################################################

package Apache::Ocsinventory::Plugins;

use strict;

BEGIN {
	push @INC, $ENV{OCS_PLUGINS_PERL_DIR};
}

#Loading plugins modules
if($ENV{'OCS_MODPERL_VERSION'} == 1){
	Apache->httpd_conf("Include $ENV{OCS_PLUGINS_CONF_DIR}");
}elsif($ENV{'OCS_MODPERL_VERSION'} == 2){
        use Apache2::ServerUtil();
        Apache2::ServerUtil->server->add_config(["Include $ENV{OCS_PLUGINS_CONF_DIR}"]);
	
}else{
  if(!defined($ENV{'OCS_MODPERL_VERSION'})){
    die("OCS_MODPERL_VERSION not defined. Abort\n");
  }else{
    die("OCS_MODPERL_VERSION set to, a bad parameter. Must be '1' or '2'. Abort\n");
  }
}
 
1;

Mais où je dois le mettre si bien sur c'est sa.

Je vous en remercie d'avance de bien vouloir m'aider

Bien cordialement.
Scorpio.

Hors ligne

#4 Le 07/09/2023, à 22:41

Vobul

Re : Problème Apache/PHP

Bon en cherchant un peu j'ai trouvé ce plugin pour glpi : https://github.com/pluginsGLPI/ocsinventoryng. J'imagine que tu l'as installé. Cela explique donc le problème.

Commence peut-être par retirer ce plugin de la conf GLPI et/ou Apache, histoire de démarrer, puis lis la doc pour le reinstaller si besoin.


Vobul
Utilisez le retour utilisable de commandes !!!
J'aime la langue française, mais je parle franglais, deal with it.
RTFM

Hors ligne

#5 Le 08/09/2023, à 00:57

Scorpio63000

Re : Problème Apache/PHP

Bonjour/Bonsoir

Merci pour votre réponse.

Je vais regarder sa, mais pourquoi avant la mise à jour cela marcher impeccable GLPI / OCS et là sa veux plus.
Oui vous allez me dire c'est le fameux Plugins.pm mais j'ai pas eu se soucis lors de l'install d'y a y a un an et demi deux ans

Je vous en remercie d'avance de bien vouloir m'aider

Bien cordialement.
Scorpio.

Hors ligne