Running CMS with more PHP versions on local Apache servers

Rate this item
(3 votes)

The web development is deep marked by manifold multi-version environment. Different versions of browsers as well as scripting languages, etc. are high appeal for developer work. Very convinient way for development with multiple versions of PHP on local computer is here possibility to arrange more local Apache servers parallel running each with different version of PHP as shown on next figure :

It is necessary to mention significant property of most popular CMS (Joomla, Drupal, WordPress,..) which configuration settings does not include URL root of application. The database definitions are relative to the installation root of CMS. Taking this fact into account we can arrange the development environment in very advantageous way.

To run shown two servers on one developer PC you need 2 Apache server installations (in 2 different directories and started/stopped with separate services) as well as 2 installations of different versions of PHP (in 2 different directories). The key point is here to set servers for responding on two different ports – e.g. 80 and 81. Then the configuration in httpd.conf is following (shown only part relating to port setting and PHP linking) :

Apache Server #1

Listen 80
LoadModule php5_module “c:/Servers/php_523/php5apache2_2.dll”
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir “c:/Servers/php_523″

Apache Server #2

Listen 81
LoadModule php5_module “C:/Servers/php_533/php5apache2_2.dll”
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir “c:/Servers/php_533″

When you have made shown setup then you can call your application with PHP#1 as http://localhost/… and the same application running with PHP#2 as http://localhost:81/

Read 3571 times Last modified onWednesday, 13 June 2012 10:17

Only registred users have rights to post comments. Please log-in or create an account.

We have 51 guests and no members online
Copyright © 2015 JotComponents
We have 51 guests and no members online
Copyright © 2017 JotComponents