# php5 -> php53 how?



## rambetter (May 17, 2012)

Just read this is /usr/ports/UPDATING:



> ```
> 20120516:
> AFFECTS: users of lang/php5
> AUTHOR: [email]ale@FreeBSD.org[/email]
> ...




What is the easiest way to "transfer" my PHP install to lang/php53?  I still have not upgraded to 5.4 and don't plan to.


----------



## inky (May 20, 2012)

Just de-instal*l* old and install new from ports if you want to use it, but be careful - there are many changes done to the core, many functions deprecated - you will find changes on the PHP site - anyway, if the new will not work - you can always install the old.. )


----------



## Bubrak (May 21, 2012)

inky: *I*'d guess he wants to reinstall his 5.3.13 installation from the former location lang/php5 to lang/php53 as lang/php5 is now the home for the 5.4 branch, which is the cause why it is annouced by 400.status-pkg to upgrade 5.3.13 to 5.4.3.

*S*o if he will move from lang/php5 to lang/php53 he will stay on the 5.3.13 version, no need to be aware of any changes.

I am now doing this and best way is to

go to /var/db/ports and rename php5* directories to php53* (this is to save options from php5 ports to php53)
delete the php5-* packages (*pkg_delete -f php5-**)
go to /usr/ports/lang/php53 and do `make install clean` then the same for lang/php53-extensions, if you get any conflicts saying some package is already installed, just *pkg_delete -f* this package and do `make install clean` in lang/php53-extensions again[/list

*I*n my case step by step:
`# cd /var/db/ports`
`# mv php5 php53`
`# mv php5-extensions php53-extensions`
`# mv php5-gd php53-gd`
`# mv php5-mysql php53-mysql`
`# mv php5-sqlite php53-sqlite`
`# pkg_delete -f php5-*`
`# cd /usr/ports/lang/php53/`
`# make install clean`
`# cd /usr/ports/lang/php53-extensions/`
`# make install clean`
`# /usr/local/etc/rc.d/apache22 restart`

*N*ow all is working fine, and entering:
`# pkg_info | grep php`
shows all PHP packages as php53-* ones.
`# /etc/periodic/weekly/400.status-pkg`
shows no PHP package needing an upgrade.

*O*n one box *I* got an error with a PDF module having some library already installed, so *I* just deleted this library and ran [cmd=]make install clean[/cmd] in php53-extensions again (as *I* wrote already in the generic quide).

*T*here might be a better 'one line' solution to this but this is just what was on my mind first.


----------



## Bubrak (May 21, 2012)

*O*ne note - *I* got some dependency errors when using portupgrade after this php5->php53 transfer. So *I* ran *pkgdb -F* which deleted some dependencies so *I* then reinstalled all these packages which were dependent on php5 which renewed dependencies for php53.

*I*n my case:
`#  portupgrade -f eacc* pear* xcache cacti`


----------



## gkontos (May 21, 2012)

That's a way to do it but IMHO it is brain dead to have to go through all this procedure just to keep lang/php53!

Most of my clients don't want php54 not because they are strange and weird but because a lot of extensions simply refuse to work. The last thing you need in a production environment is having to debug a new version.

So, I really wonder why this change was implemented without first providing an alternate and easy way to stay with the old version without having to go though all this down time.

I have emailed the port maintainer about an official solution.


----------



## frijsdijk (May 22, 2012)

I agree. Why not create the ports like lang/php52, lang/php53, lang/php54 right away, this avoids the stupid upgrade procedures.


----------



## gkontos (May 22, 2012)

frijsdijk said:
			
		

> I agree. Why not create the ports like lang/php52, lang/php53, lang/php54 right away, this avoids the stupid upgrade procedures.



That would be a wise thing to do. Could you also please suggest this on the mailing list?

Link: http://lists.freebsd.org/pipermail/freebsd-ports/2012-May/075042.html

Thanks


----------



## gkontos (May 23, 2012)

The following procedure has worked in 3 different installations so far. All of them were running php5-5.3.13

Backup your extensions configuration:

`# cd /usr/local/etc/php`
`# cp extensions.ini extensions.ini.bak`

Go to /var/db/ports and rename all php5* to php53*
Go to /var/db/pkg and get a list of your current installed php5 packages. Save this because you will need it later.

`# ls | grep php > php5.packages`

Delete all php5 packages.

`# pkg_delete -f php5-*`

Rebuild php53 and php53-extensions

`# cd /usr/ports/lang/php53 && make install clean`
`# cd ../php53-extensions && make install clean`

After this is done check for missing packages. This is were the php5.packages comes useful.

`# cd /var/db/pkg && ls | grep php53 > php53.packages`
`# diff php5.packages php53.packages`

Install the missing packages, and copy extensions.ini.bak to extensions.ini

`# cd /usr/local/etc/php && cp extensions.ini.bak extensions.ini`

Restart apache and tail error.log. It shouldn't report any missing extensions.


----------



## thelibrarian (May 24, 2012)

Rather than the manual process outlined by gkontos above, does anyone know if the method suggested for upgrading between perl versions would work?

i.e.:

`env DISABLE_CONFLICTS=1 portupgrade -o lang/php53 -f php5-5.3.\*`

I would of course take the precautions of backing up the extensions.ini file and saving a listing of all the installed packages.


----------



## Bubrak (May 24, 2012)

thelibrarian: no this method is not working (as the versions are the same, but perl had this hint for upgrade to different version), but I didn't try the -f option for portupgrade, it might work. *Y*ou can still use 'one line' in this case:


```
pkg_delete -f php5-5.3.\* ; cd /usr/ports/lang/php53; make install clean
```

with the same result 

*A*lso I think you don't need to backup extensions.ini as /var/db/ports/php53-extensions/option is containing all extensions installed by the php5-extensions package.


----------



## serhiy (May 24, 2012)

Bubrak: You *must* backup your current /usr/local/etc/php/extensions.ini because after deinstalling php5 and installing php53 the order in extensions in the new /usr/local/etc/php/extensions.ini may change, thus preventing a proper restart of apache.


----------



## gkontos (May 24, 2012)

Bubrak said:
			
		

> Also I think you don't need to backup extensions.ini as /var/db/ports/php53-extensions/option is containing all extensions installed by the php5-extensions package.



There are 2 reasons why you should backup your extensions.ini

It is the only way to be certain that you didn't miss something during the deinstall / install procedure.
Extensions need to be loaded in a certain order, otherwise you might get segmentation faults.


----------



## Bubrak (May 24, 2012)

serhiy, gkontos: I may be wrong but I still think that the /var/db/ports/php53-extensions/options file contains current extensions which were installed and thus these same will be installed newly and so the extensions.ini will look the same as the old one. I don't believe that i.e. in two fresh installs with same options you can get different orders in extensions.ini to get into any problems. If I think wrong explain it to me please.


----------



## gkontos (May 25, 2012)

@Bubrak,

Moving from php5 to php53 means that you have to nuke your current php installation and reinstall from scratch. 

extensions.ini contains all of your current compiled extensions. Most of them been installed by the old php5-extensions port. However, there are other extensions that are not part of this meta port. Just as an example I will mention net/php53-xmlrpc which requires to be installed separately.

Backing up your extensions before and restoring after the upgrade, will make sure that an error will be generated if a module is missing when you restart your web server.

I hope this clears things.


----------



## marcpearsonti (May 25, 2012)

Quick tips for renaming all php5 folders in /var/db/ports/. To see what the command will do, go with this command first:

`for f in php* ;do echo mv $f php53${f#php5}; done`

and if it's good, run it like this:

`for f in php* ;do echo $f php53${f#php5}; done`


----------



## frijsdijk (May 26, 2012)

Backing up the extensions file first is advisable I would say. They should remain the same after a reinstall, but the order can change, and that can trigger all sorts of problems (coredumps, segfaults). Yes, PHP in FreeBSD is really fun! (actually, it's a shame!)


----------



## marcpearsonti (May 27, 2012)

marcpearsonti said:
			
		

> Quick tips for renaming all php5 folders in /var/db/ports/. To see what the command will do, go with this command first:
> 
> `for f in php* ;do echo mv $f php53${f#php5}; done`
> 
> ...


Oops, I made a mistake in my second command, it should have read:

`for f in php* ;do mv $f php53${f#php5}; done`


----------



## frijsdijk (May 28, 2012)

That's nice, but you are dependent on bash/sh in this case (worth a mention!)


----------



## Bubrak (May 29, 2012)

gkontos: Ok. This makes sense. Thank you for explanation.


----------



## nORKy (May 29, 2012)

Please, does someony have problem with pdflib?

*M*y error is:

```
php53-extensions-1.6 depends on file: /usr/local/lib/php/20090626/pdf.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/pdf.so in /usr/ports/print/pecl-pdflib
===>   Installing existing package /usr/ports/packages/All/pecl-pdflib-2.1.8_1.tbz
pkg_add: package 'php5-5.4.3' conflicts with php53-5.3.13
pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
pkg_add: autoload of dependency '/usr/ports/packages/All/php5-5.4.3.tbz' failed!
pkg_add: package 'php5-5.4.3' conflicts with php53-5.3.13
pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
pkg_add: autoload of dependency '/usr/ports/packages/All/php5-5.4.3.tbz' failed!
pkg_add: autoload of dependency '/usr/ports/packages/All/php5-gd-5.4.3.tbz' failed!
*** Error code 1
```

There is a depend*e*ncy problem I think.


----------



## gkontos (May 29, 2012)

Remove php5 as per above instructions. 

Delete /usr/local/etc/php.conf as well and start over.


----------



## nORKy (May 29, 2012)

When I compile, I have no package installed, it's a jailed environment. When a package is built, it is removed. Look at the dependency install process:

```
====>> Building lang/php53-extensions
===>   php53-extensions-1.6 depends on file: /usr/local/include/php/main/php.h - not found
===>    Verifying install for /usr/local/include/php/main/php.h in /usr/ports/lang/php53
===>   Installing existing package /usr/ports/packages/All/php53-5.3.13.tbz
===>   Returning to build of php53-extensions-1.6
===>   php53-extensions-1.6 depends on file: /usr/local/lib/php/20090626/bz2.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/bz2.so in /usr/ports/archivers/php53-bz2
===>   Installing existing package /usr/ports/packages/All/php53-bz2-5.3.13.tbz
===>   Returning to build of php53-extensions-1.6
===>   php53-extensions-1.6 depends on file: /usr/local/lib/php/20090626/ctype.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/ctype.so in /usr/ports/textproc/php53-ctype
===>   Installing existing package /usr/ports/packages/All/php53-ctype-5.3.13.tbz
===>   Returning to build of php53-extensions-1.6
===>   php53-extensions-1.6 depends on file: /usr/local/lib/php/20090626/curl.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/curl.so in /usr/ports/ftp/php53-curl
===>   Installing existing package /usr/ports/packages/All/php53-curl-5.3.13.tbz
...
===>   Returning to build of php53-extensions-1.6
===>   php53-extensions-1.6 depends on file: /usr/local/lib/php/20090626/pdf.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/pdf.so in /usr/ports/print/pecl-pdflib
===>   Installing existing package /usr/ports/packages/All/pecl-pdflib-2.1.8_1.tbz
pkg_add: package 'php5-5.4.3' conflicts with php53-5.3.13
pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
pkg_add: autoload of dependency '/usr/ports/packages/All/php5-5.4.3.tbz' failed!
pkg_add: package 'php5-5.4.3' conflicts with php53-5.3.13
pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
pkg_add: autoload of dependency '/usr/ports/packages/All/php5-5.4.3.tbz' failed!
pkg_add: autoload of dependency '/usr/ports/packages/All/php5-gd-5.4.3.tbz' failed!
```

All is OK except pecl-pdflib that tries to install php5-gd-5-4 (and not php53-gd).


----------



## gkontos (May 29, 2012)

You obviously seem to be mixing lang/php53 with lang/php5.

Please describe what method did you use exactly to install lang/php53. Also, please show the output of /usr/local/etc/php.conf.


----------



## nORKy (May 30, 2012)

I use portmaster. My /usr/local is empty because I have "NO package installed".
I try to compilte this:


```
databases/php53-pdo_dblib
databases/php53-pdo_mysql
databases/php53-mssql
graphics/php53-gd
lang/php53
lang/php53-extensions
```

The bug comes when it installs php53-extensions-1.6 => php53 => pdflib => php5-gd (bug here) => php54 (conflics because of php53-extensions installed php53).


----------



## frijsdijk (Jun 7, 2012)

Coming back to this issue, I think I've found a method that will let you upgrade the current version without first deleting it. So my case is:

Installed:         php5-5.3.11 (lang/php5).
Want to upgrade to: php53-5.3.13 (lang/php53)

I've figured this hacky method, it worked fine for me in the first case.

Shell used: bash (shells/bash)

Warning: use at own risk! Make backups before you start of /var/db/pkg and /var/db/ports.


```
# rename dirs that contain options files from php5* to php53*
cd /var/db/ports ; for f in php* ; do mv $f php53${f#php5}; done

# replace 'php5-' for 'php53-' in all options files
grep -rl 'php5-' /var/db/ports/*/options | sort -u | xargs sed -i '' 's|php5-|php53-|g'

# replace 'php5-' for 'php53-' in all +CONTENTS and +REQUIRED_BY files (portnames, (DEP)ORIGIN's) in /var/db/pkg
grep -Erl 'php5-|lang/php5' /var/db/pkg/*/+CONTENTS /var/db/pkg/*/+REQUIRED_BY | sort -u | xargs sed -i '' 's|php5-|php53-|g;s|lang/php5|lang/php53|g'

# if you use portinstall/portupgrade, then:

pkgdb -fu

# you should be able to upgrade php53-3.11 as normal:

portupgrade -pb php53-3.11  (should give you php53-3-13).
```

Some general tips for upgrading PHP on FreeBSD:


back up /usr/local/etc/php/extensions.ini (the order could be important) before you start
after the upgrade verify with *php -v* that you have no coredumps or segfaults (otherwise, try restoring the backed up extensions.ini first)
create `php -m > /tmp/m.1` before, and `php -m > /tmp/m.2` after the upgrade, and *diff* the two files so that you're sure you have all modules.


----------



## nORKy (Jun 8, 2012)

nORKy said:
			
		

> I use portmaster. My /usr/local is empty because I have "NO package installed".
> I try to compilte this:
> 
> 
> ...



I solved my problem. I put 
	
	



```
PHP_VER=53
```
 in /etc/make.conf


----------



## frijsdijk (Jun 11, 2012)

Ok, small error in this how-to, the last line is incorrect. The portname in this case of course is still php5-5.3.11. We can rename the entries in /var/db/pkg just as well, so the procedure would be:


```
# rename dirs that contain options files from php5* to php53*
cd /var/db/ports ; for f in php* ; do mv $f php53${f#php5}; done

# replace 'php5-' for 'php53-' in all options files
grep -rl 'php5-' /var/db/ports/*/options | sort -u | xargs sed -i '' 's|php5-|php53-|g'

# replace 'php5-' for 'php53-' in all +CONTENTS and +REQUIRED_BY files (portnames, (DEP)ORIGIN's) in /var/db/pkg
grep -Erl 'php5-|lang/php5' /var/db/pkg/*/+CONTENTS /var/db/pkg/*/+REQUIRED_BY | sort -u | xargs sed -i '' 's|php5-|php53-|g;s|lang/php5|lang/php53|g'

[b]# rename the php entries in /var/db/pkg:
cd /var/db/pkg ; for f in php* ; do mv $f php53${f#php5}; done[/b]

# if you use portinstall/portupgrade, then:

pkgdb -fu

# you should be able to upgrade php53-3.11 as normal:

portupgrade -pb php53-3.11  (should give you php53-3-13).
```

I just now upgraded a machine with php5-5.3.9 with this howto, and it worked fine!


----------



## gkontos (Jun 11, 2012)

frijsdijk said:
			
		

> Ok, small error in this how-to, the last line is incorrect. The portname in this case of course is still php5-5.3.11. We can rename the entries in /var/db/pkg just as well, so the procedure would be:



The script should rename the contents of the files inside php5 in /var/db/pkg as well.


----------



## frijsdijk (Jun 12, 2012)

gkontos said:
			
		

> The script should rename the contents of the files inside php5 in /var/db/pkg as well.



That's all done in the third line:


```
grep -Erl ...
```


----------



## gkontos (Jun 14, 2012)

Correct, I missed the line above the bold!


----------



## Mayhem30 (Jun 18, 2012)

Are the solutions offered here the only way to fix this mess?


----------



## gkontos (Jun 18, 2012)

Mayhem30 said:
			
		

> Are the solutions offered here the only way to fix this mess?



You can always contact the port maintainer. 

The solutions you see here are from sysadmins who had to deal with these issues and figured out a way to minimize down time.


----------



## Mayhem30 (Jun 26, 2012)

I tried contacting the port maintainer twice this past week .. and no response.

I'm assuming they really don't care about fixing this mess.


----------



## frijsdijk (Jun 27, 2012)

Probably a lack of time. Luckily, with UNIX, you can fix it yourself!


----------



## Mayhem30 (Jul 17, 2012)

I decided to give the workaround a shot, and have issues with the first line.



> cd /var/db/ports ; for f in php* ; do mv $f php53${f#php5}; done



That line throws an error (when using bin/ch) : Missing }

I logged out of root and tried :


```
sudo cd /var/db/ports ; for f in php* ; do mv $f php53${f#php5}; done
```

and that gives me the following error :


```
mv: rename php* to php53php*: No such file or directory
```

I'm not sure what to do next ...


----------



## frijsdijk (Jul 18, 2012)

Ok, this 'script' was intended for shells/bash. It won't work for any other shell (not even /bin/sh I think).


----------



## Mayhem30 (Jul 18, 2012)

My mistake! I just wanted to confirm something before continuing - does this look right?

After running :


```
cd /var/db/ports ; for f in php* ; do mv $f php53${f#php5}; done
```

The directory looks like this :


```
[root@localhost /var/db/ports]# ls php*
php53:
options

php53-dba:
options

php53-extensions:
options

php53-gd:
options

php53-mbstring:
options

php53-mysql:
options

php53-mysqli:
options

php53-pcre:
options

php53-pdo_mysql:
options

php53-sqlite:
options

php532:
options

php532-extensions:
options

php53phpMyAdmin:
options
[root@localhost /var/db/ports]#
```


----------



## Mayhem30 (Jul 20, 2012)

After following the instruction in this thread, I'm running in to issues.


```
# rename dirs that contain options files from php5* to php53*
cd /var/db/ports ; for f in php* ; do mv $f php53${f#php5}; done

# replace 'php5-' for 'php53-' in all options files
grep -rl 'php5-' /var/db/ports/*/options | sort -u | xargs sed -i '' 's|php5-|php53-|g'

# replace 'php5-' for 'php53-' in all +CONTENTS and +REQUIRED_BY files (portnames, (DEP)ORIGIN's) in /var/db/pkg
grep -Erl 'php5-|lang/php5' /var/db/pkg/*/+CONTENTS /var/db/pkg/*/+REQUIRED_BY | sort -u | xargs sed -i '' 's|php5-|php53-|g;s|lang/php5|lang/php53|g'

# rename the php entries in /var/db/pkg:
cd /var/db/pkg ; for f in php* ; do mv $f php53${f#php5}; done
```


This is what pkg_version -v shows :


```
php53-5.3.13                        !   Comparison failed
php53-extensions-1.6                !   Comparison failed
```

Also, "phpMyAdmin-3.5.1" has now been renamed to "php53MyAdmin-3.5.1".

How can I fix this?


----------



## konadave (Aug 15, 2012)

frijsdijk said:
			
		

> Ok, small error in this how-to, the last line is incorrect. The portname in this case of course is still php5-5.3.11. We can rename the entries in /var/db/pkg just as well, so the procedure would be:
> 
> 
> ```
> ...



I normally do a `# portupgrade -arR` every three to six months to update all the software on my home server. Whilst checking /usr/ports/UPDATING today before doing so, I saw that I would be switched over to PHP 5.4, which I would rather avoid. After following the above instructions, I get

```
# portupgrade -npb php5-3.10
--->  Session started at: Tue, 14 Aug 2012 20:05:09 -0500
** None has been installed or upgraded.
--->  Session ended at: Tue, 14 Aug 2012 20:05:09 -0500 (consumed 00:00:00)
```
I don't normally use -pb so not sure if that is an issue. Next I did

```
# portupgrade -anrR
--->  Session started at: Tue, 14 Aug 2012 19:29:40 -0500
** Port marked as IGNORE: archivers/php53-bz2:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: textproc/php53-ctype:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: ftp/php53-curl:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: textproc/php53-dom:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port directory not found: lang/php533-extensions
** Port marked as IGNORE: sysutils/php53-fileinfo:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: security/php53-filter:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: graphics/php53-gd:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: security/php53-hash:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: converters/php53-iconv:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: devel/php53-json:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: converters/php53-mbstring:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: security/php53-mcrypt:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: databases/php53-mysql:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: databases/php53-mysqli:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: security/php53-openssl:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: databases/php53-pdo:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: databases/php53-pdo_mysql:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: databases/php53-pdo_sqlite:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: archivers/php53-phar:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: www/php53-session:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: textproc/php53-simplexml:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: net/php53-sockets:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: databases/php53-sqlite3:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: devel/php53-tokenizer:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: textproc/php53-xml:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: archivers/php53-zip:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
** Port marked as IGNORE: archivers/php53-zlib:
	cannot install: doesn't work with PHP version : 5 (Doesn't support PHP 52 5)
--->  Upgrade of graphics/png started at: Tue, 14 Aug 2012 19:30:10 -0500
--->  Upgrading 'png-1.4.11' to 'png-1.5.12' (graphics/png)
OK? [no]
--->  Upgrade of graphics/png ended at: Tue, 14 Aug 2012 19:30:10 -0500 (consumed 00:00:00)
...
[snip]
...
--->  ** Upgrade tasks 31: 28 done, 28 ignored, 0 skipped and 0 failed
--->  Upgrade of lang/php53 started at: Tue, 14 Aug 2012 19:30:17 -0500
--->  Upgrading 'php53-5.3.10_1' to 'php53-5.3.15' (lang/php53)
OK? [no]
--->  Upgrade of lang/php53 ended at: Tue, 14 Aug 2012 19:30:17 -0500 (consumed 00:00:00)
--->  ** Upgrade tasks 31: 29 done, 28 ignored, 0 skipped and 0 failed
--->  Skipping 'print/pecl-pdflib' (pecl-pdflib-2.1.8_1) because a requisite package 'php53-gd-5.3.10_1' (graphics/php53-gd) failed (specify -k to force)
--->  ** Upgrade tasks 31: 29 done, 28 ignored, 1 skipped and 0 failed
--->  Skipping 'databases/phpmyadmin' (phpMyAdmin-3.5.0) because a requisite package 'php53-gd-5.3.10_1' (graphics/php53-gd) failed (specify -k to force)
--->  ** Upgrade tasks 31: 29 done, 28 ignored, 2 skipped and 0 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
	- archivers/php53-bz2 (marked as IGNORE)
	- textproc/php53-ctype (marked as IGNORE)
	- ftp/php53-curl (marked as IGNORE)
	- textproc/php53-dom (marked as IGNORE)
	- lang/php533-extensions (port directory error)
	- sysutils/php53-fileinfo (marked as IGNORE)
	- security/php53-filter (marked as IGNORE)
	- graphics/php53-gd (marked as IGNORE)
	- security/php53-hash (marked as IGNORE)
	- converters/php53-iconv (marked as IGNORE)
	- devel/php53-json (marked as IGNORE)
	- converters/php53-mbstring (marked as IGNORE)
	- security/php53-mcrypt (marked as IGNORE)
	- databases/php53-mysql (marked as IGNORE)
	- databases/php53-mysqli (marked as IGNORE)
	- security/php53-openssl (marked as IGNORE)
	- databases/php53-pdo (marked as IGNORE)
	- databases/php53-pdo_mysql (marked as IGNORE)
	- databases/php53-pdo_sqlite (marked as IGNORE)
	- archivers/php53-phar (marked as IGNORE)
	- www/php53-session (marked as IGNORE)
	- textproc/php53-simplexml (marked as IGNORE)
	- net/php53-sockets (marked as IGNORE)
	- databases/php53-sqlite3 (marked as IGNORE)
	- devel/php53-tokenizer (marked as IGNORE)
	- textproc/php53-xml (marked as IGNORE)
	- archivers/php53-zip (marked as IGNORE)
	- archivers/php53-zlib (marked as IGNORE)
	+ graphics/png (png-1.4.11)
	+ devel/m4 (m4-1.4.16,1)
	+ net/rsync (rsync-3.0.9)
	+ net/openldap24-client (openldap-client-2.4.31)
	+ databases/mysql51-client (mysql-client-5.1.62)
	+ misc/help2man (help2man-1.40.9)
	+ lang/python26 (python26-2.6.8)
	+ devel/autoconf (autoconf-2.68)
	+ textproc/libxml2 (libxml2-2.7.8_2)
	+ databases/sqlite3 (sqlite3-3.7.11)
	+ sysutils/smartmontools (smartmontools-5.42_3)
	+ devel/automake (automake-1.11.1)
	+ graphics/tiff (tiff-4.0.1_1)
	+ lang/tcl-modules (tcl-modules-8.5.11)
	+ lang/ruby18 (ruby-1.8.7.358,1)
	+ devel/bison (bison-2.5,1)
	+ ports-mgmt/portupgrade (portupgrade-2.4.9.4,2)
	+ shells/bash (bash-4.2.24)
	+ security/ca_root_nss (ca_root_nss-3.13.4)
	+ dns/libidn (libidn-1.22)
	+ dns/dnsmasq (dnsmasq-2.60_1,1)
	+ print/pdflib (pdflib-7.0.5)
	+ lang/tcl85 (tcl-8.5.11)
	+ x11/xcb-proto (xcb-proto-1.7)
	+ devel/pcre (pcre-8.30_2)
	+ databases/mysql51-server (mysql-server-5.1.62)
	+ net/samba35 (samba35-3.5.14_1)
	+ www/apache22 (apache-2.2.22_5)
	+ lang/php53 (php53-5.3.10_1)
	* print/pecl-pdflib (pecl-pdflib-2.1.8_1)
	* databases/phpmyadmin (phpMyAdmin-3.5.0)
--->  Packages processed: 29 done, 28 ignored, 2 skipped and 0 failed
--->  Session ended at: Tue, 14 Aug 2012 19:30:17 -0500 (consumed 00:00:36)
```
to see what would go down if I tried to do my normal upgrade. All of the PHP extensions get marked as IGNORE. If I do the upgrade as per above, and considering that lang/php53 gets upgraded, will an immediate identical upgrade afterwards cause the extensions to get upgraded? If not, what is the best way to go about fixing this.

Your expertise is much appreciated. Thanks.

Dave.


----------



## chrcol (Sep 20, 2012)

thanks for the procedure, and I agree backup extensions.ini because also not all extensions are in the php53-extensions ports eg. pecl-memcache.

So ehen I did this memcache was not enabled in php and I had to reinstall that port.  So backing up the extensions.ini gives a reference point to make sure you reinstalled all extensions.


----------

