Custom php version (5.6) not working, newers are ok

Discussion in 'ISPConfig 3 Priority Support' started by mlnzigzag, Apr 28, 2020.

  1. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    I have a webserver running ispconfig 3.1.14p2 on Ubuntu 18.04 LTS
    I have default php-fpm version running (7.2) and it's working fine.
    I have compiled and configured version 7.3 according to this how to and it's working fine too.
    I did as well with version 5.6 (still needed somewhere for backward compatibility/quiet living with lazy developers) but the website will stop working, and show the default ISPconfig 503 Error.
    [​IMG]

    In the vhost's error log, I've found those lines corresponding to each browser refresh of the website:

    Code:
    [Tue Apr 28 10:41:19.949308 2020] [proxy:error] [pid 11215] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php7.2-fpm/web77.sock (*) failed
    [Tue Apr 28 10:41:19.949424 2020] [proxy_fcgi:error] [pid 11215] [client 1.2.3.4:13728] AH01079: failed to make connection to backend: httpd-UDS
    I don't know why it's still seeking for 7.2 websock.. By the way I did exactly as well for php 7.3, and it just works.
    How to further diagnose and get rid of this?

    Server details follows:
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That's ok, it is not seeking the PHP 7.2 socket. The directory
    /var/lib/php7.2-fpm/ is the socket dir for all php versions on your system, so it's not related to PHP 7.2.

    Please post the content of the web77 pool file.
     
  3. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Thanks a lot, here it is:
    Code:
    [email protected]:~# cat /opt/php-5.6/etc/php-fpm.d/web77.conf
    [web77]
    
    listen = /var/lib/php7.2-fpm/web77.sock
    listen.owner = web77
    listen.group = www-data
    listen.mode = 0660
    
    user = web77
    group = client29
    
    pm = dynamic
    pm.max_children = 10
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 5
    pm.max_requests = 0
    
    chdir = /
    
    env[HOSTNAME] = $HOSTNAME
    env[TMP] = /var/www/clients/client29/web77/tmp
    env[TMPDIR] = /var/www/clients/client29/web77/tmp
    env[TEMP] = /var/www/clients/client29/web77/tmp
    env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    
    php_admin_value[open_basedir] = /var/www/clients/client29/web77/web:/var/www/clients/client29/web77/private:/var/www/clients/client29/web77/tmp:/var/www/customerdomain.it/web:/srv/www/customerdomain.it/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom
    php_admin_value[session.save_path] = /var/www/clients/client29/web77/tmp
    php_admin_value[upload_tmp_dir] = /var/www/clients/client29/web77/tmp
    php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -f [email protected]"
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Looks fine so far, please post the output of:

    ls -la /var/lib/php7.2-fpm/web77.sock

    did you try to restart php-5.6-fpm service?

    One thing that can happen is if a service has a init script and a systems file, when you start it by init script, then it can't be restarted by systems and vice versa. ISPConfig defaults to systemd, if both options are available. This means that if you would have started the service by init script, then ispconfig would not be able to apply changes by using systemd. In that case, stop the service by using its init script, then start it again using systemctl command.
     
  5. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Code:
    [email protected]:~# ls -la /var/lib/php7.2-fpm/web77.sock
    srw-rw---- 1 web77 www-data 0 Apr 28 11:18 /var/lib/php7.2-fpm/web77.sock
    This while the site has default PHP-FPM.
    Notice the comment ## in the image below, after setting fpm 5.6 in ispconfig the web77 sock goes away.
    I also ensured there is no init script and stopped /started fpm5.6. Wish I understood your instruction correctly.

    [​IMG]
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, this means just that php-5.6-fpm is not creating the socket file either because it fails or because it was not reloaded correctly. Did you do what I suggested in terms of stopping it with its init script, if available, and then using systemctl command to start it again?
     
  7. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Yes, I did. Regarding the init/systemctl things I did, it's all in the image. Sorry if it's unclear because sometimes I've hit tab for autocompletion, take the time to read one line at a time and tell me if I missed something.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the php-fpm-conf file of the 5.6 version, you might have missed setting the include directory /opt/php-5.6/etc/php-fpm.d there.
     
  9. mlnzigzag

    mlnzigzag New Member HowtoForge Supporter

    Exactly! I missed a piece of the how to.. sorry! :(
    BTW congrats to your troubleshooting skills, you are really a PRO!

    Code:
    [email protected]:~# grep -v '^\;\|^\ ' /opt/php-5.6/etc/php-fpm.conf
    [global]
    pid = run/php-fpm.pid
    [www]
    user = www-data
    group = www-data
    listen = 127.0.0.1:8997
    pm = dynamic
    pm.max_children = 5
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3
    
    Added the include at the end of the file and it now works as expected.
    Code:
    include=/opt/php-5.6/etc/php-fpm.d/*.conf
     
    till likes this.

Share This Page