同一盒上有多个PHP版本 [英] Multiple PHP versions on the same box

查看:91
本文介绍了同一盒上有多个PHP版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可能在同一个盒子上运行多个版本的PHP(例如rails).这是我的问题,我需要开始在一个新项目上进行开发,并打算为其使用PHP 5.3,以便可以使用最新的Zend框架和活动记录.
但是,我需要用来托管我的应用程序的计算机具有PHP 4.4,并且那里还托管着其他几个应用程序.我不想升级服务器上的PHP版本,因为过去在升级PHP版本和不推荐使用的功能时遇到了很多问题.
我想知道是否可能在同一个盒子上有多个PHP版本,然后以某种方式指定您希望应用程序加载的版本(类似于rails)

Is it possible to have multiple versions of PHP running on the same box ( like rails ) . Here is my problem , I need to start development on a new project and was planning to use PHP 5.3 for it so that I can use the latest Zend framework and active record with it .
However the machine where I need to host my application has PHP 4.4 and there are several other applications hosted there . I do not want to upgrade the PHP version on the server as in the past I have faced a lot of issues while upgrading the PHP version and deprecated functions .
I was wondering if it is possible to have multiple version of PHP on the same box and then somehow specify the version that you want your application to load ( similar to rails )

推荐答案

是的,有可能.实际上,许多服务器都以这种方式运行.您可能会不时看到.php4和.php5扩展名,指示应使用特定版本的脚本.

Yes, it is possible. In fact, many servers operate this way. You may see .php4 and .php5 extensions from time to time indicating which version that particular script should be handled with.

ServerFault解决了这个问题

ServerFault addressed this question

彼此并排运行php4和php5

这篇关于同一盒上有多个PHP版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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