# Upgrading php55 will remove apache22



## juanjico (May 24, 2015)

Hi!

I'm just trying to upgrade php55 from 5.5.13 to 5.5.24, so I'm using the command `pkg install php55` but I got this messages:


```
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 12 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        mod_php55-5.5.13
        apache22-2.2.27_2
        glib-2.36.3_3
        gobject-introspection-1.36.0_2
        atk-2.8.0
        gamin-0.1.10_7
        shared-mime-info-1.1_1
        glibmm-2.36.2_1,1

New packages to be INSTALLED:
        gettext-runtime: 0.19.4

Installed packages to be UPGRADED:
        php55: 5.5.13 -> 5.5.24
        pcre: 8.34_1 -> 8.35_2
        proftpd: 1.3.5_2 -> 1.3.5_7

The operation will free 52 MiB.
5 MiB to be downloaded.

Proceed with this action? [y/N]:
```

apache22 will be removed ??? Why ???

This box is a 10.0-RELEASE-p18 (yes, I know it's old).

Any idea ?

Thanks!


----------



## scottro (May 24, 2015)

It's all your fault.  
Seriously, you haven't looked at /usr/ports/UPDATING, which explains that the new default is www/apache24

The solution is to edit /etc/make.conf (or create it if it doesn't exist) and put in the line

```
DEFAULT_VERSIONS+=apache=2.2
```
See the UPDATING entry for 20140713


----------



## tobik@ (May 24, 2015)

Read the entry with `pkg updating -d 20140713 www/apache22`.

However setting DEFAULT_VERSIONS has no effect if you use binary packages.

Have you tried running `pkg upgrade php55` instead? `pkg` will then try to upgrade its dependent packages as well.


----------



## juanjico (May 24, 2015)

Thanks scottro. But this is an old server and websites will be moved to a new server. I want to have php up to date, but I see that first I must upgrade apache.

But ... why `pkg` don't install apache24 while removing apache22 ?


----------



## juanjico (May 24, 2015)

Thanks tobik, but this produce the same output as using `install`.


----------



## kpa (May 24, 2015)

You need to reinstall www/mod_php55 with `pkg install mod_php55` after the upgrade, this will pull in the newer Apache port www/apache24.


----------



## scottro (May 24, 2015)

And I missed that it was packages and not ports, sorry and thank you tobik for catching it.


----------

