PHPSwitcher: Coult not Update PHP 7.4 to 7.4.16

  • Hi,


    I tried to Update the PHP installations but just the Version 7.4 could not get upgradet to the last release. PHP 8.0 could not get installed at all without Error Messages.
    The Error message:

    Code
    1. [ERROR] main: An error occurred while executing MAKE(1) target(s) for PHP 7.4.16: dh_install: Compatibility levels before 9 are deprecated (level 7 in use)


    What I have to do?

  • Good afternoon fulltilt...

    Excuse my English, I only speak Spanish,

    I have followed your recommendation to incorporate new versions of php.

    It works correctly, it is very comfortable, but I have observed that when we delete a domain this is not deleted from the folder where we have it running.



    Apr 18 10:40:26 coomerc systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
    Apr 18 10:40:26 coomerc php-fpm7.4[10714]: [18-Apr-2021 10:40:26] ERROR: [pool zascoo.es] cannot get uid for user 'vu2003'
    Apr 18 10:40:26 coomerc php-fpm7.4[10714]: [18-Apr-2021 10:40:26] ERROR: FPM initialization failed
    Apr 18 10:40:26 coomerc systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/n/a


    -rw-r--r-- 1 root root root 322 Apr 18 07:34 www.conf
    -rw-r--r-- 1 root root root 1247 Apr 18 10:23 zascoo.es.conf


    Can you give any suggestion to be able to remove to avoid error in php-fpm7.4

    Thanks for everything

    Edited once, last by kurgans ().

  • Good fulltilt,

    I have been testing the script this morning, and I can not get it to work, I have changed some routes ...

    But I have checked and I see that they are all right .., but I get an error when creating the file
    echo $domain >> /var/panel/fpm-db.txt


    awk: fatal: no se puede abrir el fichero `/var/panel/fpm-db.txt' para lectura (No existe el fichero o el directorio)



    I could also see that using the script connection I use MariaDB 10.2

    CONNECT="$MyHOST -u $MyUSER -p$MyPASS $DB_NAME -e"

    The system does not connect correctly

    Can you give me some light

    Thanks for everything as always


    #!/bin/sh
    ##
    # nano /root/check-php-conf.sh
    # chmod +x /root/check-php-conf.sh
    # run /root/check-php-conf.sh via cron job
    ##
    # imscp database details
    MyUSER="check-fpm"
    MyPASS="mypass"
    DB_NAME="imscp"
    # do not change MyHOST variable
    MyHOST="mysql"
    # Servername for email notification
    HostName="Myweb"
    # mail package need installed (apt-get install mailutils)
    AdminEmail="[email protected]"
    # backup path before files are deleted
    BackupPHP="/var/panel/backup/php"
    # do not change
    CONNECT="$MyHOST -u $MyUSER -p$MyPASS $DB_NAME -e"

    # check connection result
    RCOUNT=$($CONNECT "SELECT COUNT(version_fpm_pool_directory_path) FROM php_switcher_version WHERE version_is_default = 0;" -B --skip-column-names)
    if [ $RCOUNT -gt 0 ]
    then
    # get pathes
    paths=$($CONNECT "SELECT version_fpm_pool_directory_path FROM php_switcher_version WHERE version_is_default = 0;" -B --skip-column-names)

    # get stored config paths from database
    $CONNECT "SELECT e.version_id, e.admin_id, e.domain_name, u.version_fpm_pool_directory_path FROM php_switcher_version_admin AS e, php_switcher_version AS u WHERE e.version_id = u.version_id AND u.$
    do
    data1=$(echo $data | awk '{print $4}')
    data2=$(echo $data | awk '{print $3}')
    domain="$data1"/"$data2"\.\conf
    echo $domain >> /var/panel/fpm-db.txt
    done
    ..
    ...
    ...
    ....


    Translated with http://www.DeepL.com/Translator (free version)

  • Ok,,

    I understand ... there must be a value in the SQL so that it can query, if the PHP version is without domains, is when it gives the error,

    at the moment that enters a new domain is adjusted and deleted correctly.

    Thanks

  • you can also remove the delete (rm) parts and use email notification only or set the domain back to the default PHP version before remove/delete it as reseller or administrator

  • Yes, the solution has been to use another method since I don't trust my resellers ...

    I created a new reseller as administrator and added domains to all php versions, so that these not real domains always keep at least one in each version.

    Thanks for everything