PHP and PHP-Extensions

2008-12-17 Thread Grant Peel
Hi all,

I have a somewhat broken installation of php 4.4.7 and the extensions and want 
to completely remove them and reinstall them.

How does one conpletely remove php4 (from ports) and the extensions to ensure a 
clean install?

-Grant
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: PHP and PHP-Extensions

2008-12-17 Thread Matthew Seaman

Grant Peel wrote:


I have a somewhat broken installation of php 4.4.7 and the extensions
and want to completely remove them and reinstall them.

How does one conpletely remove php4 (from ports) and the extensions
to ensure a clean install?


Make sure you have good backups.  Also make sure you have a handy list of
all the ports you started with:

 # pkg_info -Ia  /root/initial.ports

Now, delete the lang/php4 port and everything that depends on it.  The
easiest way to do this is with the pkg_deinstall program which is part
of portupgrade(1):

 # pkg_deinstall -dfr php4 


'php4' is actually a packagename glob, so this will delete any package
mentioning 'php4' in its name, plus every thing depending on those ports.
So it will delete pure PECL or PEAR code modules and end user applications
as well.

Then regenerate the list of ports you've got installed and diff it
against the initial list as a sanity check:

 # pkg_info -Ia  /root/final.ports
 # diff -u initial.ports final.ports

That should be pretty much it.  If you've stripped out everything PHP
related then /usr/local/lib/php/ and /usr/local/share/pear/ should be
empty or gone completely, and there should be no ports left with 'php',
'pear' or 'pecl' prominently in their names.  Nor should you have
'eaccelerator' or 'zend' related stuff still there.

You'll still have some PHP related files in /usr/local/etc/ which you
can delete or not as required -- they all have php in the name or
directory path making them quite easy to identify.  Note however that
if you're intending to upgrade to PHP5 then you must delete
/usr/local/etc/php.conf first, as that's the file that tells bsd.php.mk
which version of PHP you're using.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: PHP and PHP-Extensions

2008-12-17 Thread Polytropon
On Wed, 17 Dec 2008 17:22:55 -0500, Grant Peel gp...@thenetnow.com wrote:
 Hi all,
 
 I have a somewhat broken installation of php 4.4.7 and the
 extensions and want to completely remove them and reinstall them.
 
 How does one conpletely remove php4 (from ports) and the
 extensions to ensure a clean install?

One way would be to chenge into the ports directory and do
a make deinstall for PHP and the extensions.

Another way would be to run pkg_delete /var/db/pkg/name on
PHP and its extensions.

Both ways should inform you about files that the deletion process
would not delete, so you can delete them manually afterwards.

Then there should be no problem doing a clean reinstall.



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org