【问题标题】:load mutiple version of php on apache on xampp in windows environment在 windows 环境中的 xampp 上的 apache 上加载多个版本的 php
【发布时间】:2016-01-07 04:29:40
【问题描述】:

我要在 xampp 上加载多个版本的 php,并使用 ht-access 添加处理程序,所以我的一个应用程序应该使用其 htaccess 在 5.3 php 版本中运行,而另一个应用程序应该使用 5.4 php 版本。

谁能帮我解决这个问题?

谢谢 阿米特

【问题讨论】:

    标签: php apache .htaccess xampp


    【解决方案1】:

    一种方法是使用 mod_php 设置您的 php 主版本,并通过不同端口(即 81、82、83 等)上的快速 cgi 运行所有其他版本。

    【讨论】:

      【解决方案2】:
      The best method is to change the PHP settings in
      
      /apache/conf/extra/httpd-xampp.conf
      
      to reflect the new version of PHP you want to use
      
      In my case I unpacked PHP5.4 to C:\XAMPPLITE\PHP5.4 and then updated key lines in this file such as:
      
      SetEnv PHPRC "C:\\xampplite\\php5.4"
      
      LoadFile "C:/xampplite/php5.4/php5ts.dll"
      
      PHPINIDir "C:/xampplite/php5.4"
      You also need to ensure that the correct version of php5apache2_2.dll is installed
      
      To ensure this I copied the new version of php5apache2_2.dll to the Apache modules directory with a unique name, and then modified the configuration to match that:
      
      copy php5.4\php5apache2_2.dll apache\modules\php5apache2_2-5_4.dll
      and in the httpd-xampp.conf file
      
      LoadModule php5_module modules/php5apache2_2-5_4.dll
      

      【讨论】:

      • 我想加载多个版本并希望使用 htaccess 文件处理程序使用 php 版本。您的解决方案将完全更新版本,因此我一次只能使用 1 个 php。
      • 您好,您可以参考这里;希望对你有帮助complete-concrete-concise.com/web-tools/…
      • 不,亲爱的,它说要在一台 PC 上运行多个 xampp,这不是正确的解决方案,我正在寻找的解决方案类似于最新的 cpanel,当您添加文件处理程序时,它给了我们对于 htaccess,您可以在相同的指令中提及 php 版本。
      猜你喜欢
      • 2017-09-22
      • 2018-10-04
      • 1970-01-01
      • 1970-01-01
      • 2019-03-25
      • 2018-10-22
      • 2022-12-23
      • 2011-04-10
      相关资源
      最近更新 更多