如何在 XAMPP 的一次安装中运行 PHP 5.3 和 5.2

发布于 2024-09-02 22:17:47 字数 188 浏览 0 评论 0原文

我目前在 XAMPP 中使用 PHP 5.3。我需要运行 PHP 5.2 才能运行 Zen Cart 1.8(我知道该补丁 - 但仍然不起作用)。我更愿意在我当前运行的同一个 XAMPP 环境中运行它。

有没有办法做到这一点,或者我是否必须在另一个目录或其他目录中使用 PHP 5.2 再次重新安装 XAMPP?

感谢所有的投入。

I currently have PHP 5.3 in XAMPP. I need to run PHP 5.2 to run Zen Cart 1.8 (I'm aware of the patch - but still doesn't work). I would prefer to run it in the same XAMPP environent I'm currently running.

Is there a way to do this or do I have to reinstall XAMPP again with PHP 5.2 in another directory or something?

Appreciate all inputs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

带刺的爱情 2024-09-09 22:17:47

您可以在同一个安装中完成此操作,尽管我个人只运行两个不同的服务器,因为这通常意味着不同的项目。尽管如此。

执行此操作的最佳方法是重命名原始 PHP 包(PHP_OLD 或其他名称)并创建一个新包,以便您可以在需要时轻松切换回来。

下载运行 PHP 5.3 的 XAMPP 版本,并将 PHP 目录复制出 XAMPP,不要忘记从 xampp/apache/bin 中获取 5.3 包(大约有十个)。您可能需要重命名一些文件(或者不需要,不能 100% 记住),但重新启动 XAMPP 并尝试 phpinfo()。

You can do it in the same installation, though I personally just run two different servers as it often means different projects altogther. Nevertheless.

The best way to do this is to rename your original PHP package (PHP_OLD or something) and create a new one so you can switch back easily if need be.

Download the version of XAMPP running PHP 5.3 and copy the PHP directory out of XAMPP and don't forget to grab the 5.3 packages out of xampp/apache/bin (there are about ten of these). You may need to rename some files (or not, can't remember 100%) but restart XAMPP and give phpinfo() a shot.

飘过的浮云 2024-09-09 22:17:47

您可以按照本教程进行操作,它对我有用: http://ubuntuforums.org /showpost.php?p=9080474&postcount=7
简而言之:

  • 删除旧软件包,
  • 强制安装 karmic 版本 (5.2)
  • apt-pin,以避免升级到 lucid (10.04),但仍然接收来自 karmic (9.10) 的更新

对于基本的 LAMP 堆栈,以下固定条目有效:

Package: php5
Pin: release a=karmic
Pin-Priority: 991

Package: php5-gd
Pin: release a=karmic
Pin-Priority: 991

Package: php5-mysql
Pin: release a=karmic
Pin-Priority: 991

Package: php5-cli
Pin: release a=karmic
Pin-Priority: 991

Package: php5-common
Pin: release a=karmic
Pin-Priority: 991

Package: libapache2-mod-php5
Pin: release a=karmic
Pin-Priority: 991

You could follow this tutorial, it worked for me: http://ubuntuforums.org/showpost.php?p=9080474&postcount=7
in a nutshell:

  • remove old package
  • force installation of the karmic version (5.2)
  • apt-pin to avoid upgrades to lucid (10.04), but still recieve updates from karmic (9.10)

For a basic LAMP stack the following pinning entries work:

Package: php5
Pin: release a=karmic
Pin-Priority: 991

Package: php5-gd
Pin: release a=karmic
Pin-Priority: 991

Package: php5-mysql
Pin: release a=karmic
Pin-Priority: 991

Package: php5-cli
Pin: release a=karmic
Pin-Priority: 991

Package: php5-common
Pin: release a=karmic
Pin-Priority: 991

Package: libapache2-mod-php5
Pin: release a=karmic
Pin-Priority: 991
樱&纷飞 2024-09-09 22:17:47

我认为您可以使用 PHP 5.3 作为模块,并使用带有 CGI 或快速 CGI 的 PHP 5.2。

I think you can use Php 5.3 as a module and PHP 5.2 with CGI or fast CGI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文