• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    LDAP Plugin to AD, ldap_unbind function ERROR

    Scheduled Pinned Locked Moved
    General Problems
    4
    15
    957
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Alois
      last edited by

      Hey, hey, hey, hey, 🙂

      For several weeks I have been trying to connect FOG LDAP Plugin to my Active Directory.

      Unfortunately I can not, when connecting with an AD account to the FOG panel this one returns me a “HTTP ERROR 500”.
      So I was searching for my apache2/error.log here is the result:

      [Tue May 14 16:31:05.806451 2019] [proxy_fcgi:error] [pid 85879] [client 192.168.5.69:62642] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught exception 'Exception' with message 'Function does not exist ldap_unbind' in /var/www/fog/lib/plugins/ldap/class/ldap.class.php:104\nStack trace:\n#0 /var/www/fog/lib/plugins/ldap/class/ldap.class.php(228): LDAP->__call('unbind', Array)\n#1 /var/www/fog/lib/plugins/ldap/class/ldap.class.php(228): LDAP->unbind()\n#2 /var/www/fog/lib/plugins/ldap/hooks/ldappluginhook.hook.php(126): LDAP->authLDAP('myuser', 'userpwd')\n#3 /var/www/fog/lib/fog/hookmanager.class.php(87): LDAPPluginHook->checkAddUser(Array)\n#4 /var/www/fog/lib/fog/user.class.php(146): HookManager->processEvent('USER_LOGGING_IN', Array)\n#5 /var/www/fog/lib/fog/user.class.php(226): User->passwordValidate('myuser', 'userpwd')\n#6 /var/www/fog/lib/fog/fogbase.class.php(2441): User->validatePw('myuser', 'userpwd')\n#7 /var/www/fog/lib/pages/processlogin.class.php(256): FOGBase::attemptLogin('myuser', 'userpwd')\n#8 /var/www/fog/management/index.php(31): ProcessLogin->processMainL...\n', referer: http://192.168.10.9/fog/management/index.php
      
      

      Could you help me solve this problem?

      Thank you !!

      Tom ElliottT 1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @Alois
        last edited by

        @Alois if you’re running Debian run: sudo apt install php7.2-ldap or red hat based sudo yum install php-ldap

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • A
          Alois
          last edited by

          @Tom-Elliott said in LDAP Plugin to AD, ldap_unbind function ERROR:

          sudo apt install php7.2-ldap

          Hi @Tom-Elliott
          I have updated my PHP version to 7.2
          Install php7.2-ldap and enabled module
          Unfortunately the error remains the same:/
          Do you have any other ideas?
          Thank you in advance

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @Alois Are you sure the new PHP 7.2 is now used by apache? You might need to enable the module as well: phpenmod ldap ; systemctl restart apache2

            Please run dpkg -l | grep php or rpm -qa | grep php and post the full output here so we can check if you have a mix of PHP versions installed now.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • A
              Alois
              last edited by

              @Sebastian-Roth said in LDAP Plugin to AD, ldap_unbind function ERROR:

              dpkg -l | grep php

              Hi Sebastian,
              Thank you for your answer.
              I’ve activated the ldap module and restart apache.
              It would seem however that I have several versions of php enabled and that there are conflicts between it.
              Do you have safe handling to avoid breaking everything?
              Thank you very much

              ii  libapache2-mod-php5              5.6.33+dfsg-0+deb8u1                              amd64        server-side, HTML-embedded scripting language (Apache 2 module)
              ii  php                              1:7.0+49                                          all          server-side, HTML-embedded scripting language (default)
              ii  php-bcmath                       1:7.0+49                                          all          Bcmath module for PHP [default]
              ii  php-cli                          1:7.0+49                                          all          command-line interpreter for the PHP scripting language (default)
              ii  php-common                       1:49                                              all          Common files for PHP packages
              ii  php-gettext                      1.0.12-0.1                                        all          transitional dummy package for php-php-gettext
              ii  php-ldap                         1:7.0+49                                          all          LDAP module for PHP [default]
              ii  php-mbstring                     1:7.0+49                                          all          MBSTRING module for PHP [default]
              ii  php-net-ldap2                    2.2.0-3                                           all          Object oriented interface for searching and manipulating LDAP-entries
              ii  php-net-ldap3                    1.0.4-1                                           all          Object oriented interface for searching and manipulating LDAP entries
              ii  php-pear                         1:1.10.1+submodules+notgz-9+deb9u1                all          PEAR Base System
              ii  php-php-gettext                  1.0.12-0.1                                        all          read gettext MO files directly, without requiring anything other than PHP
              ii  php-xml                          1:7.0+49                                          all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
              ii  php5                             5.6.33+dfsg-0+deb8u1                              all          server-side, HTML-embedded scripting language (metapackage)
              ii  php5-cli                         5.6.33+dfsg-0+deb8u1                              amd64        command-line interpreter for the php5 scripting language
              ii  php5-common                      5.6.33+dfsg-0+deb8u1                              amd64        Common files for packages built from the php5 source
              ii  php5-curl                        5.6.33+dfsg-0+deb8u1                              amd64        CURL module for php5
              ii  php5-fpm                         5.6.33+dfsg-0+deb8u1                              amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
              ii  php5-gd                          5.6.33+dfsg-0+deb8u1                              amd64        GD module for php5
              ii  php5-json                        1.3.6-1                                           amd64        JSON module for php5
              ii  php5-mcrypt                      5.6.33+dfsg-0+deb8u1                              amd64        MCrypt module for php5
              ii  php5-mysqlnd                     5.6.33+dfsg-0+deb8u1                              amd64        MySQL module for php5 (Native Driver)
              ii  php5-readline                    5.6.33+dfsg-0+deb8u1                              amd64        Readline module for php5
              ii  php7.0                           7.0.33-0+deb9u3                                   all          server-side, HTML-embedded scripting language (metapackage)
              ii  php7.0-bcmath                    7.0.33-0+deb9u3                                   amd64        Bcmath module for PHP
              ii  php7.0-cli                       7.0.33-0+deb9u3                                   amd64        command-line interpreter for the PHP scripting language
              ii  php7.0-common                    7.0.33-0+deb9u3                                   amd64        documentation, examples and common module for PHP
              ii  php7.0-fpm                       7.0.33-0+deb9u3                                   amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
              ii  php7.0-json                      7.0.33-0+deb9u3                                   amd64        JSON module for PHP
              ii  php7.0-ldap                      7.0.33-0+deb9u3                                   amd64        LDAP module for PHP
              ii  php7.0-mbstring                  7.0.33-0+deb9u3                                   amd64        MBSTRING module for PHP
              ii  php7.0-opcache                   7.0.33-0+deb9u3                                   amd64        Zend OpCache module for PHP
              ii  php7.0-readline                  7.0.33-0+deb9u3                                   amd64        readline module for PHP
              ii  php7.0-xml                       7.0.33-0+deb9u3                                   amd64        DOM, SimpleXML, WDDX, XML, and XSL module for PHP
              ii  php7.2                           7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  all          server-side, HTML-embedded scripting language (metapackage)
              ii  php7.2-cli                       7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        command-line interpreter for the PHP scripting language
              ii  php7.2-common                    7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        documentation, examples and common module for PHP
              ii  php7.2-fpm                       7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
              ii  php7.2-json                      7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        JSON module for PHP
              ii  php7.2-ldap                      7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        LDAP module for PHP
              ii  php7.2-opcache                   7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        Zend OpCache module for PHP
              ii  php7.2-readline                  7.2.18-1+0~20190503103213.21+stretch~1.gbp101320  amd64        readline module for PHP
              
              
              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @Alois I suggest we start by creating a phpinfo page to get an idea of the version currently running. Create a new file /var/ww/html/fog/info.php with the following content:

                <?php
                phpinfo();
                ?>
                

                As well make it owned by the apache webserver user: chown www-data:www-data /var/ww/html/fog/info.php

                Try open the following URL and post a picture of the output you get: http://x.x.x.x/fog/info.php

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                A 1 Reply Last reply Reply Quote 0
                • A
                  Alois @Sebastian Roth
                  last edited by Alois

                  @Sebastian-Roth I suspected that you would ask that I had already taken the initiative to do so.
                  Here is the result :
                  https://gyazo.com/9bcdd3af409b50998a094d1e5cf13c13

                  but php -v send me this result :

                  PHP 7.2.18-1+0~20190503103213.21+stretch~1.gbp101320 (cli) (built: May  3 2019 10:32:13) ( NTS )
                  Copyright (c) 1997-2018 The PHP Group
                  Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
                      with Zend OPcache v7.2.18-1+0~20190503103213.21+stretch~1.gbp101320, Copyright (c) 1999-2018, by Zend Technologies
                  

                  I tried to remove the php5 files, but the server returned me a 503 error.
                  I think I’m using the wrong method to delete.

                  Thank you

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @Alois Ok it’s still using PHP 5.6 in the webserver. Note that php -v is giving you different results because command line PHP is not always the same as the one used by apache.

                    Please post the contents of /etc/apache2/sites-enabled/001-fog.conf here. As well run the following commands and post output here:

                    ps ax | grep fpm
                    systemctl status php7.0-fpm.service
                    systemctl status php7.2-fpm.service
                    

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      Alois @Sebastian Roth
                      last edited by

                      @Sebastian-Roth Hi !

                      Here is the contents of 001-fog.conf :

                      <VirtualHost *:80>
                          <FilesMatch "\.php$">
                              SetHandler "proxy:fcgi://127.0.0.1:9000/"
                          </FilesMatch>
                          KeepAlive Off
                          ServerName 192.168.10.9
                          ServerAlias
                          DocumentRoot /var/www/
                          <Directory /var/www/fog/>
                              DirectoryIndex index.php index.html index.htm
                          </Directory>
                          RewriteEngine On
                          RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
                          RewriteRule .* - [F]
                          RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
                          RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
                          RewriteRule ^/fog/(.*)$ /fog/api/index.php [QSA,L]
                      </VirtualHost>
                      
                      

                      The result of ps ax | grep fpm :

                       15348 ?        Ss     0:02 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
                       15349 ?        S      0:00 php-fpm: pool www
                       15350 ?        S      0:00 php-fpm: pool www
                       50062 ?        S      0:36 php-fpm: pool www
                       50116 ?        S      0:36 php-fpm: pool www
                       50135 ?        S      0:36 php-fpm: pool www
                       50170 ?        S      0:37 php-fpm: pool www
                       50171 ?        S      0:35 php-fpm: pool www
                       50317 ?        S      0:37 php-fpm: pool www
                       52826 ?        R      0:29 php-fpm: pool www
                       57788 ?        S      0:16 php-fpm: pool www
                       57950 ?        S      0:15 php-fpm: pool www
                       60927 ?        S      0:08 php-fpm: pool www
                       63260 pts/0    S+     0:00 grep fpm
                       78927 ?        Ss     0:05 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
                       84988 ?        Ss     0:04 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
                       84989 ?        S      0:00 php-fpm: pool www
                       84990 ?        S      0:00 php-fpm: pool www
                      

                      The result of systemctl status php7.0-fpm.service :

                      â—Ź php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
                         Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
                         Active: active (running) since Tue 2019-05-14 15:33:24 CEST; 1 day 17h ago
                           Docs: man:php-fpm7.0(8)
                       Main PID: 84988 (php-fpm7.0)
                         Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
                          Tasks: 3 (limit: 19660)
                         CGroup: /system.slice/php7.0-fpm.service
                                 ├─84988 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
                                 ├─84989 php-fpm: pool www
                                 └─84990 php-fpm: pool www
                      
                      Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
                      

                      The result of systemctl status php7.2-fpm.service :

                      â—Ź php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
                         Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
                         Active: active (running) since Wed 2019-05-15 10:25:57 CEST; 22h ago
                           Docs: man:php-fpm7.2(8)
                       Main PID: 15348 (php-fpm7.2)
                         Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
                          Tasks: 3 (limit: 19660)
                         CGroup: /system.slice/php7.2-fpm.service
                                 ├─15348 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
                                 ├─15349 php-fpm: pool www
                                 └─15350 php-fpm: pool www
                      
                      Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
                      

                      The result of systemctl status php5-fpm.service :

                      â—Ź php5-fpm.service - The PHP FastCGI Process Manager
                         Loaded: loaded (/lib/systemd/system/php5-fpm.service; enabled; vendor preset: enabled)
                         Active: active (running) since Tue 2019-05-14 14:21:44 CEST; 1 day 18h ago
                       Main PID: 78927 (php5-fpm)
                         Status: "Processes active: 0, idle: 10, Requests: 85698, slow: 0, Traffic: 1req/sec"
                          Tasks: 11 (limit: 19660)
                         CGroup: /system.slice/php5-fpm.service
                                 ├─50062 php-fpm: pool www
                                 ├─50116 php-fpm: pool www
                                 ├─50135 php-fpm: pool www
                                 ├─50170 php-fpm: pool www
                                 ├─50171 php-fpm: pool www
                                 ├─50317 php-fpm: pool www
                                 ├─52826 php-fpm: pool www
                                 ├─57788 php-fpm: pool www
                                 ├─57950 php-fpm: pool www
                                 ├─60927 php-fpm: pool www
                                 └─78927 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
                      
                      Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
                      

                      Thank you for taking your time to help me. 🙂

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        @Alois Let’s first try to get rid of the old PHP 5.6 and make sure the FOG web UI is still running:

                        apt-get purge php5 php5-cli php5-common php5-curl php5-fpm php5-gd php5-json php5-mcrypt php5-mysqlnd php5-readline libapache2-mod-php5
                        systemctl restart php7.2-fpm.service
                        systemctl restart apache2.service
                        systemctl status php7.2-fpm.service
                        systemctl status apache2.service
                        dpkg -l | grep php5
                        

                        Now try to access the web UI. If you get any error make sure you copy&paste the full command and output here so we know exactly what happened and can help you.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          Alois @Sebastian Roth
                          last edited by

                          @Sebastian-Roth said in LDAP Plugin to AD, ldap_unbind function ERROR:

                          dpkg -l | grep php5

                          Here is the return of the purge command ( is in french, if you want want, i can translate):

                          Lecture des listes de paquets... Fait
                          Construction de l'arbre des dépendances
                          Lecture des informations d'état... Fait
                          Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
                            libgd3 libjbig0 libmcrypt4 libonig2 libpng12-0 libqdbm14 libtiff5 libvpx1 libwebp6 linux-image-4.9.0-6-amd64
                          Veuillez utiliser « sudo apt autoremove » pour les supprimer.
                          Les paquets suivants seront ENLEVÉS :
                            libapache2-mod-php5* php5* php5-cli* php5-common* php5-curl* php5-fpm* php5-gd* php5-json* php5-mcrypt* php5-mysqlnd* php5-readline*
                          0 mis à jour, 0 nouvellement installés, 11 à enlever et 24 non mis à jour.
                          Après cette opération, 31,0 Mo d'espace disque seront libérés.
                          Souhaitez-vous continuer ? [O/n] o
                          (Lecture de la base de données... 68429 fichiers et répertoires déjà installés.)
                          Suppression de php5 (5.6.33+dfsg-0+deb8u1) ...
                          Suppression de libapache2-mod-php5 (5.6.33+dfsg-0+deb8u1) ...
                          php5_invoke prerm: Disable module mysqli for apache2 SAPI
                          php5_invoke prerm: Disable module mysql for apache2 SAPI
                          php5_invoke prerm: Disable module curl for apache2 SAPI
                          php5_invoke prerm: Disable module mysqlnd for apache2 SAPI
                          php5_invoke prerm: Disable module opcache for apache2 SAPI
                          php5_invoke prerm: Disable module pdo_mysql for apache2 SAPI
                          php5_invoke prerm: Disable module json for apache2 SAPI
                          php5_invoke prerm: Disable module readline for apache2 SAPI
                          php5_invoke prerm: Disable module gd for apache2 SAPI
                          php5_invoke prerm: Disable module pdo for apache2 SAPI
                          php5_invoke prerm: Disable module mcrypt for apache2 SAPI
                          Module php5 disabled.
                          apache2_invoke prerm: Disable module php5
                          Suppression de php5-readline (5.6.33+dfsg-0+deb8u1) ...
                          php5_invoke prerm: Disable module readline for fpm SAPI
                          php5_invoke prerm: Disable module readline for cli SAPI
                          Suppression de php5-fpm (5.6.33+dfsg-0+deb8u1) ...
                          php5_invoke prerm: Disable module mysqli for fpm SAPI
                          php5_invoke prerm: Disable module mysql for fpm SAPI
                          php5_invoke prerm: Disable module curl for fpm SAPI
                          php5_invoke prerm: Disable module mysqlnd for fpm SAPI
                          php5_invoke prerm: Disable module opcache for fpm SAPI
                          php5_invoke prerm: Disable module pdo_mysql for fpm SAPI
                          php5_invoke prerm: Disable module json for fpm SAPI
                          php5_invoke prerm: Disable module gd for fpm SAPI
                          php5_invoke prerm: Disable module pdo for fpm SAPI
                          php5_invoke prerm: Disable module mcrypt for fpm SAPI
                          Suppression de php5-cli (5.6.33+dfsg-0+deb8u1) ...
                          php5_invoke prerm: Disable module mysqli for cli SAPI
                          php5_invoke prerm: Disable module mysql for cli SAPI
                          php5_invoke prerm: Disable module curl for cli SAPI
                          php5_invoke prerm: Disable module mysqlnd for cli SAPI
                          php5_invoke prerm: Disable module opcache for cli SAPI
                          php5_invoke prerm: Disable module pdo_mysql for cli SAPI
                          php5_invoke prerm: Disable module json for cli SAPI
                          php5_invoke prerm: Disable module gd for cli SAPI
                          php5_invoke prerm: Disable module pdo for cli SAPI
                          php5_invoke prerm: Disable module mcrypt for cli SAPI
                          Suppression de php5-gd (5.6.33+dfsg-0+deb8u1) ...
                          Suppression de php5-mcrypt (5.6.33+dfsg-0+deb8u1) ...
                          Suppression de php5-mysqlnd (5.6.33+dfsg-0+deb8u1) ...
                          Suppression de php5-json (1.3.6-1) ...
                          Suppression de php5-curl (5.6.33+dfsg-0+deb8u1) ...
                          Suppression de php5-common (5.6.33+dfsg-0+deb8u1) ...
                          Traitement des actions différées (« triggers ») pour man-db (2.7.6.1-2) ...
                          (Lecture de la base de données... 68307 fichiers et répertoires déjà installés.)
                          Purge des fichiers de configuration de libapache2-mod-php5 (5.6.33+dfsg-0+deb8u1) ...
                          apache2_invoke postrm: Purging state for php5
                          Purge des fichiers de configuration de php5-fpm (5.6.33+dfsg-0+deb8u1) ...
                          Purge des fichiers de configuration de php5-curl (5.6.33+dfsg-0+deb8u1) ...
                          Purge des fichiers de configuration de php5-json (1.3.6-1) ...
                          WARN: php5-common has been removed, you need to cleanup /etc/php5 yourself.
                          dpkg: avertissement: lors de la suppression de php5-json, le répertoire « /etc/php5/mods-available » n'était pas vide, donc il n'a pas été supprimé
                          Purge des fichiers de configuration de php5-readline (5.6.33+dfsg-0+deb8u1) ...
                          Purge des fichiers de configuration de php5-mysqlnd (5.6.33+dfsg-0+deb8u1) ...
                          Purge des fichiers de configuration de php5-mcrypt (5.6.33+dfsg-0+deb8u1) ...
                          Purge des fichiers de configuration de php5-cli (5.6.33+dfsg-0+deb8u1) ...
                          dpkg: avertissement: lors de la suppression de php5-cli, le répertoire « /etc/php5 » n'était pas vide, donc il n'a pas été supprimé
                          Purge des fichiers de configuration de php5-gd (5.6.33+dfsg-0+deb8u1) ...
                          Purge des fichiers de configuration de php5-common (5.6.33+dfsg-0+deb8u1) ...
                          Traitement des actions différées (« triggers ») pour systemd (232-25+deb9u11) ...
                          

                          The result of systemctl status php7.2-fpm.service :

                          â—Ź php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
                             Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor prese
                             Active: active (running) since Thu 2019-05-16 09:45:55 CEST; 16s ago
                               Docs: man:php-fpm7.2(8)
                           Main PID: 68932 (php-fpm7.2)
                             Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/se
                              Tasks: 3 (limit: 19660)
                             CGroup: /system.slice/php7.2-fpm.service
                                     ├─68932 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
                                     ├─68934 php-fpm: pool www
                                     └─68935 php-fpm: pool www
                          
                          mai 16 09:45:55 fog systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
                          mai 16 09:45:55 fog php-fpm7.2[68932]: [16-May-2019 09:45:55] NOTICE: PHP messag
                          mai 16 09:45:55 fog systemd[1]: Started The PHP 7.2 FastCGI Process Manager.
                          lines 1-15/15 (END)...skipping...
                          â—Ź php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
                             Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
                             Active: active (running) since Thu 2019-05-16 09:45:55 CEST; 16s ago
                               Docs: man:php-fpm7.2(8)
                           Main PID: 68932 (php-fpm7.2)
                             Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
                              Tasks: 3 (limit: 19660)
                             CGroup: /system.slice/php7.2-fpm.service
                                     ├─68932 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
                                     ├─68934 php-fpm: pool www
                                     └─68935 php-fpm: pool www
                          
                          mai 16 09:45:55 fog systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
                          mai 16 09:45:55 fog php-fpm7.2[68932]: [16-May-2019 09:45:55] NOTICE: PHP message: PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
                          mai 16 09:45:55 fog systemd[1]: Started The PHP 7.2 FastCGI Process Manager.
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          ~
                          lines 1-15/15 (END)
                          

                          The result of systemctl status apache2.service :

                          â—Ź apache2.service - The Apache HTTP Server
                             Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
                             Active: active (running) since Thu 2019-05-16 09:46:02 CEST; 1min 52s ago
                            Process: 68945 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
                            Process: 68952 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
                           Main PID: 68956 (apache2)
                              Tasks: 7 (limit: 19660)
                             CGroup: /system.slice/apache2.service
                                     ├─68956 /usr/sbin/apache2 -k start
                                     ├─68957 /usr/sbin/apache2 -k start
                                     ├─68958 /usr/sbin/apache2 -k start
                                     ├─68959 /usr/sbin/apache2 -k start
                                     ├─68960 /usr/sbin/apache2 -k start
                                     ├─68961 /usr/sbin/apache2 -k start
                                     └─68971 /usr/sbin/apache2 -k start
                          
                          mai 16 09:46:02 fog systemd[1]: Stopped The Apache HTTP Server.
                          mai 16 09:46:02 fog systemd[1]: Starting The Apache HTTP Server...
                          mai 16 09:46:02 fog apachectl[68952]: 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
                          mai 16 09:46:02 fog systemd[1]: Started The Apache HTTP Server.
                          
                          

                          dpkg -l | grep php5 return nothing.

                          Now the web UI returns an unavailable 503 Service error :

                          https://gyazo.com/52eb1479240110a12381115c69b2ba69

                          Thank’s

                          1 Reply Last reply Reply Quote 0
                          • S
                            Sebastian Roth Moderator
                            last edited by

                            @Alois Sorry for my late reply, had too much work today and couldn’t respond in between. Please take a look at the apache error log to see why it fails. You find that log in /var/log/apache2/error_log

                            Get the last 20 lines of that file and post here.

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              Alois @Sebastian Roth
                              last edited by Alois

                              @Sebastian-Roth Hi !

                              This is the result of error.log:

                              Fri May 17 06:25:01.838188 2019] [mpm_prefork:notice] [pid 21140] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2r configured -- resuming normal operations
                              [Fri May 17 06:25:01.838222 2019] [core:notice] [pid 21140] AH00094: Command line: '/usr/sbin/apache2'
                              [Fri May 17 11:28:57.201171 2019] [mpm_prefork:notice] [pid 21140] AH00169: caught SIGTERM, shutting down
                              [Fri May 17 11:28:57.283635 2019] [mpm_prefork:notice] [pid 119777] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2r configured -- resuming normal operations
                              [Fri May 17 11:28:57.283731 2019] [core:notice] [pid 119777] AH00094: Command line: '/usr/sbin/apache2'
                              [Fri May 17 11:29:00.109445 2019] [proxy:error] [pid 119779] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:00.109526 2019] [proxy_fcgi:error] [pid 119779] [client 192.168.5.228:51933] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:00.170115 2019] [proxy:error] [pid 119781] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:00.170184 2019] [proxy_fcgi:error] [pid 119781] [client 192.168.5.228:51934] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:00.174902 2019] [proxy:error] [pid 119782] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:00.174965 2019] [proxy_fcgi:error] [pid 119782] [client 192.168.5.228:51935] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:02.699501 2019] [proxy:error] [pid 119780] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:02.699670 2019] [proxy_fcgi:error] [pid 119780] [client 192.168.5.153:52856] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:02.764396 2019] [proxy:error] [pid 119783] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:02.764473 2019] [proxy_fcgi:error] [pid 119783] [client 192.168.5.153:52857] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:02.771718 2019] [proxy:error] [pid 119779] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:02.771737 2019] [proxy_fcgi:error] [pid 119779] [client 192.168.5.153:52858] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:08.311131 2019] [proxy:error] [pid 119781] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:08.311165 2019] [proxy_fcgi:error] [pid 119781] [client 192.168.6.52:54219] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:08.421481 2019] [proxy:error] [pid 119782] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:08.421510 2019] [proxy_fcgi:error] [pid 119782] [client 192.168.6.52:54220] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:08.426820 2019] [proxy:error] [pid 119780] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:08.426840 2019] [proxy_fcgi:error] [pid 119780] [client 192.168.6.52:54221] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:10.701730 2019] [proxy:error] [pid 119783] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:10.701761 2019] [proxy_fcgi:error] [pid 119783] [client 192.168.5.185:56087] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:10.792154 2019] [proxy:error] [pid 119779] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:10.792216 2019] [proxy_fcgi:error] [pid 119779] [client 192.168.5.185:56088] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:10.796511 2019] [proxy:error] [pid 119781] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:10.796528 2019] [proxy_fcgi:error] [pid 119781] [client 192.168.5.185:56089] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:16.749131 2019] [proxy:error] [pid 119782] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:16.749165 2019] [proxy_fcgi:error] [pid 119782] [client 192.168.7.11:63603] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:16.804862 2019] [proxy:error] [pid 119780] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:16.804893 2019] [proxy_fcgi:error] [pid 119780] [client 192.168.7.11:63604] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:16.809511 2019] [proxy:error] [pid 119783] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:16.809529 2019] [proxy_fcgi:error] [pid 119783] [client 192.168.7.11:63605] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:21.287723 2019] [proxy:error] [pid 119781] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:21.287755 2019] [proxy_fcgi:error] [pid 119781] [client 192.168.7.112:60168] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:21.302541 2019] [proxy:error] [pid 119782] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:21.302558 2019] [proxy_fcgi:error] [pid 119782] [client 192.168.7.112:60169] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:21.453963 2019] [mpm_prefork:notice] [pid 119777] AH00169: caught SIGTERM, shutting down
                              [Fri May 17 11:29:21.526793 2019] [mpm_prefork:notice] [pid 122687] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2r configured -- resuming normal operations
                              [Fri May 17 11:29:21.526885 2019] [core:notice] [pid 122687] AH00094: Command line: '/usr/sbin/apache2'
                              [Fri May 17 11:29:21.641647 2019] [proxy:error] [pid 122690] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:21.641721 2019] [proxy_fcgi:error] [pid 122690] [client 192.168.7.249:56508] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:21.648806 2019] [proxy:error] [pid 122692] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:21.648874 2019] [proxy_fcgi:error] [pid 122692] [client 192.168.7.249:56509] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:21.694957 2019] [proxy:error] [pid 122691] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:21.695037 2019] [proxy_fcgi:error] [pid 122691] [client 192.168.7.54:57168] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:21.710715 2019] [proxy:error] [pid 122688] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:21.710742 2019] [proxy_fcgi:error] [pid 122688] [client 192.168.7.54:57169] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:25.478574 2019] [proxy:error] [pid 122689] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:25.478623 2019] [proxy_fcgi:error] [pid 122689] [client 192.168.5.74:52161] AH01079: failed to make connection to backend: 127.0.0.1, referer: http://fog.amiltone.com/fog/management/index.php?node=about&sub=kernelUpdate
                              [Fri May 17 11:29:27.713599 2019] [proxy:error] [pid 122690] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:27.713633 2019] [proxy_fcgi:error] [pid 122690] [client 192.168.5.78:55409] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:27.762851 2019] [proxy:error] [pid 122692] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:27.762875 2019] [proxy_fcgi:error] [pid 122692] [client 192.168.5.78:55410] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:27.767744 2019] [proxy:error] [pid 122691] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:27.767763 2019] [proxy_fcgi:error] [pid 122691] [client 192.168.5.78:55411] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:29.769740 2019] [proxy:error] [pid 122688] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:29.769770 2019] [proxy_fcgi:error] [pid 122688] [client 192.168.5.83:51958] AH01079: failed to make connection to backend: 127.0.0.1
                              [Fri May 17 11:29:29.932596 2019] [proxy:error] [pid 122689] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                              [Fri May 17 11:29:29.932625 2019] [proxy_fcgi:error] [pid 122689] [client 192.168.5.83:51959] AH01079: failed to make connection to backend: 127.0.0.1
                              

                              EDIT
                              I change in /etc/php/7.2/fpm/pool.d/www.conf

                              listen=/var/run/php7.2-fpm.sock
                              

                              for

                              listen=127.0.0.1:9000
                              

                              Now i view a 500 error page in WebUI

                              Now The error.log result:

                              [Fri May 17 12:02:45.613004 2019] [proxy_fcgi:error] [pid 123746] [client 192.168.5.144:55354] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Exception: Missing one or more extensions. in /var/www/fog/commons/init.php:394\nStack trace:\n#0 /var/www/fog/commons/init.php(265): Initiator::_extCheck()\n#1 /var/www/fog/commons/base.inc.php(48): Initiator::startInit()\n#2 /var/www/fog/service/getversion.php(30): require('/var/www/fog/co...')\n#3 {main}\n  thrown in /var/www/fog/commons/init.php on line 394\n'
                              

                              Thank’s !

                              george1421G 1 Reply Last reply Reply Quote 0
                              • george1421G
                                george1421 Moderator @Alois
                                last edited by

                                @Alois

                                [Fri May 17 11:29:29.769740 2019] [proxy:error] [pid 122688] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
                                

                                This tells me that php-fpm isn’t running or you have a firewall rule blocking connectivity.

                                Apache should communicate with php-fpm over that loopback network connection on port 9000. The first thing I would check (after resetting anything you changed and rebooting the fog server) is if php-fpm is running in memory with ps aux|grep php-fpm You should see the php-fpm process running. If it is running, then issue the following command to see if it’s listening where it should be netstat -an|grep 9000. That should return a line. If it is listening then we need to understand why apache isn’t communicating correctly.

                                I would also inspect the php-fpm logs in /var/logs. I have also seen where there was 2 versions of php-fpm installed and attempting to run where the system had php-fpm version 5 installed AND php-fpm version 7 with php version 7 installed. But php-fpm5 was configured to start. That was a mess to find and fix.

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Sebastian Roth Moderator
                                  last edited by

                                  @Alois Please try the following commands:

                                  sudo su -
                                  apt-get install php7.2-mysql
                                  phpenmod mysqli
                                  systemctl restart apache2
                                  systemctl restart php7.2-fpm
                                  

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 0
                                  • 1 / 1
                                  • First post
                                    Last post

                                  159

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project