使用 XAMPP,如何将 PHP 5.3 换成 PHP 5.2?

2022-01-14 00:00:00 xampp downgrade php

我正在使用 XAMPP 1.7.2,但需要将 PHP 5.3 换成 PHP 5.2 - 我该怎么做?

I'm using XAMPP 1.7.2, but need to swap out PHP 5.3 for PHP 5.2 - how do I do this?

推荐答案

感谢您的回答.我刚刚在 Windows XP 上进行了一些修改.这是我的步骤.

Thanks for the answer. I just got this working on Windows XP, with a few modifications. Here are my steps.

  1. 下载最新的 xampp 并将其安装到 G:xampp.截至 2010 年 3 月 12 日,这是 1.7.3.
  2. 下载xampp-win32-1.7.0.zip的zip,这是最新的xampp发行版,没有php 5.3.提取某处,例如G:xampp-win32-1.7.0
  3. 删除目录 G:xamppphp
  4. 删除 G:xamppapachemodulesphp5apache2_2.dll 和 php5apache2_2_filter.dll
  5. 复制G:xampp-win32-1.7.0xamppphp到G:xamppphp.
  6. 复制G:xampp-win32-1.7.0xamppapacheinphp*到G:xamppapachein
  7. 编辑 G:xamppapacheconfextrahttpd-xampp.conf.
    • 紧跟在该行之后,<IfModule alias_module>添加行

(截图)

<IfModule mime_module>
  LoadModule php5_module "/xampp/apache/bin/php5apache2_2.dll"
  AddType application/x-httpd-php-source .phps
  AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt
    <Directory "/xampp/htdocs/xampp">
      <IfModule php5_module>
        <Files "status.php">
            php_admin_flag safe_mode off
        </Files>
      </IfModule>
    </Directory>
</IfModule>

(请注意,这是从 1.7.0 xampp 发行版中的同一个文件中获取的.如果遇到问题,请检查该 conf 文件并让新文件与之匹配.)

(Note that this is taken from the same file in the 1.7.0 xampp distribution. If you run into trouble, check that conf file and make the new one match it.)

然后您应该能够使用 PHP 5.2.8 启动 apache 服务器.您可以跟踪 G:xamppapachelogserror.log 文件以查看启动时是否有任何错误.如果没有,您应该能够在导航到 localhost 时看到 XAMPP 启动画面.

You should then be able to start the apache server with PHP 5.2.8. You can tail the G:xamppapachelogserror.log file to see whether there are any errors on startup. If not, you should be able to see the XAMPP splash screen when you navigate to localhost.

希望这对下一个人有所帮助.

Hope this helps the next guy.

干杯,

杰克

相关文章