# Reinstall all php extensions



## kenorb (Nov 10, 2010)

I'm trying to recompile all php extension with BUILD_OPTIMIZED=yes which I've in make.conf
Following command fails:

```
> sudo portupgrade -f php52-extensions
===>   php52-ctype-5.2.14_1 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of textproc/php52-ctype
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1
	! lang/php52-extensions (php52-extensions-1.3_1)	(unknown build error)
> portinstall --help | grep -w f
    -f, --force              Force the upgrade of a port even if it is to be a
```
Is there any way to reinstall all my extension by one command?


----------



## kenorb (Nov 10, 2010)

Probably this tool is not so advanced. It's kind of bug, that -f parameter doesn't work for symbolic ports.

This do the trick:

```
cd /usr/ports/lang/php52-extensions && sudo make FORCE_PKG_REGISTER=1 install
```


----------



## kenorb (Nov 10, 2010)

Note that after reinstalling all extension, you could have following issue:
http://forums.freebsd.org/showthread.php?t=19221


----------

