# Installing old packages



## rapapwa (May 4, 2011)

I've got an older version of PHP installed (5.2.10) and I want to install extensions that will be compatible with this version. Can I use pkg_add to install these packages? For example how do I do something like pkg_add php5-pdo_mysql-5.2.10.tbz and have it fetch from the right server?

I'm running FreeBSD 7.2-RELEASE-p4 amd64


----------



## SirDice (May 4, 2011)

Install databases/php52-pdo_mysql.


----------



## rapapwa (May 4, 2011)

SirDice said:
			
		

> Install databases/php52-pdo_mysql.



Getting an error code when I tried that.


```
===>  php52-pdo_mysql-5.2.17 cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 4 5).
*** Error code 1
```


----------



## SirDice (May 4, 2011)

You probably have PHP 5.3.x installed.


----------



## rapapwa (May 4, 2011)

SirDice said:
			
		

> You probably have PHP 5.3.x installed.



I have 5.2.10 installed but I think this port is expecting a version 5.2.17


```
php --version

PHP 5.2.10 with Suhosin-Patch 0.9.7 (cli) (built: Sep  9 2009 02:39:58)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
```


----------



## dougs (May 6, 2011)

Any reason why you cannot upgrade PHP 5.2.10 to 5.2.17?


----------



## rapapwa (May 6, 2011)

dougs said:
			
		

> Any reason why you cannot upgrade PHP 5.2.10 to 5.2.17?



This what I ended up doing.


----------

