# phpmyadmin 4.0.0



## Mwh65 (May 7, 2013)

I can't find anything on this issue elsewhere so I must be missing something here. I'm getting an email daily stating that phpMyAdmin needs updating:


```
phpMyAdmin-3.5.8.1                  <   needs updating (port has 4.0.0)
```

but every time I try to update it I get the portsdb updated but it then closes:


```
[root@www ~]# portupgrade -arR
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 24485 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000.........24000.... ..... done]
[root@www ~]#
```

Looking at this thread: http://www.freshports.org/databases/phpmyadmin/ it does state to do the following to install it:



> To install the port: cd /usr/ports/databases/phpmyadmin/ && make install clean
> To add the package: pkg_add -r phpMyAdmin



I've noticed under /ports/databases/ that there is now a phpmyadmin folder and a  phpmyadmin35 folder and I therefore assume, maybe wrongly, that if I do the clean install of 4.0.0 that my existing 3.5 version will remain intact.

Can anyone confirm this is the case as I would like to keep the 3.5 version intact for now.


----------



## SirDice (May 7, 2013)

If you install databases/myphpadmin your existing installation will be upgraded to 4.0.0. If you want to stay with 3.5.x you need to use portmaster():

`# portmaster -o databases/myphpadmin35 databases/myphpadmin`

This will replace databases/myphpadmin with databases/myphpadmin35.


----------



## Mwh65 (May 8, 2013)

Well it isn't going to let me upgrade it:


```
===>  Checking if databases/phpmyadmin already installed
===>   An older version of databases/phpmyadmin is already installed (phpMyAdmin                              -3.5.8.1)
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of databases/phpmyadmin
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1

Stop in /usr/ports/databases/phpmyadmin.
*** [install] Error code 1

Stop in /usr/ports/databases/phpmyadmin.
[root@www /usr/ports/databases/phpmyadmin]#
```

Will `make deinstall` then `make reinstall` work?


----------



## SirDice (May 9, 2013)

Use ports-mgmt/portmaster like I showed you.


----------



## cbrace (May 9, 2013)

SirDice said:
			
		

> `# portmaster -o databases/myphpadmin35 databases/myphpadmin`


Would this also be the recommended way to go, for example, from lang/php53 to lang/php5? Would it migrate all the installed php53* dependencies as well? A cursory glimpse of the man page didn't give me an answer.


----------



## Mwh65 (May 9, 2013)

Yes I read that, but you wrote:



> If you want to stay with 3.5.x you need to use portmaster:
> 
> # portmaster -o databases/myphpadmin35 databases/myphpadmin



but I do not want to stay with 3.5.x and instead want to upgrade the 3.5.x version existing in /ports/databases/phpmyadmin/ to version 4.0.0.


----------



## SirDice (May 10, 2013)

Mwh65 said:
			
		

> but I do not want to stay with 3.5.x and instead want to upgrade the 3.5.x version existing in /ports/databases/phpmyadmin/ to version 4.0.0.


In that case just `# portmaster databases/phpmyadmin`.


----------



## SirDice (May 10, 2013)

cbrace said:
			
		

> Would this also be the recommended way to go, for example, from lang/php53 to lang/php5?


Yes.


> Would it migrate all the installed php53* dependencies as well? A cursory glimpse of the man page didn't give me an answer.


No, after the PHP upgrade is done you have to rebuild those. Something like this should do the trick:
`# portmaster -r lang/php5`

Be sure to read /usr/ports/UPDATING though, sometimes things need to be done in a specific order. Especially with PHP.


----------



## kpa (May 10, 2013)

You can avoid rebuilding lang/php5 twice with the -R flag:

`# portmaster -o lang/php5 lang/php53`
`# portmaster -R -r lang/php5`

This way lang/php5 is not rebuilt in the second step.


----------

