Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Serveur apache ne démarre pas

Bonjour, Nous sommes entrain de tester OCSInventory pour voir si ce dernier répond à notre besoin.

Cependant nous avons installé sur une Redhat 7:

 php -v
PHP 5.6.25 (cli) (built: Sep  6 2016 08:19:42)

Server version: Apache/2.4.27 (Red Hat)
Server built:   May  9 2018 13:17:26

mais quand nous éxécutons :

systemctl start httpd24-httpd.service
Job for httpd24-httpd.service failed because the control process exited with error code. See "systemctl status httpd24-httpd.service" and "journalctl -xe" for detail

systemctl status httpd24-httpd.service
● httpd24-httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd24-httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-07-17 08:06:14 CEST; 6s ago
  Process: 22302 ExecStop=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 22301 ExecStart=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 22301 (code=exited, status=1/FAILURE)

Jul 17 08:06:14 carvmx343 systemd[1]: Starting The Apache HTTP Server...
Jul 17 08:06:14 carvmx343 httpd-scl-wrapper[22301]: httpd: Syntax error on line 354 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 6 of /...
Jul 17 08:06:14 carvmx343 systemd[1]: httpd24-httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 17 08:06:14 carvmx343 httpd-scl-wrapper[22302]: httpd: Syntax error on line 354 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 6 of /...
Jul 17 08:06:14 carvmx343 systemd[1]: httpd24-httpd.service: control process exited, code=exited status=1
Jul 17 08:06:14 carvmx343 systemd[1]: Failed to start The Apache HTTP Server.
Jul 17 08:06:14 carvmx343 systemd[1]: Unit httpd24-httpd.service entered failed state.
Jul 17 08:06:14 carvmx343 systemd[1]: httpd24-httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

/opt/rh/httpd24/root/etc/httpd/conf.d# ls -l
total 56
-rw-r--r-- 1 root root  2966 May  9 15:17 autoindex.conf
-rw-r--r-- 1 root root  4157 Jul 16 16:18 ocsinventory-reports.conf
-rw-r--r-- 1 root root   963 Jul 16 16:55 php.conf
-rw-r--r-- 1 root root   366 May  9 15:18 README
-rw-r--r-- 1 root root  9418 May  9 15:15 ssl.conf
-rw-r--r-- 1 root root  1252 May  9 15:15 userdir.conf
-rw-r--r-- 1 root root   556 May  9 15:15 welcome.conf
-rw-r--r-- 1 root root 13494 Jul 16 16:17 z-ocsinventory-server.conf

Il semble que (mais je n'en suis pas certain) que la section du fichier php.conf  :

<IfModule prefork.c>
    LoadModule php5_module /opt/rh/rh-php56/root/usr/lib64/libphp56-php5.so
</IfModule>

Ne fonctionne pas bien.

/opt/rh/httpd24/root/etc/httpd/conf.d# ls -l /opt/rh/rh-php56/root/usr/lib64/libphp56-php5.so
lrwxrwxrwx 1 root root 14 Jul 16 16:55 /opt/rh/rh-php56/root/usr/lib64/libphp56-php5.so -> libphp5-5.6.so

Pourriez vous nous aider ?
in OCS Inventory NG server for Unix by (510 points)

10 Answers

0 votes
Bonjour,

Que donne la commande apachectl -t ?

Cordialement

Frank
by (88.5k points)
0 votes
Bonjour Merci pour la réponse rapide :

apachectl -t
Syntax error on line 354 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf:
Syntax error on line 6 of /opt/rh/httpd24/root/etc/httpd/conf.d/php.conf:
Can't locate API module structure `php5_module' in file /opt/rh/rh-php56/root/usr/lib64/libphp56-php5.so:
/opt/rh/rh-php56/root/usr/lib64/libphp56-php5.so: undefined symbol: php5_module
by (510 points)
0 votes
Le module php5 pour apache est bien installé?
by (88.5k points)
0 votes
J'ai envie de répondre oui :

# rpm -qf /opt/rh/rh-php56/root/usr/lib64/libphp5-5.6.so
rh-php56-php-embedded-5.6.25-1.el7.x86_64
# rpm -qf /opt/rh/rh-php56/root/usr/lib64/libphp5.so
rh-php56-php-embedded-5.6.25-1.el7.x86_64
# ls -l /opt/rh/rh-php56/root/usr/lib64/lib*
-rwxr-xr-x 1 root root 4353304 Sep  6  2016 /opt/rh/rh-php56/root/usr/lib64/libphp5-5.6.so
lrwxrwxrwx 1 root root      14 Jul 13 17:42 /opt/rh/rh-php56/root/usr/lib64/libphp5.so -> libphp5-5.6.so
by (510 points)
0 votes
Alors après recherche je viens de découvrir que mon équipe SYS n'a pas installé le bon fichier. après avoir installé : yum install php54-php-5.4.40-4.el7.x86_64 je n'ai plus de souci sur la conf apachectl -t . Mais le site web ne démarre toujours pas :

Please install php mbstring extension

Pour autant j'ai bien : ls -l /opt/rh/rh-php56/root/usr/lib64/php/modules/mbstring.so
-rwxr-xr-x 1 root root 1421072 Sep  6  2016 /opt/rh/rh-php56/root/usr/lib64/php/modules/mbstring.so

Y a t il encore du settings à faire ?
by (510 points)
0 votes
C'est la bonne version du module php-mbstring qui est installée?
by (88.5k points)
0 votes
la je suis affirmatif :

# rpm -qf /opt/rh/rh-php56/root/usr/lib64/php/modules/mbstring.so
rh-php56-php-mbstring-5.6.25-1.el7.x86_64
# php -v
PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
PHP 5.6.25 (cli) (built: Sep  6 2016 08:19:42)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

J'ai regardé sur le web certains préconise l'ajout dans le fichier php.ini de ça :

extension=/opt/rh/rh-php56/root/usr/lib64/php/modules/mbstring.so

puis restart apache

mais toujours le même résultat >> KO
by (510 points)
0 votes
tu as deux versions différentes de php installées sur ton serveur. Désinstalle la version 5.6 de php-mbstring et installe la version 5.4. Puis redémarre apache. Quel est le résultat?
by (88.5k points)
0 votes
Bonjour, Je vous remercie pour votre aide maintenant OCS démarre sans souci.

Par contre comment faire cohabiter OCS et GLPI sur le même serveur : car j'ai l'impression que OCS ne peut pas utiliser une version de PHP supérieur à 5.4 alors que GLPI solicite le PHP 5.6 minimum  ?

En vous remerciant encore pour votre aide.
by (510 points)
0 votes
Bonjour,

OCS fonctionne avec php 5.4 mini. Donc il fonctionnera très bien avec php 5.6 et plus.
Cordialement

Frank
by (88.5k points)
 
Powered by Question2Answer
...