Amit Shah
Amit Shah

Reputation: 1380

load mutiple version of php on apache on xampp in windows environment

I was to load multiple version of php on xampp, and using ht-access add handler, so my one application should run in 5.3 php version using its htaccess and another application should use 5.4 php version.

can anybody please help me to deal with this?

Thanks Amit

Upvotes: 0

Views: 426

Answers (2)

Dheeraj Nayak
Dheeraj Nayak

Reputation: 161

The best method is to change the PHP settings in

/apache/conf/extra/httpd-xampp.conf

to reflect the new version of PHP you want to use

In my case I unpacked PHP5.4 to C:\XAMPPLITE\PHP5.4 and then updated key lines in this file such as:

SetEnv PHPRC "C:\\xampplite\\php5.4"

LoadFile "C:/xampplite/php5.4/php5ts.dll"

PHPINIDir "C:/xampplite/php5.4"
You also need to ensure that the correct version of php5apache2_2.dll is installed

To ensure this I copied the new version of php5apache2_2.dll to the Apache modules directory with a unique name, and then modified the configuration to match that:

copy php5.4\php5apache2_2.dll apache\modules\php5apache2_2-5_4.dll
and in the httpd-xampp.conf file

LoadModule php5_module modules/php5apache2_2-5_4.dll

Upvotes: 1

Hexana
Hexana

Reputation: 1135

One way to do this is to have your main version of php set up with mod_php and run all of the others through fast cgi on different ports (i.e. 81, 82, 83 etc).

Upvotes: 1

Related Questions