Problems with adding php 7.3

Discussion in 'Installation/Configuration' started by Rikard Jespersen, Sep 2, 2019.

  1. Rikard Jespersen

    Rikard Jespersen New Member

    Hi
    I've got php 5.6, 7.0, 7.1, 7.2 installed in ispconfig but now that I tried to add 7.3 I ran into some trouble. I get "bad gateway" when I try to access a site that I set to use php 7.3 (switching back to an other version still works). Please find below what I've done so far. Anyone know what I might've done wrong, and how to fix it :D

    I've done the following:
    1. I installed the remi release of php 7.3 (currently 7.3.9) and it can be found at /etc/opt/remi/php73 alongside the other versions
    2. I updated the www.conf and changed user and group to nginx and set a new unique listen port "9073"
    3. I created a new instance for php under "system/additional php versions" and named it PHP 7.3 and set the paths
    4. I changed one of my sites to use php 7.3 and that created a file called "web3.conf" in the .../php73/php-fpm.d folder
    5. I restarted the server. But when I try to access the site I get a "bad gateway" and the error logs shows:
      2019/09/02 13:21:57 [crit] 3745#0: *1525 connect() to unix:/var/lib/php5-fpm/web3.sock failed (2: No such file or directory) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: myserver.xx, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web3.sock:", host: "www.myserver.xx", referrer: "http://www.myserver.xx"
    I checked the contents of /var/lib/php5-fpm/ and sure enough no .sock had been created for web3, al my pther sites running of different earlier versions of php had their respective .sock in order.

    I ran the script (as per the instructions in read first) and this is the results:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.1.14p1

    [WARN] Could not connect to mysql with given user data.
    [WARN] Could not use mysql command line to connect to the database. Check your mysql config!

    ##### VERSION CHECK #####

    [INFO] php (cli) version is 7.3.9

    ##### PORT CHECK #####

    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening

    ##### MAIL SERVER CHECK #####

    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.

    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Unknown process (nginx:) (PID 3302)
    [INFO] I found the following mail server(s):
    Postfix (PID 1379)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 1328)
    [INFO] I found the following imap server(s):
    Dovecot (PID 1328)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 1314)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [anywhere]:25 (1379/master)
    [localhost]:953 (1244/named)
    ***.***.***.***:443 (3302/nginx:)
    [anywhere]:993 (1328/dovecot)
    [anywhere]:995 (1328/dovecot)
    [localhost]:10024 (1494/amavisd)
    [localhost]:9000 (1192/php-fpm:)
    [localhost]:10025 (1379/master)
    [localhost]:10026 (1494/amavisd)
    [localhost]:10027 (1379/master)
    [localhost]:9070 (1200/php-fpm:)
    [anywhere]:110 (1328/dovecot)
    [localhost]:9071 (1201/php-fpm:)
    [anywhere]:143 (1328/dovecot)
    [anywhere]:8080 (3302/nginx:)
    [anywhere]:80 (3302/nginx:)
    [localhost]:9072 (1203/php-fpm:)
    [anywhere]:8081 (3302/nginx:)
    [anywhere]:8082 (3302/nginx:)
    ***.***.***.***:53 (1244/named)
    [localhost]:53 (1244/named)
    [anywhere]:21 (1314/pure-ftpd)
    [anywhere]:22 (1199/sshd)
    *:*:*:*::*:25 (1379/master)
    *:*:*:*::*:953 (1244/named)
    *:*:*:*::*:993 (1328/dovecot)
    *:*:*:*::*:995 (1328/dovecot)
    *:*:*:*::*:10024 (1494/amavisd)
    *:*:*:*::*:3306 (1301/mysqld)
    *:*:*:*::*:10026 (1494/amavisd)
    [localhost]10 (1328/dovecot)
    [localhost]43 (1328/dovecot)
    *:*:*:*::*:8080 (3302/nginx:)
    *:*:*:*::*:53 (1244/named)
    *:*:*:*::*:21 (1314/pure-ftpd)
    *:*:*:*::*:22 (1199/sshd)




    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is remi release?
    How were the additional PHP versions installed? I have used this tutorial successfully: https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/
    If the additional PHP version does not work, I would guess some needed PHP module is missing for that version or the ISPConfig setup for that additional version is wrong.
    You are one patch behind the current version.
    I am guessing your operating system is CenOS 7? Is the PHP version that comes with CentOS 7 PHP 7.3? If not, you should change the default PHP back to what it was originally to get back to supported ISPConfig configuration.
    That looks suspicious. Does ISPConfig work properly on that system now? I would at least check default PHP version is set properly.
     
    ahrasis likes this.
  3. Steini86

    Steini86 Active Member

    Your Path is wrong:
    unix:/var/lib/php5-fpm/web3.sock failed (2: No such file or directory)
    should be something like "/var/lib/php73-fpm/" ?!
     
  4. Rikard Jespersen

    Rikard Jespersen New Member

    Thanks, I would agree, but all of my php (7, 7.1, 7.2) are also using the "/var/lib/php5-fpm/" path. In ispconfig I can only set one PHP-FPM socket directory (system configuration/web/php). Perhaps it need to be updated but I haven't read any instructions on if and how.
     
  5. Rikard Jespersen

    Rikard Jespersen New Member

    Thank you.

    Remi-release, sorry I was a bit unclear. It is the repository from which I installed my php packages, as per this:
    https://rpms.remirepo.net/wizard/ and here: https://www.linuxtechi.com/install-php-7-centos-7-rhel-7-server/

    Indeed, I also upgraded my server php version to 7.3 a bit by mistake o_O. And now that I try to find out which version to downgrade to all I can see is that "ispconfig is fully compatible with php 7" on this page: https://www.ispconfig.org/ispconfig/. centOS comes with 5.6 and since it is no longer maintained I throught I'd better nog use it.

    I have now upgraded to the lastest version of ispconfig (3.1.14p2) but that didn't help.

    ISPconfig is working very well on my system. The warning here is because of my password, it contain weird characters which works fine for the system, but when I upgrade and look at this I get errors (I should probably change it ...)

    I took a screenshot of all active php modules before I upgraded, and then checked so that the same were running for 7.3. In ISPconfig all settings are a direct copy of working paths, except php72 is set to php73. I have double checked that all folders contain the same files as well. The only thing that is different is that "/opt/remi/php73/root/usr/bin/ does not contain a php-config wheras all the other versions do. I tried to copy the file and update it accordingly and that did change something. Instead of "502 bad gateway" i get "Encoding error, please notify the site owner"

    Best regards,
    Rikard
     
    Last edited: Sep 3, 2019
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    When you installed PHP 7.3 from Remi's repository, did you remember to check the "multiple versions simultaneously"?
    Have you checked with other users that the 7.3 from Remi's does indeed work properly?
     
  7. Rikard Jespersen

    Rikard Jespersen New Member

    Thank everyone for your time, as it turns out it was my own "rather safe than sorry" approach that got me this time. When I tested the 7.3 version I did it on my site with the least traffic, it just happened to be my oldest site as well. And well, it was not fully compatible with PHP7.3 ... So that is the reason for the encoding error. When I instead tested on a newer site, then it worked just fine.

    The only think that I actually did have to do "extra" was copy the php-config file from an earlier version and update it with the new paths since that file was missing from the new installation o_O.

    So, everything is working just fine, I'll just keep my eyes a bit closer to my logs for a week and see if something strange pops up.

    Thanks again!
    Rikard


    I just "yum-config-manager --enable remi-php73" # and then I installed it along with all the needed modules, and updated the "www .conf" I don't think there is a "multiple versions simultaneously" check anywhere there. I can of course be mistaken.
     

Share This Page