Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2012 09:55:46 -0500
From:      Peggy Wilkins <enlil65@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   How to switch between PHP 5.3/5.4 (either direction) with extensions
Message-ID:  <CAG_3X=nB6UMnBatu%2Bbv-DtLeNViQu-m_N50iM1EhsGd29Uq0cA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I tried upgrading PHP from 5.3 to 5.4 version yesterday.  The upgrade
worked well as expected, however it turns out that my system runs some
locally written PHP that is not yet compatible with 5.4 so I needed to
go back to 5.3 for now.  This worked fine for that purpose:

portmaster -o lang/php53 lang/php5

However, this did not work well for the PHP extensions meta-port:

portmaster -o lang/php53-extensions lang/php5-extensions

This replaced the ...-extensions port as expected, and pulled in all
the 5.3 versions of my selected extensions; but the pulled-in 5.3
extensions were installed IN ADDITION TO the already installed 5.4
ones.

What I ended up with is all my selected extensions installed for both
PHP 5.3 and 5.4:

php5-ctype-5.4.4
php5-curl-5.4.4
php5-dba-5.4.4
php5-dom-5.4.4
php5-filter-5.4.4
php5-gd-5.4.4
php5-hash-5.4.4
php5-iconv-5.4.4
php5-json-5.4.4
php5-ldap-5.4.4
php5-mysql-5.4.4
php5-mysqli-5.4.4
php5-pdo-5.4.4
php5-pdo_sqlite-5.4.4
php5-phar-5.4.4
php5-posix-5.4.4
php5-session-5.4.4
php5-simplexml-5.4.4
php5-sqlite3-5.4.4
php5-tokenizer-5.4.4
php5-xml-5.4.4
php5-xmlreader-5.4.4
php5-xmlwriter-5.4.4
php5-xsl-5.4.4
php5-zip-5.4.4
php53-5.3.14
php53-ctype-5.3.14
php53-curl-5.3.14
php53-dba-5.3.14
php53-dom-5.3.14
php53-extensions-1.6
php53-filter-5.3.14
php53-gd-5.3.14
php53-hash-5.3.14
php53-iconv-5.3.14
php53-json-5.3.14
php53-ldap-5.3.14
php53-mysql-5.3.14
php53-mysqli-5.3.14
php53-pdo-5.3.14
php53-pdo_sqlite-5.3.14
php53-phar-5.3.14
php53-posix-5.3.14
php53-session-5.3.14
php53-simplexml-5.3.14
php53-sqlite-5.3.14
php53-sqlite3-5.3.14
php53-tokenizer-5.3.14
php53-xml-5.3.14
php53-xmlreader-5.3.14
php53-xmlwriter-5.3.14
php53-xsl-5.3.14
php53-zip-5.3.14

I don't know how to recover from this short of uninstalling all of the
PHP ports and then installing from scratch.

Also at some point I will want to replace 5.3 with 5.4 again, and I
don't want to end up with the same issue.  How have folks been
swapping between these PHP port versions?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG_3X=nB6UMnBatu%2Bbv-DtLeNViQu-m_N50iM1EhsGd29Uq0cA>