# PHP upgrade



## Mwh65 (Sep 30, 2015)

I'm currently running PHP 5.4.45 on FreeBSD 9.3 and phpmyadmin now requires a minimum version of 5.5 to work.

What would anyone advise I should upgrade to from PHP 5.4.45 and how do I go about it having never done this before ?


----------



## junovitch@ (Oct 1, 2015)

Normally this would involved a read of the upstream migration guide for an internal application (http://php.net/migration55).  If you only have databases/phpmyadmin from ports then that wouldn't be needed.  If you are using packages then `pkg upgrade` should just work as 5.6 is the default as mentioned in `less -p 20150220 /usr/ports/UPDATING`.  If you are using ports, you would have to do is remove the make.conf entry that is keeping you on lang/php5 since the default is already lang/php56.  That would of course be followed by a reinstall of all PHP ports.


----------



## Mwh65 (Oct 1, 2015)

Thanks for the reply. I read the documentation and looked at pkg upgrade. So I went ahead and removed the entry in make.conf.

I then ran pkg upgrade and got the following list ...


```
[root@www ~]# pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (224 candidates):  0%
Checking for upgrades (224 candidates):  0%
Checking for upgrades (224 candidates):  1%
Checking for upgrades (224 candidates):  2%
Checking for upgrades (224 candidates):  3%
Checking for upgrades (224 candidates):  4%
Checking for upgrades (224 candidates):  5%
Checking for upgrades (224 candidates):  6%
Checking for upgrades (224 candidates):  7%
Checking for upgrades (224 candidates):  8%
Checking for upgrades (224 candidates):  9%
Checking for upgrades (224 candidates):  10%
Checking for upgrades (224 candidates):  11%
Checking for upgrades (224 candidates):  12%
Checking for upgrades (224 candidates):  13%
Checking for upgrades (224 candidates):  14%
Checking for upgrades (224 candidates):  15%
Checking for upgrades (224 candidates):  16%
Checking for upgrades (224 candidates):  17%
Checking for upgrades (224 candidates):  18%
Checking for upgrades (224 candidates):  19%
Checking for upgrades (224 candidates):  20%
Checking for upgrades (224 candidates):  21%
Checking for upgrades (224 candidates):  22%
Checking for upgrades (224 candidates):  23%
Checking for upgrades (224 candidates):  24%
Checking for upgrades (224 candidates):  25%
Checking for upgrades (224 candidates):  26%
Checking for upgrades (224 candidates):  27%
Checking for upgrades (224 candidates):  28%
Checking for upgrades (224 candidates):  29%
Checking for upgrades (224 candidates):  30%
Checking for upgrades (224 candidates):  31%
Checking for upgrades (224 candidates):  32%
Checking for upgrades (224 candidates):  33%
Checking for upgrades (224 candidates):  34%
Checking for upgrades (224 candidates):  35%
Checking for upgrades (224 candidates):  36%
Checking for upgrades (224 candidates):  37%
Checking for upgrades (224 candidates):  38%
Checking for upgrades (224 candidates):  39%
Checking for upgrades (224 candidates):  40%
Checking for upgrades (224 candidates):  41%
Checking for upgrades (224 candidates):  42%
Checking for upgrades (224 candidates):  43%
Checking for upgrades (224 candidates):  44%
Checking for upgrades (224 candidates):  45%
Checking for upgrades (224 candidates):  46%
Checking for upgrades (224 candidates):  47%
Checking for upgrades (224 candidates):  48%
Checking for upgrades (224 candidates):  49%
Checking for upgrades (224 candidates):  50%
Checking for upgrades (224 candidates):  51%
Checking for upgrades (224 candidates):  52%
Checking for upgrades (224 candidates):  53%
Checking for upgrades (224 candidates):  54%
Checking for upgrades (224 candidates):  55%
Checking for upgrades (224 candidates):  56%
Checking for upgrades (224 candidates):  57%
Checking for upgrades (224 candidates):  58%
Checking for upgrades (224 candidates):  59%
Checking for upgrades (224 candidates):  60%
Checking for upgrades (224 candidates):  61%
Checking for upgrades (224 candidates):  62%
Checking for upgrades (224 candidates):  63%
Checking for upgrades (224 candidates):  64%
Checking for upgrades (224 candidates):  65%
Checking for upgrades (224 candidates):  66%
Checking for upgrades (224 candidates):  67%
Checking for upgrades (224 candidates):  68%
Checking for upgrades (224 candidates):  69%
Checking for upgrades (224 candidates):  70%
Checking for upgrades (224 candidates):  71%
Checking for upgrades (224 candidates):  72%
Checking for upgrades (224 candidates):  73%
Checking for upgrades (224 candidates):  74%
Checking for upgrades (224 candidates):  75%
Checking for upgrades (224 candidates):  76%
Checking for upgrades (224 candidates):  77%
Checking for upgrades (224 candidates):  78%
Checking for upgrades (224 candidates):  79%
Checking for upgrades (224 candidates):  80%
Checking for upgrades (224 candidates):  81%
Checking for upgrades (224 candidates):  82%
Checking for upgrades (224 candidates):  83%
Checking for upgrades (224 candidates):  84%
Checking for upgrades (224 candidates):  85%
Checking for upgrades (224 candidates):  86%
Checking for upgrades (224 candidates):  87%
Checking for upgrades (224 candidates):  88%
Checking for upgrades (224 candidates):  89%
Checking for upgrades (224 candidates):  90%
Checking for upgrades (224 candidates):  91%
Checking for upgrades (224 candidates):  92%
Checking for upgrades (224 candidates):  93%
Checking for upgrades (224 candidates):  94%
Checking for upgrades (224 candidates):  95%
Checking for upgrades (224 candidates):  96%
Checking for upgrades (224 candidates):  97%
Checking for upgrades (224 candidates):  98%
Checking for upgrades (224 candidates):  99%
Checking for upgrades (224 candidates): 100%
Processing candidates (224 candidates):  0%
Processing candidates (224 candidates):  0%
Processing candidates (224 candidates):  1%
Processing candidates (224 candidates):  2%
Processing candidates (224 candidates):  3%
Processing candidates (224 candidates):  4%
Processing candidates (224 candidates):  5%
Processing candidates (224 candidates):  6%
Processing candidates (224 candidates):  7%
Processing candidates (224 candidates):  8%
Processing candidates (224 candidates):  9%
Processing candidates (224 candidates):  10%
Processing candidates (224 candidates):  11%
Processing candidates (224 candidates):  12%
Processing candidates (224 candidates):  13%
Processing candidates (224 candidates):  14%
Processing candidates (224 candidates):  15%
Processing candidates (224 candidates):  16%
Processing candidates (224 candidates):  17%
Processing candidates (224 candidates):  18%
Processing candidates (224 candidates):  19%
Processing candidates (224 candidates):  20%
Processing candidates (224 candidates):  21%
Processing candidates (224 candidates):  22%
Processing candidates (224 candidates):  23%
Processing candidates (224 candidates): 100%
The following 138 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
jpeg-turbo: 1.4.1
lua52: 5.2.4
tcl86: 8.6.4
libEGL: 10.6.8
gbm: 10.6.8
php56-session: 5.6.13
php56: 5.6.13
php56-xml: 5.6.13
php56-bz2: 5.6.13
php56-ctype: 5.6.13
php56-filter: 5.6.13
php56-zip: 5.6.13_1
libzip: 1.0.1
php56-openssl: 5.6.13
php56-gd: 5.6.13
php56-mcrypt: 5.6.13
php56-mbstring: 5.6.13
php56-mysqli: 5.6.13
php56-json: 5.6.13
php56-zlib: 5.6.13
apache24: 2.4.16_1
docbook: 1.5
sdocbook-xml: 1.1_1,2
docbook-sgml: 4.5_1
docbook-xml: 5.0_3
xmlcharent: 0.3_2

Installed packages to be DOWNGRADED:
ImageMagick-nox11: 6.9.2.3,1 -> 6.9.2.0,1

Installed packages to be REINSTALLED:
xcb-proto-1.11 (direct dependency removed: python2)
webp-0.4.3 (direct dependency changed: jpeg-turbo)
vim-7.4.884 (options changed)
trousers-tddl-0.3.10_7
tiff-4.0.4 (direct dependency changed: jbigkit)
t1lib-5.1.2_4,1
ssmtp-2.64_1 (options changed)
sqlite3-3.8.11.1_1 (options changed)
spidermonkey170-17.0.0_1 (needed shared library changed)
screen-4.3.1_2 (options changed)
ruby21-bdb-0.6.6_4 (direct dependency changed: db5)
ruby-2.1.7,1 (options changed)
python27-2.7.10 (options changed)
python-2.7_2,2 (direct dependency changed: python27)
postfix-2.11.6,1 (options changed)
png-1.6.18
pixman-0.32.6_1
phpMyAdmin-4.5.0.2 (direct dependency changed: php56-session)
php5-gd-5.4.45 (direct dependency changed: jpeg-turbo)
php5-5.4.45 (options changed)
perl5-5.20.3_8
pecl-pdflib-3.0.4 (direct dependency changed: php56)
pecl-imagick-3.1.2_2 (direct dependency changed: php56)
pcre-8.37_4
pango-1.36.8_2
p5-IO-Tty-1.12_1 (needed shared library changed)
p5-Authen-PAM-0.16_2 (needed shared library changed)
p11-kit-0.23.1_1
nspr-4.10.9
nettle-2.7.1
mysql55-client-5.5.44_1 (needed shared library changed)
mpfr-3.1.2_2 (direct dependency changed: indexinfo)
mod_php5-5.4.45,1 (direct dependency changed: apache24)
mkfontdir-1.0.7 (direct dependency changed: mkfontscale)
m4-1.4.17_1,1 (options changed)
lzo2-2.09
lua51-5.1.5_9 (needed shared library changed)
libyaml-0.1.6_2
libxml2-2.9.2_3 (options changed)
libxcb-1.11_1
libwmf-nox11-0.2.8.4_15 (direct dependency changed: jpeg-turbo)
libtasn1-4.7
libpthread-stubs-0.3_6
libpciaccess-0.13.3
libpaper-1.1.24.4
liblqr-1-0.4.1_8 (direct dependency changed: glib)
libidn-1.31
libiconv-1.14_8
libglapi-10.6.8
libfontenc-1.1.2_3
libffi-3.2.1
libedit-3.1.20150325_1
libdrm-2.4.60,1 (options changed)
libcroco-0.6.8_2 (direct dependency changed: glib)
libarchive-3.1.2_4,1
libXxf86vm-1.1.4_1
libXvMC-1.0.9
libXt-1.1.4_3,1
libXrender-0.9.8_3
libXrandr-1.4.2_3
libXpm-3.5.11_4
libXinerama-1.1.3_3,1
libXi-1.7.4_1,1
libXft-2.3.2_1
libXfixes-5.0.1_3
libXext-1.3.3_1,1
libXdmcp-1.1.2
libXdamage-1.1.4_3
libXcursor-1.1.14_3
libXcomposite-0.4.4_3,1
libXaw-1.0.12_3,2
libXau-1.0.8_3
libX11-1.6.2_3,1
libSM-1.2.2_3,1
libIDL-0.8.14_2 (direct dependency changed: indexinfo)
libGL-10.6.8
lcms2-2.7_1 (direct dependency changed: tiff)
jsoncpp-0.6.0.r2_2
jbig2dec-0.11_4
jasper-1.900.1_15 (direct dependency changed: jpeg-turbo)
help2man-1.43.3_1 (direct dependency changed: indexinfo)
harfbuzz-1.0.1
gtk2-2.24.28_1
gtk-engines2-2.20.2_2 (direct dependency changed: gtk2)
gnutls-3.3.17.1
gmp-5.1.3_2 (direct dependency added: indexinfo)
glib-2.44.1_1
giflib-5.0.6
ghostscript9-base-9.06_11 (direct dependency changed: freetype2)
gettext-runtime-0.19.5.1
gdk-pixbuf2-2.31.7 (direct dependency changed: png)
gdbm-1.11_2 (direct dependency changed: indexinfo)
gcc-4.8.5
gamin-0.1.10_8 (direct dependency changed: glib)
freetype2-2.6_1 (options changed)
fontconfig-2.11.1,1 (needed shared library changed)
expat-2.1.0_3
eggdbus-0.6_3 (direct dependency changed: glib)
docbook-xsl-1.76.1_2 (direct dependency added: docbook)
dejavu-2.35 (ABI changed: 'freebsd:9:x86:32' -> 'freebsd:9:*')
dbus-glib-0.104
db5-5.3.28_2
curl-7.44.0 (options changed)
cups-image-2.0.3_2 (direct dependency changed: libiconv)
cups-client-2.0.3_2
cmake-3.3.1 (needed shared library changed)
cairo-1.14.2,2 (options changed)
bison-2.7.1,1 (option added: EXAMPLES)
atk-2.16.0
apr-1.5.2.1.5.4 (options changed)
ORBit2-2.14.19_1 (direct dependency changed: libIDL)

The process will require 63 MiB more space.
197 MiB to be downloaded.

Proceed with this action? [y/N]:
```
Now looking at this list it seems to want to upgrade apache from 2.2 to 2.4 despite my make.conf entry stating the default is 2.2. Does PHP 5.6 require Apache 2.4 ?

Also is there anything else on this list that may need to be looked at ?


----------



## SirDice (Oct 1, 2015)

pkg(8) does not take make.conf into account. Any default settings will simply be ignored. The default settings only work if you build from ports.

If you want to deviate from the default versions I highly recommend setting up your own repository with ports-mgmt/poudriere.


----------

