Want more timely Centmin Mod News Updates?
Become a Member

Current PHP Version / Latest PHP Available

Discussion in 'Forum Feedback & Suggestions' started by Itworx4me, Mar 19, 2020.

  1. Itworx4me

    Itworx4me Active Member

    299
    27
    28
    Mar 14, 2017
    Ratings:
    +48
    Local Time:
    7:16 PM
    Nginx 1.25.X
    MariaDB 10.6.X
    Currently when you exit out of centmin it gives you the current and available Ngnix versions. Is it possible to get the current / latest versions of php too?


    Thanks,
    Itworx4me
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:16 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Something i have played with but getting accurate version numbers is tricky as php.net is always out of date and php github repo release versions has limitations on it's API queries and not always accurate. You can see my attempts at centminmod/get-php-versions
    Code (Text):
    ./get-php-ver.sh
    7.4.4
    7.3.16
    7.2.29
    7.1.33
    7.0.33
    5.6.40
    5.5.38
    

    Code (Text):
    ./get-php-ver.sh 74
    7.4.4
    
    ./get-php-ver.sh 73
    7.3.16
    
    ./get-php-ver.sh 72
    7.2.29
    
    ./get-php-ver.sh 71
    7.1.33
    
    ./get-php-ver.sh 70
    7.0.33
    
    ./get-php-ver.sh 56
    5.6.40
    

    and get latest version of installed PHP major branch
    Code (Text):
    ./get-php-ver.sh $(php-config --version | awk -F '.' '{print $1$2}')
    7.4.4
    

    but as it isn't always accurate - especially when php releases alpha, rc and beta versions on github. It is still a work in progress

    though if it was added, it would look something like this
    Code (Text):
    ===============================================================================
    * Nginx Update May Be Available via centmin.sh menu option 4
    * see https://centminmod.com/nginx.html#nginxupgrade
    ===============================================================================
    * Current Nginx Version:           1.17.8
    * Latest Nginx Mainline Available: 1.17.9 (centminmod.com/nginxnews)
    ===============================================================================
    
    
    ===============================================================================
    * PHP Update May Be Available via centmin.sh menu option 5
    * see https://community.centminmod.com/forums/18/
    ===============================================================================
    * Current PHP Version:           7.2.28
    * Latest PHP Mainline Available: 7.2.29
    ===============================================================================
    
    ===============================================================================
     Centmin Mod local code is up to date at /usr/local/src/centminmod
     no available updates at this time...
    ===============================================================================
     
    Last edited: Mar 19, 2020
  3. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:16 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. Itworx4me

    Itworx4me Active Member

    299
    27
    28
    Mar 14, 2017
    Ratings:
    +48
    Local Time:
    7:16 PM
    Nginx 1.25.X
    MariaDB 10.6.X
  5. Itworx4me

    Itworx4me Active Member

    299
    27
    28
    Mar 14, 2017
    Ratings:
    +48
    Local Time:
    7:16 PM
    Nginx 1.25.X
    MariaDB 10.6.X
    I get the following errors:

    Code (Text):
    /usr/local/bin/getphpver: line 16: jq: command not found
    /usr/local/bin/getphpver: line 17: jq: command not found
    /usr/local/bin/getphpver: line 18: jq: command not found
    /usr/local/bin/getphpver: line 19: jq: command not found
    /usr/local/bin/getphpver: line 20: jq: command not found
    /usr/local/bin/getphpver: line 21: jq: command not found
    /usr/local/bin/getphpver: line 22: jq: command not found
    /usr/local/bin/getphpver: line 23: jq: command not found
    /usr/local/bin/getphpver: line 24: jq: command not found
    /usr/local/bin/getphpver: line 25: jq: command not found
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    12:16 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah older 123.09beta01 installs didn't install jq YUM package like newer installs do. Just run
    Code (Text):
    yum -y install jq

    I'll correct this in next 123.09beta01 update