views:

160

answers:

3

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.

+2  A: 

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.

Jarrod
A: 

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
berkes
A: 

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

Brice Favre