Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Basically, I usually do something like this:

# portsnap fetch
# portsnap update

# portmaster -L | grep -B1 "New version"
    ===>>> php5-5.2.11
    ===>>> New version available: php5-5.2.12
# portmaster php5-5.2.11

But with PHP I've got about 40 modules and have to them one by one. Is there a better (and safe) way to do this?

Edit: well it turns out that this is what's needed:

# portmaster php5-extensions

It's amazing how hard that was to find out!

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted
portmaster -db php5*
share|improve this answer
Just upgraded php itself, which ended in a segmentation fault. Executing this command saved my day. Thanks for sharing! –  please delete me Aug 29 '13 at 20:45
add comment

Firstly I should say that I don't use portmaster, I use portupgrade, but then I build ports rather than use packages!

Portupgrade allows you to put:

portupgrade php\*

which will upgrade all the php ports. Portmaster may do the same thing.

Also you can give portsnap multiple commands in one go, so you can put

portsnap fetch update
share|improve this answer
I can just install portupgrade and use that then. There's no problem with using them together? –  Gazzer Jan 24 '10 at 19:22
I don't know, as I've never used portmaster! If you use portupgrade then you can use the -P switch to use packages rather than ports where possible. –  hmallett Jan 24 '10 at 19:42
add comment

I rebuild/update all packages depending on php5 for safety. You need to specify the full pkg-name including version. Find out the exact version with pkg_info:

# pkg_info|grep php
php5-5.3.8          PHP Scripting Language

Then rebuild/update php and all ports depending on it with:

# portmaster -r php5-5.3.8
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.