php有一个等价于python的virtualenv或ruby的沙盒? [英] Does php have an equivalent to python's virtualenv or ruby's sandbox?

查看:296
本文介绍了php有一个等价于python的virtualenv或ruby的沙盒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯于使用python的virtualenv工具创建单独的环境,可以模拟我写的项目的部署环境。

I'm used to using python's virtualenv tool to create separate environments that can mimic deployment environments for projects I write.

现在,我要工作在php项目,我想知道是否有任何等价的?具体来说,我希望能够在一个(较旧的)php版本的apache上运行一个虚拟主机,而其他的都运行在正常的最新版本。

Now, I'm going to be working on a php project and I'm wondering if there's any equivalent to that? Specifically I'm hoping to be able to run one virtualhost on apache with one (older) version of php, while everything else runs on the normal up to date version.

我的开发机器运行ubuntu 11.04,所以在该平台上工作的解决方案将是首选。

My development machine is running ubuntu 11.04, so solutions that work on that platform would be preferred.

推荐答案

假设你使用mod_php ,没有办法将多个不同的版本加载到同一个Apache实例中。你可以运行多个不同的版本,如果你运行PHP作为CGI或FastCGI,但这本身会引入一些行为与mod_php的差异。

Assuming that you are using mod_php, there is no way to load multiple different versions into the same Apache instance. You can run multiple different versions if you're running PHP as CGI or FastCGI, but this will itself introduce some differences in behavior from mod_php.

这篇关于php有一个等价于python的virtualenv或ruby的沙盒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆