Partage
  • Partager sur Facebook
  • Partager sur Twitter

Ubuntu apache2 cassé

Sujet résolu
    20 novembre 2018 à 9:41:15

    Bonjour,

    Je fais ce sujet car je galère complètement avec apache2.

    J'étais sur php7.2 sauf que j'ai du bosser sur un CMS qui supportait uniquement php5. Et évidemment php5 n'est plus dispo sur ubuntu14.04 :lol:

    Sur le net on retrouve toujours le ppa ondrej/php donc je fais ces commandes:

    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
    sudo apt-get install php5.6 php5.6-mysql php5.6-mbstring libapache2-mod-php5.6  

    Ensuite, j'essaye de désactiver php7.2 sauf que déjà là j'ai une réponse qui me parait bizarre...

    sudo a2dismod php7.2
    - Module php7.2 already disabled
    

    Je ne comprend pas pourquoi il me dit que c'est déjà désactiver alors que quand je fais php -v j'ai:

    PHP 7.2.12-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 12 2018 09:55:12) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.12-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    

    Bref, et j'active php5.6:

    sudo a2enmod php5.6
    - Considering dependency mpm_prefork for php5.6:
    - Considering conflict mpm_event for mpm_prefork:
    - Considering conflict mpm_worker for mpm_prefork:
    - Module mpm_prefork already enabled
    - Considering conflict php5 for php5.6:
      Enabling module php5.6.
    - To activate the new configuration, you need to run:
      service apache2 restart
    sudo service apache2 restart 


    Et la, je vais sur localhost pour voir si ça fonctionne, sauf que j'ai erreur de chargement (apache2 désactiver) je précise bien que j'ai n'ai pas eu d'erreur avec le apache2 restart.

    Du coup je me renseignes sur internet et impossible de trouver quoi que ce soit.

    Du coup je tente des trucs et je fais apache2 et voici l'erreur:

    apache2
    [Tue Nov 20 09:18:06.010993 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
    [Tue Nov 20 09:18:06.011035 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_PID_FILE} is not defined
    [Tue Nov 20 09:18:06.011050 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_RUN_USER} is not defined
    [Tue Nov 20 09:18:06.011055 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
    [Tue Nov 20 09:18:06.011066 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    [Tue Nov 20 09:18:06.019846 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    [Tue Nov 20 09:18:06.020023 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    [Tue Nov 20 09:18:06.020033 2018] [core:warn] [pid 3799] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
    Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
    

    Du coup un copier coller de l'erreur et j'ai plusieurs solutions, j'ai tout essayé rien ne fonctionne j'ai toujours cette même erreur.

    J'ai essayé tout ça:

    sudo service apache2 status
    nov. 20 09:16:51 dev systemd[1]: Starting LSB: Apache2 web server...
    nov. 20 09:16:51 dev apache2[3681]:  * Starting Apache httpd web server 
    nov. 20 09:16:51 dev apache2[3681]: AH00558: apache2: Could not reliably
    nov. 20 09:16:52 dev apache2[3681]: Segmentation fault (core dumped)
    nov. 20 09:16:52 dev apache2[3681]: Action 'start' failed.
    nov. 20 09:16:52 dev apache2[3681]: The Apache error log may have more i
    nov. 20 09:16:52 dev apache2[3700]:  * Stopping Apache httpd web server 
    nov. 20 09:16:52 dev apache2[3700]:  *
    nov. 20 09:16:52 dev systemd[1]: Started LSB: Apache2 web server.
    ...skipping...
    ● apache2.service - LSB: Apache2 web server
       Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
      Drop-In: /lib/systemd/system/apache2.service.d
               └─apache2-systemd.conf
       Active: inactive (dead) since mar. 2018-11-20 09:16:52 CET; 1min 55s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 3700 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS
      Process: 3549 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUC
      Process: 3681 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCE
    
    nov. 20 09:16:51 dev systemd[1]: Starting LSB: Apache2 web server...
    nov. 20 09:16:51 dev apache2[3681]:  * Starting Apache httpd web server 
    nov. 20 09:16:51 dev apache2[3681]: AH00558: apache2: Could not reliably
    nov. 20 09:16:52 dev apache2[3681]: Segmentation fault (core dumped)
    nov. 20 09:16:52 dev apache2[3681]: Action 'start' failed.
    nov. 20 09:16:52 dev apache2[3681]: The Apache error log may have more i
    nov. 20 09:16:52 dev apache2[3700]:  * Stopping Apache httpd web server 
    nov. 20 09:16:52 dev apache2[3700]:  *
    nov. 20 09:16:52 dev systemd[1]: Started LSB: Apache2 web server.
    
    sudo service apache2 start
    sudo service apache2 stop 
    sudo service apache2 reload
    - apache2.service is not active, cannot reload.
    
    sudo service apache2 start
    sudo service apache2 restart
    sudo service apache2 stop    
    sudo service apache2 status
    ● apache2.service - LSB: Apache2 web server
       Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
      Drop-In: /lib/systemd/system/apache2.service.d
               └─apache2-systemd.conf
       Active: inactive (dead) since mar. 2018-11-20 09:20:36 CET; 6s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 4153 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS
      Process: 3549 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUC
      Process: 4136 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCE
    
    nov. 20 09:20:36 dev systemd[1]: Starting LSB: Apache2 web server...
    nov. 20 09:20:36 dev apache2[4136]:  * Starting Apache httpd web server 
    nov. 20 09:20:36 dev apache2[4136]: AH00558: apache2: Could not reliably
    nov. 20 09:20:36 dev apache2[4136]: Segmentation fault (core dumped)
    nov. 20 09:20:36 dev apache2[4136]: Action 'start' failed.
    nov. 20 09:20:36 dev apache2[4136]: The Apache error log may have more i
    nov. 20 09:20:36 dev apache2[4153]:  * Stopping Apache httpd web server 
    nov. 20 09:20:36 dev apache2[4153]:  *
    nov. 20 09:20:36 dev systemd[1]: Started LSB: Apache2 web server.
    nov. 20 09:20:40 dev systemd[1]: Stopped LSB: Apache2 web server.
    
    source /etc/apache2/envvars 
    apache2 -V
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
    Server version: Apache/2.4.18 (Ubuntu)
    Server built:   2018-06-07T19:43:03
    Server's Module Magic Number: 20120211:52
    Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
    Compiled using: APR 1.5.2, APR-UTIL 1.5.4
    Architecture:   64-bit
    Server MPM:     prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D DYNAMIC_MODULE_LIMIT=256
     -D HTTPD_ROOT="/etc/apache2"
     -D SUEXEC_BIN="/usr/lib/apache2/suexec"
     -D DEFAULT_PIDLOG="/var/run/apache2.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="mime.types"
     -D SERVER_CONFIG_FILE="apache2.conf"
    sudo service apache2 restart
    sudo apache2
    [Tue Nov 20 09:23:56.913766 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
    [Tue Nov 20 09:23:56.913812 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_PID_FILE} is not defined
    [Tue Nov 20 09:23:56.913824 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_RUN_USER} is not defined
    [Tue Nov 20 09:23:56.913828 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
    [Tue Nov 20 09:23:56.913837 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    [Tue Nov 20 09:23:56.922485 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    [Tue Nov 20 09:23:56.922651 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    [Tue Nov 20 09:23:56.922658 2018] [core:warn] [pid 5085] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
    AH00526: Syntax error on line 74 of /etc/apache2/apache2.con

    La même erreur qui revient à la fin...
    Je ne sais plus comment chercher, je suis bloqué.

    Un peu d'aide ne serait pas de refus :) Merci

    g



    ff

    • Partager sur Facebook
    • Partager sur Twitter
      27 novembre 2018 à 10:09:59

      Salut,

      Tu as regardé la ligne 74 de apache2.conf?

      Tu peux poster ce fichier stp.

      • Partager sur Facebook
      • Partager sur Twitter
        27 novembre 2018 à 19:28:58

        psyckyo a écrit:

        Salut,

        Tu as regardé la ligne 74 de apache2.conf?

        Tu peux poster ce fichier stp.


        Hello, n'ayant pas réussi à résoudre le problème, j'ai du ré-activer php7.2, heureusement ça a fonctionné :-°
        Je mets le sujet en résolu du coup...

        Merci!

        • Partager sur Facebook
        • Partager sur Twitter

        Ubuntu apache2 cassé

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown