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.

I have php 5.2.12 installed on FreeBSD 8.0-STABLE. It was installed from ports and I am trying to upgrade it to 5.3.2.

However for some reason my system is not recognising that php was installed via ports. When I run "pkg_version" the list does not include php it does however include all the extensions that I have installed.

I have even tried to do "make deinstall" on "/usr/ports/lang/php5" it told me that the port had been deinstalled but php still appears to be working correctly i.e "php -v" works

any ideas on how this port has become de attached from the ports system? and how I can get the ports system to recognise that it installed php?

EDIT: When I run "make deinstall" over and over again I always get the same answer

Deinstalling for lang/php5

I never get

php52 not installed, skipping

which is what I am expecting after the first time I run "make deinstall"

share|improve this question
add comment

3 Answers

If you're in lang/php5 then you're uninstalling PHP 5.3; you need to be in lang/php52 to uninstall PHP 5.2

share|improve this answer
    
I get this "php52 not installed, skipping" when running make deinstall in lang/php5 and lang/php5 currently contains 5.3.2 not 5.2 –  Alistair Prestidge Jun 14 '10 at 10:01
    
Correct. To deinstall 5.2 you must be in the /usr/ports/lang/php52 directory. You can not uninstall 5.2 from the 5.3 (or 5.0, depending on how current your ports tree is) directory. The two versions are not in the same directory. –  Chris S Jun 14 '10 at 12:43
add comment
up vote -1 down vote accepted

I am not sure why but the answer was to rebuild all of the ports

portupgrade -a

after running this pkg_version now realises that php is installed.

Fortunately this is not a production machine so this was not a problem if I get this happening on a production machine I think I will need a better answer so, if anyone has an explanation as to why portupgrade -a might have fixed my issue that would be very helpful.

share|improve this answer
add comment

Roughly speaking, PHP 5.3.2 was only recently introduced to the FreeBSD ports tree and in order to properly install 5.3.2, you must first update your local ports tree using csup or cvsup. Have you gone thru these steps first?

share|improve this answer
    
ran cvsup several times lang/php5 says it has php 5.3.2 but some some reason my system does not recognise that php is installed at all –  Alistair Prestidge Jun 14 '10 at 10:03
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.