Is there a way to set a different PHP module per Virtual Host?

前端 未结 4 596
南方客
南方客 2021-02-04 14:51

I\'m developing for a bunch of sites on my local machine. Some of those sites ultimately run on php5.3, and some run on php5.2. Is there a way I can setup virtual hosts to use d

4条回答
  •  無奈伤痛
    2021-02-04 15:51

    Either you do as per the above and use different versions of PHP using FastCGI on your machine. But since it's for development, you could also use ie. VirtualBox or VMware server and create 2 virtual machines, one with PHP 5.2 and one with 5.3 (or you could create even more, one per project - that's how I would do it in fact :p).

    Possible benefits : you could use the OS - and the same software versions of ie. apache / mysql - that is used on your external host (that's why I would prefer one VM per project). This might also be beneficial when debugging later on.

提交回复
热议问题