Results 1 to 12 of 12

Thread: PHP version list

  1. #1
    Join Date
    Mar 2018
    Posts
    5

    PHP version list

    Hello,

    Is there a way to get a list of what kind of PHP version is used by each domain?

    For example:

    Domain PHP Version
    domain1.com 5.6
    domain2.com 7.2.2
    domain3.com 5.6


    Regards,
    Erik

  2. #2
    Join Date
    Aug 2015
    Posts
    277
    Code:
    grep php /usr/local/directadmin/data/users/*/domains/*.conf
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  3. #3
    Join Date
    Mar 2018
    Posts
    5
    Quote Originally Posted by Awd View Post
    Code:
    grep php /usr/local/directadmin/data/users/*/domains/*.conf
    This only shows:

    php=ON
    php1_select=2
    php2_select=1

    Not the selected version in plain text.

  4. #4
    Join Date
    Aug 2015
    Posts
    277
    You know what your fist PHP is and second, so assume 1. PHP5 and 2. PHP7
    php=ON
    php1_select=2 (= PHP7)
    php2_select=1 (= PHP5)
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  5. #5
    Join Date
    Mar 2018
    Posts
    5
    Quote Originally Posted by Awd View Post
    You know what your fist PHP is and second, so assume 1. PHP5 and 2. PHP7
    php=ON
    php1_select=2 (= PHP7)
    php2_select=1 (= PHP5)

    I agree, for me that isn't a problem. But my other colleagues that work only with the DA portal it is.
    I hoped there was a option in the Portal to see the used/selected PHP version.

  6. #6
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,594
    The CMD_CUSTOM_HTTPD page lists the versions, although not sure if it goes on which version the domain is on first..

  7. #7
    Join Date
    Jun 2012
    Posts
    626
    Quote Originally Posted by Peter Laws View Post
    The CMD_CUSTOM_HTTPD page lists the versions, although not sure if it goes on which version the domain is on first..
    it seem sto only show the default php first no matter what domain using. for example ig 5.6 set as#1 and 7.2 as #2 it just lists each domain with the 2 options and shows (no matter what domain set to) the 1 and 2 versions as set in cutombuild.
    thought maybe would show actual domain usage there but soes not.
    maybe should request to have it show this?

    http://forum.directadmin.com/showthr...356#post287356
    Last edited by dmacleo; 03-13-2018 at 08:18 AM.
    Dave M

  8. #8
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,947
    Some time ago have I written this script:

    https://github.com/poralix/directadm...main_phpver.sh

    The script can be used in bash console to show which PHP version is set for a domain in Directadmin.
    You can use the script to change PHP version for a domain from pre-installed with Custombuild 2.0.

    More details on usage can be found here: https://github.com/poralix/directadm...ree/master/php

    It's not probably simple in usage when we deal with a bulk of domains, but still it can be used in a loop.

    If there is enough interest I could re-write it to a make its usage simpler. Just let me know here or at github.com.

  9. #9
    Join Date
    Jun 2012
    Posts
    626
    Quote Originally Posted by zEitEr View Post
    Some time ago have I written this script:

    https://github.com/poralix/directadm...main_phpver.sh

    The script can be used in bash console to show which PHP version is set for a domain in Directadmin.
    You can use the script to change PHP version for a domain from pre-installed with Custombuild 2.0.

    More details on usage can be found here: https://github.com/poralix/directadm...ree/master/php

    It's not probably simple in usage when we deal with a bulk of domains, but still it can be used in a loop.

    If there is enough interest I could re-write it to a make its usage simpler. Just let me know here or at github.com.
    due to how I use my server(s) it prob would not help me a lot HOWEVER....from the looks of it I think it could help many others so...I would be willing to help test it if you do but I don't have many domains on mine as they are only MY domains and not customers. still the testing may help if you do.
    Dave M

  10. #10
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,947
    Sure, we mostly work in console. The script was written first for own needs, so it's good if it can be useful for others.

    I probably could update the script if you let me know how you want it to work.

  11. #11
    Join Date
    Jun 2012
    Posts
    626
    if I get chance today (we got hit with tons of snow this week so plowing taking my time) I will run it and post some thoughts
    Dave M

  12. #12
    Join Date
    Jun 2012
    Posts
    626
    Quote Originally Posted by zEitEr View Post
    Sure, we mostly work in console. The script was written first for own needs, so it's good if it can be useful for others.

    I probably could update the script if you let me know how you want it to work.
    due to tons of snow falling that week was not able to test hope to start playing with it tomorrow.
    man... 28 inches wet snow plows hard. was in truck 34 hrs straight.
    Dave M

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •