I have Apache 2.4 and php 5.4 installed on Windows for development. I do not use Virtual Hosts for my projects since I tend to work on different machines and keeping the hosts file synced is a bit of a hassle, besides, typing [localhost
...] works just fine for me.
I have had some problems with doing projects that required different php versions on the production server, so now I have multiple php versions installed in different directories and simply rename php/ to php54/ and php53/ to php whenever I need another version. But this is tedious, esp. when working on more than one project at a time.
I noticed on one of my client's web hosting that they allow you to set:
AddHandler x-httpd-php53 .php
in the htaccess. Effectively changing from php 5.2 to 5.3. Now that is a perfect solution. That way i can just set the version I need in the htaccess file on a per project basis.
But I cannot find anywhere how to set this up? Perhaps partly because I am not very proficient with Apache configurations.
Can someone explain how to set this up like this where I use php5.4 as default, and being able to switch to 5.3 and 5.5 in htaccess.