Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I tried following the excellent instructions on this gist to upgrade my Mac to PHP 5.4, but before I do, I need to know:

Is there an easy way to find out which php extensions do I have installed currently? I'd like to have the same list for 5.4. I tried port list | grep php53- but got way too many responses...

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted
+50

To show installed php extensions from port, try port installed | grep php53- or instead of port list.

share|improve this answer
    
Already tried that (read the question) - too many... –  Traveling Tech Guy Jan 5 '13 at 1:33
    
How many did you get from port installed | grep php53- ? The mac port current has 98 php53- from port list | grep -c php53-. If you have 98 from port installed | grep -c php53-, you have installed all extension for php53. –  neo Jan 5 '13 at 2:04
    
Actually, I tried again with SUDO and your method yielded 0. I then switched to port installed | grep php5 and now I have 8 - so it seems your idea works. Thanks!!! –  Traveling Tech Guy Jan 5 '13 at 2:44
add comment

port list shows all the ports in Macports thus giving you the large list.

To show all the ports you have requested try port list requested. This will only show the ports that you explicitly installed, the ones that they depend on are not shown and were installed by dependency resolution. SO this list will be the smalles list you need to reinstall the same ports. If you grep to fins php then this should give the minimum set of ports. The only issue is if there are any ports you have that depend on a php53- port but do not have php53 in the name but then I suspect there are other issues.

Another way is to to uninstall php53 by sudo port uninstall php53. This will fail giving the list of ports that depend on it which you have to then uninstall. However this could take a few runs to do if a port depends only indirectly on php53.

share|improve this answer
add comment

Your Answer

 
discard

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.