Wanabo
Verified User
- Joined
- Jan 19, 2013
- Messages
- 339
This is bugging me for some time now.
I have 4 php versions installed. (2 and 3 are actually obsolete)
php1_release=5.6
php1_mode=php-fpm
php2_release=7.1
php2_mode=php-fpm
php3_release=7.2
php3_mode=php-fpm
php4_release=7.3
php4_mode=php-fpm
I haven an old script that does not work with php7, but some files are compatible with php7
So I want to execute some php files as php version 7.3 where the rest of the php files are default executed as php 5.6.
By searching the forums I found:
http://forum.directadmin.com/showthread.php?t=57934&p=295880#post295880 and
https://forum.directadmin.com/showthread.php?t=52531&p=286178#post286178
I created an .htaccess file with this content and put it in a subdirectory:
Created a phpinfo file test.php in the same directory with content:
The test.php file is not parsed as php 7.3 but is still php 5.6.
When I change the extension to test.php73 the file is parsed as php 7.3.
But that is not what I want. Somehow the default overrides the htaccess file.
How to make test.php parsed by php 7.3?
I have 4 php versions installed. (2 and 3 are actually obsolete)
php1_release=5.6
php1_mode=php-fpm
php2_release=7.1
php2_mode=php-fpm
php3_release=7.2
php3_mode=php-fpm
php4_release=7.3
php4_mode=php-fpm
I haven an old script that does not work with php7, but some files are compatible with php7
So I want to execute some php files as php version 7.3 where the rest of the php files are default executed as php 5.6.
By searching the forums I found:
http://forum.directadmin.com/showthread.php?t=57934&p=295880#post295880 and
https://forum.directadmin.com/showthread.php?t=52531&p=286178#post286178
I created an .htaccess file with this content and put it in a subdirectory:
Code:
<FilesMatch "\.(php|php73)$">
AddHandler "proxy:unix:/usr/local/php73/sockets/someusername.sock|fcgi://localhost" .php .php73
</FilesMatch>
Code:
<?php phpinfo(); ?>
When I change the extension to test.php73 the file is parsed as php 7.3.
But that is not what I want. Somehow the default overrides the htaccess file.
How to make test.php parsed by php 7.3?