List all PHP-versions for all domains

Mine is now showing php versions in both enhanced and evolution and I didn't install a plugin. I don't think I did anything to change it. It just started showing.
 
Hi,

Where can I find (or change) the PHP version used by webapps like Roundcube? Is this always PHP1?

And how easy is it to change my PHP1? My PHP1 is 7.2 and my PHP3 is 7.4. I'd like to change PHP1 to 7.4. What's te best way to do that? Can I simply change this? Or do I have to remove the PHP3 first....?

Thanks,
GJ
 
It's just not 1 year so we can just bump it. Does anyone know the new command to do this because....

egrep php3_select=1 /usr/local/directadmin/data/users/*/domains/*.conf
this won't work anymore as there is no php3_select=1 anymore in the domains configuration. Seems things changed, or is this a bug?

The config shows it like this now if you select the 2nd php option from custombuild:
php1_select=2
php2_select=0

php2_select is present but not used anymore and php3_select or php4_select not even present.

However, one should think, oke so we use php1_select=1, 2, 3 or 4, which sounds logical but won't work.
Because sites which did not have made any choice will have no phpX_select=X setting present in that domain.tld.conf file.

Is it correct to assume that everything is php default when no result, and for other choices we need this command:
egrep php1_select=1 (or 2 or 3 or 4) /usr/local/directadmin/data/users/*/domains/*.conf
and assume for all files not mentioned they are on the default php version.
 
 
No, sorry, that is for selecting versions, the other topic is about that.
This thread is about listing and getting an overview, not about changing.
 
the first post of this thread?
OH I did think we were going that far back. This feature doesn't exist natively. If it does I have never seen it. Some one would need to make a feature request I think.
 
Well that far back... it's still the title. :) The rest is in fact a bit off-topic.

It's indeed nothing which exists nativaly. But if the other issue was fixed, then the original command could be used.
Can still be used, except that one must remember that none displayed domains are set to the default php version.

Maybe @kristian is able to use part of his script to change php selection, to use the non-default to list all domains without a php1_selection setting as the current php default.
But it's not really something we'd really need. It just came to my mind that this listing suddenly didn't work anymore either.
 
Thank you I've seen that solution already.
But I don't want to login to DA every time ad admin, I'm looking for a commandline option because I almost exclusively work via SSH if possible.
 
Maybe @kristian is able to use part of his script to change php selection, to use the non-default to list all domains without a php1_selection setting as the current php default.

The php-version-selection script ran without arguments will just print domains and their php version, so this would work. Example:

Code:
# php-version-selections
<redacted domain1>        7.4:0 (no config - using default)
<redacted domain2>        7.4:1 (selected version)
<redacted domain3>        8.0:3 (selected version)
<redacted domain4>        7.4:1 (selected version)

The script is available at https://gitlab.com/nordhost/da-scripts/-/blob/master/php-version-selections if anyone want to take a look.
 
@kristian or @Richard G
I get on Debian 11
Code:
redacted        no:2 (selected version)
redacted        7.4:0 (no selection - using default)
redacted        7.4:0 (no selection - using default)
redacted        no:2 (selected version)
redacted        7.4:0 (no selection - using default)

What does the No mean?
 
If it's selected version it should mean what you have in number 2 php selection.
Do you have 2 php versions to select from?

I do have differences in no selection, I got this:
7.4:0 (no selection - using default)
and got this:
7.4:0 (no config - using default)

So somewhere the scripts sees a difference between no selection and no config. But I don't mind, it's clear to me.
 
@kristian or @Richard G
I get on Debian 11
Code:
redacted        no:2 (selected version)
redacted        7.4:0 (no selection - using default)
redacted        7.4:0 (no selection - using default)
redacted        no:2 (selected version)
redacted        7.4:0 (no selection - using default)

What does the No mean?
I guess in this situation the domain has selected PHP version number 2, but in options.conf, there's a "no" for php2_release. Is this the case? I'm not actually sure which version would be used for that scenario..
 
I figured it out..
At one time I had php 8 (2) and 7.4 (1) installed. The 2 no domains were set to php 8
Then uninstalled php 8. So it must fall back to position 1 if you remove all other positions.
 
Back
Top