PHP version list

ErikEnl

Verified User
Joined
Mar 2, 2018
Messages
5
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
 
Code:
grep php /usr/local/directadmin/data/users/*/domains/*.conf
 
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)
 
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.
 
The CMD_CUSTOM_HTTPD page lists the versions, although not sure if it goes on which version the domain is on first..
 
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/showthread.php?t=56092&p=287356#post287356
 
Last edited:
Some time ago have I written this script:

https://github.com/poralix/directadmin-utils/raw/master/php/change_domain_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/directadmin-utils/tree/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.
 
Some time ago have I written this script:

https://github.com/poralix/directadmin-utils/raw/master/php/change_domain_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/directadmin-utils/tree/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.
 
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.
 
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
 
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.
 
PHP version list plugin

Since I found it hard to find out which users / domains are still running on an older PHP version, I created a small plugin to list all the users / domains with the active PHP version.
You can find the code here or download the plugin file from here.

As far as I tested this myself it has the following requirements:
* DirectAdmin 1.55 and up
* PHP 5.6 and up
* Custombuild 2.0 (for the different PHP versions installation)
* DirectAdmin via https (httpsocket is working via ssl://...)
* Max 2 different installed PHP versions, via Custombuild 2.0
* Works best with the enhanced skin
 
  • Like
Reactions: BBM
Some time ago have I written this script:

https://github.com/poralix/directadmin-utils/raw/master/php/change_domain_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/directadmin-utils/tree/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.

I would help test it in the event that you do yet I don't have numerous areas on mine as they are just MY spaces and not clients
 
Well, it's good. I'd appreciate any feedback on the script usability and functionality. Just let me know how much user-friendly do you find it, and whether or not you would like anything to change.

The script is working fine if to speak about its functionality, i.e. it is doing well what it is designed to do.
 
Well, it's good. I'd appreciate any feedback on the script usability and functionality. Just let me know how much user-friendly do you find it, and whether or not you would like anything to change.

The script is working fine if to speak about its functionality, i.e. it is doing well what it is designed to do.
I found it relatively easy to use and it was easier to use the script than to change php from 50 accounts individually

I had to make a modification to the script and I confess that I don't know if it was right

I don't understand programming, but after a few hours of testing I was able to get the script to change the php from 1 to 4 (instead of 2)

Could have an option at the top of the code informing which php position you want to use

I apologize, I'm using translator
 

Attachments

  • change_domain_php_4.zip
    1.3 KB · Views: 121
Back
Top