Solved php version selector per domain not exist and changing domain config or .htaccess not works

dm800pvr

Verified User
Joined
Jul 6, 2012
Messages
16
Hi, I'm stuck between changing php version for 2 domains

domain1=>7.4
domain2=>5.6


/usr/local/directadmin/custombuild/options.conf
==========
# PHP Settings
php1_release=7.4
php1_mode=php-fpm
php2_release=5.6
php2_mode=php-fpm

./build php
./build rewrite_confs




/usr/local/directadmin/custombuild# ps aux | grep php-fpm
=============This shows both version already installed!
root php-fpm: master process (/usr/local/php74/etc/php-fpm.conf)
root php-fpm: master process (/usr/local/php56/etc/php-fpm.conf)



=======
Method#1 changing .htaccess

=======
Method#2 changing config domain file (php1_select=2 #for 5.6)
===========
UseCanonicalName=OFF
active=yes
bandwidth=unlimited
cgi=ON
defaultdomain=no
domain=......
ip=......
open_basedir=ON
php=ON
php1_select=2
quota=unlimited
safemode=OFF
ssl=OFF
suspended=no
username=.....

Method#3 is php version selector which is not exist on my evo skin of directadmin (both admin and reseller)
So I used custom plugin named " Select the PHP version per domain" and it won't work either and do not compile php 5.6

More info
grep php /usr/local/directadmin/data/users/*/domains/*.conf
/usr/local/directadmin/data/users/...../domains/......com.conf: php1_select=2

Which shows my domain2 already set to 5.6 but will open white page however first default php version which is 7.4 works fine
Another important thing if I change order to
# PHP Settings
php1_release=5.6
php2_release=7.4
5.6 works fine and 7.4 opens white page for domain 1!!
Any Idea?
 
there also file like:
/usr/local/directadmin/data/users/USERNAME/php/php-fpm74.conf
with path to socket and in httpd.conf and/or nginx.conf path to socket too.
but better to fix PHP selector in EVO skin, maybe you didn't find it?
In domain setup click on domain name
 

Attachments

  • 06-11-2023 09-20-27.jpg
    06-11-2023 09-20-27.jpg
    219.8 KB · Views: 14
Zhenyapan! you made my day man! millions of likes (y)
Quick exact directly point !

ThanksThanksThanks :)
 

Attachments

  • 5.6.png
    5.6.png
    4.8 KB · Views: 7
Back
Top