PHPMyAdmin - Error 503 - Service unavailable

Discussion in 'Installation/Configuration' started by svenner, May 27, 2022.

  1. svenner

    svenner New Member

    hi,

    i got an error an my ispconfig server.
    I have upgrade the server from Centos 7 to AlmaLinux 8.5, everything works fine since 5 weeks.
    Now i got the error when i want to open the phpmyadmin webinterface over the url https://%server-hostname%/phpmyadmin

    i´ve tried to reinstall phpmyadmin but it wont help.
    i´ve checked the www.conf files, too

    the log show the following error when i want to access the webinterface: (logfile from /var/log/ispconfig/httpd/%server-hostname%/error.log)

    Code:
    [Fri May 27 16:26:47.234135 2022] [proxy:error] [pid 1085525:tid 140327713478400] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/opt/remi/php81/run/php-fpm/www.sock (*) failed
    [Fri May 27 16:26:47.234186 2022] [proxy_fcgi:error] [pid 1085525:tid 140327713478400] [client %IP%:48555] AH01079: failed to make connection to backend: httpd-UDS
    
    i can not say if the upgrade to almalinux brings up the error

    informationen about the server:

    PHP 7.2 (comes with the installation of the server)
    additional php versions (php 7.4, 8.0, 8.1)
    OS: AlmaLinux release 8.6
    webserver: apache 2.4.37

    screenshot from the message in the attachment (in german)


    thanks for your support
     

    Attached Files:

  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Is there a vhost (website) for that hostname?
     
  3. svenner

    svenner New Member

    yes, a website for the hostname is active and working normally
     
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Does php work at all on that site? I would guess not, from that error, but try a simple phpinfo() page and ensure php runs there, then move to phpmyadmin the specific setup.
     
  5. michelangelo

    michelangelo Active Member

    Make sure that the www.conf of the corresponding php81 service is configured to listen as a socket and also make sure that SELinux is set to permissive mode and last but not least make sure that the service php81-php-fpm actually runs at all.

    Oh and by the way, did you configure the access to phpmyadmin or have you left it to the ISPConfig defaults?
     
    Jesse Norell likes this.
  6. svenner

    svenner New Member

    thanks for your hints

    @Jesse Norell
    phpinfo file works fine on the vhost

    @michelangelo
    the www.conf is configure with
    listen = /run/php-fpm/www.sock

    and the service runs normally, selinux is diabled (currently)
     
    Last edited: Jun 1, 2022
  7. michelangelo

    michelangelo Active Member

    That doesn't look like the www.conf file of the php81-php-fpm service or you've modified this file.
    The php81-php-fpm's www.conf file is located in this directory: /etc/opt/remi/php81/php-fpm.d

    Also what you've quoted in your first post looks more like a separate problem to me, unless you've modified your Apache configuration so that it differs from the default configuration/behavior.

    The next two things you could check:
    1. Have you also checked for errors/hints in /var/log/httpd/error_log?
    2. Did you also create a dedicated vhost for the server name in ISPConfig?
    If so, disable it and then try it again.
     
    Last edited: Jun 3, 2022
  8. svenner

    svenner New Member

    hi,

    sorry for the delay.

    the problem is really strange. today i had a little bit time to look for the problem, so this is the status right now.

    the webinterface of phpmyadmin works....but....

    the server normally runs with php 7.2, default version installed on the server, but now the webinterface of phpmyadmin shows php 8.1

    i have change the www.conf file under "/etc/opt/remi/php81/php-fpm.d/www.conf" and change the line
    listen=127.0.0.1:9081 to
    listen=/var/opt/remi/php81/run/php-fpm/www.sock

    after that the error message was --> "permission denied" access www.sock in /var/opt/remi/php81/run/php-fpm/www.sock
    because the owner of this created file is root, so when i change the permissions of this file to apache:apache the webinterface of phpmyadmin works fine

    the problem is, when the service php81-php-fpm is restarted the permissions of www.sock are back to root

    i dont understand the problem ???

    thanks
     
  9. michelangelo

    michelangelo Active Member

    Usually the default PHP handler (which is often mod_php, unless configured differently) is used by ISPConfig configs which would be in theory your PHP 7.2.

    However, since newer HTTPD 2.4 versions are shipped with a non prefork worker setting, Remi has added a workaround for such system that'll utilise the most recent SCL PHP version (if 8.1 is the newest SCL, then it's 8.1) instead of PHP 7.2 which is default in EL8.

    So, in case of the PHP 8.1 SCL package by Remi you'll find in the conf file /etc/httpd/conf.d/php81-php.conf the following lines:

    Code:
    # Redirect to local php-fpm if mod_php (5, 7 or 8) is not available
    <IfModule !mod_php5.c>
      <IfModule !mod_php7.c>
        <IfModule !mod_php.c>
          # Enable http authorization headers
          SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    
          <FilesMatch \.(php|phar)$>
              SetHandler "proxy:unix:/var/opt/remi/php81/run/php-fpm/www.sock|fcgi://localhost"
          </FilesMatch>
        </IfModule>
      </IfModule>
    </IfModule>
    As you can see, if no mod_php.c is present, it will set the default PHP handler to PHP 8.1.
    That's why PHP 8.1 is listed in the PMA settings and not PHP 7.2.

    Furthermore you seem to have some kind of additional misconfiguration since I don't have any trouble with Remi's PHP and PMA packages.
    Did you install PMA also from Remi Repo, or from a different source?

    You should also compare my php81-php.conf with yours, because on my system PMA just works without any issues (commented lines removed):

    Code:
    [www]
    user = apache
    group = apache
    listen = /var/opt/remi/php81/run/php-fpm/www.sock
    listen.acl_users = apache
    listen.allowed_clients = 127.0.0.1
    pm = dynamic
    pm.max_children = 50
    pm.start_servers = 5
    pm.min_spare_servers = 5
    pm.max_spare_servers = 35
    slowlog = /var/opt/remi/php81/log/php-fpm/www-slow.log
    php_admin_value[error_log] = /var/opt/remi/php81/log/php-fpm/www-error.log
    php_admin_flag[log_errors] = on
    php_value[session.save_handler] = files
    php_value[session.save_path]    = /var/opt/remi/php81/lib/php/session
    php_value[soap.wsdl_cache_dir]  = /var/opt/remi/php81/lib/php/wsdlcache
    
     
    Last edited: Jul 13, 2022

Share This Page