Version PHP Sub-folder

Hashut

Verified User
Joined
Apr 6, 2011
Messages
56
Hello
I have 2 php version installed on the server 7.3 and 5.6
can I
Public_html <PHP7.7 version
and
Public_html / sub-folder <PHP5.6

because .htaccess it doesn't work
thank you
 
apache
php 7.3
php 5.6
public_html> php 7.2

and I would like in the php 5.6 sub-folder
 
in fact it is just for a subfolder that I need to change the php version there would be no way to change via a .htaccess
To make a long story short an old php site inserted in a wordpress everything works very well in php5.6 but I would like to put the wordpress part in php7.3.16 and leave the part inserted in php5.6

the .htaccess I tested all that I know and find on the net no way that the sub-folder is in a different version
thank you
 
Ughh... Finally solved for my purpose -- the AddHandler and SetHandler did the trick!!!

For those struggling with this issue on FPM/FastCGI
just add .htaccess on the folder you want to modify php version and include the ff:
please note the value of the AddHandler corresponds with the value found in your httpd conf.

.htaccess file
========
AddHandler "proxy:unix:/usr/local/php56/sockets/ult3pult3.sock|fcgi://localhost" .inc .php .phtml .php56
SetHandler "proxy:unix:/usr/local/php56/sockets/ult3pult3.sock|fcgi://localhost"
 
Back
Top