# Upgrading php56 to php72 with portmaster : wedged by -extensions modules



## gessel (Jan 12, 2019)

This is a bit embarrassing, not long ago (after Jan 1) I upgraded another jail successfully, but this one isn't going so well.  I'm sure the problem is trivial, but I'm stuck.

I've successfully used `portmaster -od lang/php72 php56-5.6.39` to update  lang/php56 and `portmaster -e ....` to remove everything but the modules that were handled by lang/php56-extensions, but those won't remove either as (say) `portmaster -e archivers/php56-bz2` or `portmaster -e php56-bz2-5.6.39` or even `portmaster www/mediawiki130` or `portmaster -Rafd` or `portmaster -od archivers/php72-bz2 php56-bz2-5.6.39` or `portmaster -e lang/php72-extensions php56-extensions-1.0`.  What I get is:


```
===>>> The dependency for lang/php72
       seems to be handled by php56-bz2-5.6.39
php56-ctype-5.6.39
php56-dom-5.6.39
php56-fileinfo-5.6.39
php56-filter-5.6.39
php56-gd-5.6.39
php56-hash-5.6.39
php56-iconv-5.6.39
php56-json-5.6.39
php56-mbstring-5.6.39
php56-openssl-5.6.39
php56-pgsql-5.6.39_1
php56-readline-5.6.39
php56-session-5.6.39
php56-sockets-5.6.39
php56-xml-5.6.39
php56-xmlreader-5.6.39
php56-zlib-5.6.39


        ===>>> The archivers/php56-bz2 port moved to archivers/php72-bz2
        ===>>> Reason: Has expired: Security Support ends on 31 Dec 2018
```

which just repeats indefinitely until I `ctrl-c`


----------



## gessel (Jan 13, 2019)

well, just  `pkg delete php56-bz2-5.6.39 php56-ctype-5.6.39 php56-dom-5.6.39... (etc.)`, which also deleted mediawiki, then reinstalling with `portmaster -d  -m DISABLE_VULNERABILITIES=yes www/mediawiki130` worked fine.


----------



## pboehmer (Jan 14, 2019)

FWIW, I've done this for PHP version bumps (7.0-7.2 example) which seems to have worked:

1.  `grep "+=" /var/db/ports/lang_php70-extensions/options`
Make note of options enabled
2. `cd /usr/ports/lang/php72-extensions && make config (just config!)`
Match above enabled options.
3. `portmaster -o lang/php72 lang/php70` (upgrade php70 to php72)
4. `pkg delete -f php70-*` (delete all php70 extensions)
5. `cd /usr/ports/lang/php72-extensions && make all install clean` (make and install the extensions)
6. `pkg check -dBa` 
7. Rebuild ports listed.

Like I said, this seems to have work best for me over the years.


----------

