From owner-freebsd-ports@FreeBSD.ORG Sun May 13 09:54:46 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6A4106566B for ; Sun, 13 May 2012 09:54:46 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 0E5C68FC0A for ; Sun, 13 May 2012 09:54:45 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q4D9saOG041138 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 13 May 2012 10:54:37 +0100 (BST) (envelope-from matthew@FreeBSD.org) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q4D9saOG041138 Authentication-Results: smtp.infracaninophile.co.uk/q4D9saOG041138; dkim=none (no signature); dkim-adsp=none Message-ID: <4FAF84D5.4030709@FreeBSD.org> Date: Sun, 13 May 2012 10:54:29 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Jos Chrispijn References: <4FAF6E5E.9000200@webrz.net> In-Reply-To: <4FAF6E5E.9000200@webrz.net> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9913E08B90FFA93185AC0E60" X-Virus-Scanned: clamav-milter 0.97.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-ports@FreeBSD.org Subject: Re: PHP upgrade through port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 09:54:46 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9913E08B90FFA93185AC0E60 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 13/05/2012 09:18, Jos Chrispijn wrote: > Currently I use php52-5.2.17_8 but want to upgrade to php52-5.3.xxx > through the ports. > Can somebody tell me how I can force portupgrade to do so? Basically you should delete any php52 or pecl ports, and anything that depends on them. Then install the php53 equivalents, reinstall the pecl modules and finally reinstall your php-based applications. As ever, make sure you have good backups before starting this procedure. So: # pkg_info -IX '^(php5|pecl)' > /tmp/php-modules # pkg_delete -rX '^php5' 2>&1 > /tmp/php-deletion-log You might also want to save the output of 'pecl list' (if any) and 'pear list' if pecl and pear are installed on your system. Force the correct base version of php to be installed: # portmaster lang/php5 Reinstall any ported PHP applications, eg phpMyAdmin: # portmaster databases/phpmyadmin (etc., etc. for all the apps you had installed: check /tmp/php-deletion-log for details. This should install any necessary dependencies.) Finally, compare what you just installed with the record of what you previously installed to fix up any discrepancies, eg. if you have PHP applications installed from non-ports sources. There isn't an exact one-to-one correspondence between php52-* and php5-* ports (as I recall), since some functions have been moved into the PHP core, or shifted between different modules or moved to pear- or pecl- modules. However, those are generally the exceptions: if you can't find the exact equivalent php53 module, then (a) try the application without, (b) check the documentation on www.php.net for clues and finally (c) look for equivalent pear- or pecl- modules. Any PHP application installed from ports should automatically install everything it needs through the ports dependency mechanism. Also, if you use eAccelerator or similar, be sure to reinstall it after upgrading PHP. Note: the lang/php5 port is the correct port for php-5.3.x at the time of writing, but that port is very soon going to switch to providing php-5.4.x, and you would need to switch to lang/php53 if you don't want to go through yet another upgrade. Note 2: beware of the common problem with ordering of extension loadable modules in /usr/local/etc/php/extensions.ini -- some php modules depend on others; unfortunately there's no good way of controlling the order the modules are listed in extensions.ini to account for this. If php crashes on startup, swapping lines around in that file may well be the solution. It's been discussed many times on this list and freebsd-questions@..., so check the archives in case of difficulty. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --------------enig9913E08B90FFA93185AC0E60 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+vhNsACgkQ8Mjk52CukIyW2QCcC16wf5kY5DkgXfQba7FAAnCY WQsAn2gWc5I54ILln3t2ugPGXyCdlRRt =uA4i -----END PGP SIGNATURE----- --------------enig9913E08B90FFA93185AC0E60--