Z
Z
zeuss562017-03-04 13:42:42
PHP
zeuss56, 2017-03-04 13:42:42

How to use different PHP versions at the same time for different hosts in Open Server?

I work on Windows 10 x86, Open Server 5.2.6 Ultimate.
Installed FastCGI and PHP-NTS 5.2-7.1
I don't want to constantly switch the PHP version, I would like to set it up and forget it once.
Some projects are tied to a specific version of PHP and do not work on new ones. For example, there is a project with Zend Guard Loader 5.3 bytecode and PhpMyAdmin that requires PHP 5.5
On many hostings, you can set the PHP version via .htaccess AddHandler like this:

spoiler
# To switch to PHP 4.4:
AddHandler application/x-httpd-php4 .php .php4 .php3
# To switch to PHP 5.0:
AddHandler application/x-httpd-php5 .php .php5 .php4 .php3
# To switch to PHP 5.1:
AddHandler application/x-httpd-php51 .php .php5 .php4 .php3
# To switch to PHP 5.2:
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3
# To switch to PHP 5.3:
AddHandler application/x-httpd-php53 .php .php5 .php4 .php3
# To switch to PHP 5.4:
AddHandler application/x-httpd-php54 .php .php5 .php4 .php3
# To switch to PHP 5.5:
AddHandler application/x-httpd-php55 .php .php5 .php4 .php3
# To switch to the secure PHP 5.2 with Suhosin patch:
AddHandler application/x-httpd-php52s .php .php5 .php4 .php3

If it doesn't work inside Open Server, then how do you do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-03-04
@webinar

There is a save settings. Switch between them, it's 1 click. You still don't work on 15 projects at the same time. And the presence of a newer version does not prevent the launch of projects written under the old one. You made a problem out of nothing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question