P
P
Pasha2011-07-23 22:22:16
PHP
Pasha, 2011-07-23 22:22:16

How to install two different PHP versions for different virtual hosts on the same Apache (without being tied to the file extension)?

Hello

There is Apache, PHP is connected to it, so

***

LoadModule php5_module "d:\Web\php53\php5apache2_2.dll"
PHPIniDir "d:/Web/php53"

***

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Virtual hosts are connected as usual in the httpd-vhosts.conf file

How can I make different PHP versions (5.2 and 5.3) used for different virtual hosts?

Important: At the same time, in all hosts, the file extension must be .php (that is, tied to a separate extension for the version is not a suitable option)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey, 2011-07-23
@fog

CGI/FastCGI

V
Vladimir Polishchuk, 2011-07-24
@NorthDakota

try including the required php module in httpd-
vhosts.conf, directly in the virtual hosts sections.
do not forget to comment out the connection in the main config.

Y
Yuri Gulyaev, 2012-10-17
@yuri25

There was a need to keep php 5.3 and 5.4 on the same dedicated server. Apache and Nginx are configured similarly to yours. Please write the details and configs who did this or knows how to do it. Thank you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question