I have just been updating the PHP version on a clients server, they
had been using ports to install PHP. Unfortunately I have little
experience with Freebsd and did not find a quick guide on how to do
this using google.
So here's what I did, I hope somebody will find it
usefull.
#1 Updating the ports database, command line.
$ portsnap fetch
$ portsnap extract
Now open the file: /usr/ports/lang/php5/Makefile in your editor of
choice and make sure to include the libraries you need in the
CONFIGURE_ARGS . Mine ended up looking like this (between other I
had to remove --disable-all which means no session support among
others):
--------------------------------------------
CONFIGURE_ARGS= \
--with-layout=GNU \
--with-config-file-scan-dir=${PREFIX}/etc/php \
--enable-libxml \
--with-mysql \
--with-libxml-dir=${LOCALBASE} \
--enable-reflection \
--program-prefix=""
--------------------------------------------
Continue command line:
$ cd /usr/ports/lang/php5/
$ make
$ make deinstall
(the last line removes the old installation of PHP)
$ make reinstall
$ httpd -k restart
And you are done.
***EDIT***
If you need to configure the PHP-install later, remember to
use:
$ make clean