我有一台服务器,托管着许多 PHP5 网站。 我有一个专为 PHP4 设计的旧网站,我在服务器上也需要它。
最初,我只是打算将代码移植到 PHP5,但发现这个过程更加紧张,我没有时间,所以我需要让 PHP4 和 PHP5 在同一个 Server 2008 机器上运行。
我认为如果我可以设置要加载哪个 PHP.ini 文件,这应该相当容易。 我记得在某处读过有关如何设置 PHP 将加载哪个 PHP.ini 文件的信息,但我似乎无法在任何地方找到该文章。
有谁知道如何在 IIS7 上并行运行 PHP4 和 PHP5,或者如何指定为不同版本的 PHP 加载哪个 PHP.ini 文件?
谢谢,
瑞安.
I have a server that hosts a bunch of sites in PHP5. I have an old site that was designed for PHP4 that I also need on the server.
Originally, I was just going to port the code to PHP5, but have discovered that process is more intense that I have time for so I need to have PHP4 and PHP5 running on the same Server 2008 box.
I think this should be fairly easy if I can set which PHP.ini file to load. I remember reading somewhere about how you could set which PHP.ini file PHP would load, but I can't seem to find that article anywhere.
Does anyone know how to run PHP4 and PHP5 parallel on IIS7, or how to specify which PHP.ini file to load for different version of PHP?
Thanks,
Ryan.
发布评论
评论(2)
我没有并行运行 php4 和 php5,但是对于 php.ini 问题: PHP 应该 在
中查找 PHP.ini 文件所以如果你确保您的 Windows 目录中没有 php.ini (我听说它不应该在您的路径中,但我没有任何证据)并且仅在您的 php 目录中,您应该没问题。
I haven't run php4 and php5 in parallel, but for the php.ini question: PHP should look for the PHP.ini file in
So if you make sure there is no php.ini in your windows directory (I have heard somewhere that it shouldn't also be in your path, but I don't have any evidence for that) and only in your php directory, you should be fine.
将不同版本的 php 映射到不同的文件扩展名。
即 php4、php5
更具体地说,请按照列出的步骤 这里
Map the different versions of php to different file extensions.
i.e. php4, php5
More specifically, follow the steps listed here