# Install phpMyAdmin with php56 (instead of php5) using pkg



## CallumA (Jan 18, 2015)

I've been having a bit of a problem installing databases/phpmyadmin with pkg(8) and since Google has drawn a blank for me I've decided to ask on here.

Basically all I'm doing is running `pkg install phpmyadmin` (perhaps I should use ports but using a package manager is much less of a hassle for updating and much quicker) but what it wants to do is uninstall my already-installed php56 and replace it with the older php5.

Here's the whole output:

```
root@FreeBSD:~ # pkg install phpmyadmin
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (2 conflicting)
Checking integrity... done (0 conflicting)
The following 42 packages will be affected (of 0 checked):

Installed packages to be REMOVED:
    php56-5.6.4
    mod_php56-5.6.4
    php56-mysqli-5.6.4

New packages to be INSTALLED:
    phpMyAdmin: 4.3.6
    php5-session: 5.4.36
    php5: 5.4.36
    php5-xml: 5.4.36
    php5-ctype: 5.4.36
    php5-openssl: 5.4.36
    php5-mcrypt: 5.4.36_1
    libmcrypt: 2.5.8_2
    libltdl: 2.4.2.418
    php5-filter: 5.4.36
    php5-gd: 5.4.36
    libXpm: 3.5.11_2
    xproto: 7.0.26
    libXext: 1.3.3,1
    xextproto: 7.3.0
    libXau: 1.0.8_2
    libX11: 1.6.2_2,1
    libxcb: 1.11
    libXdmcp: 1.1.1_2
    libpthread-stubs: 0.3_6
    kbproto: 1.0.6
    libXt: 1.1.4_2,1
    libSM: 1.2.2_2,1
    libICE: 1.0.9,1
    freetype2: 2.5.5
    png: 1.6.16
    jpeg: 8_6
    t1lib: 5.1.2_4,1
    libXaw: 1.0.12_2,2
    printproto: 1.0.5
    libXp: 1.0.2_2,1
    libXmu: 1.1.2_2,1
    php5-json: 5.4.36
    php5-mysqli: 5.4.36
    php5-mbstring: 5.4.36
    oniguruma4: 4.7.1_1
    php5-zlib: 5.4.36
    php5-zip: 5.4.36
    php5-bz2: 5.4.36

The process will require 56 MB more space.

Proceed with this action? [y/N]: n
```

My question is, how can I make pkg use the php56 versions of all those packages instead of php5 so as to not remove my php56 installation?

Thanks in advance!


----------



## junovitch@ (Jan 18, 2015)

Unfortunately the ports system right now only has "hard" dependencies on whatever the current default version is set to.  That means any PHP package installed will have a dependency on lang/php5 and will force an install of that older version.   There is work to improve this in the future but your only option in the meantime is to compile locally or host your own package repository if you have a couple systems to maintain.

The compile locally is covered first and you can save some time by `pkg install php56` then compiling databases/phpmyadmin as described in the Handbook.
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html

Building your own package repository is described in the Poudriere section.
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-poudriere.html


----------



## CallumA (Jan 21, 2015)

junovitch said:


> Unfortunately the ports system right now only has "hard" dependencies on whatever the current default version is set to.  That means any PHP package installed will have a dependency on lang/php5 and will force an install of that older version.   There is work to improve this in the future but your only option in the meantime is to compile locally or host your own package repository if you have a couple systems to maintain.
> 
> The compile locally is covered first and you can save some time by `pkg install php56` then compiling databases/phpmyadmin as described in the Handbook.
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
> ...



That's what I'll have to do then. Thanks!


----------

