PHP upgrade through port

Jerry jerry at seibercom.net
Sun May 13 12:40:06 UTC 2012


On Sun, 13 May 2012 13:47:39 +0200
Jos Chrispijn articulated:

>Matthew Seaman:
>> 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 at ..., so check the archives
>> in case of difficulty.

Please don't TOP POST (corrected here). If you don't know what that
means, Google for it.

>Hi Matthew,
>
>Thanks for your reply.
>For some reason that didn't work completely; must be because I am
>rather a newbie on this.
>Now I removed php5.2 all together from my FreeBSD server (including
>all related programs).
>
>If I now want to install php 5.3, how do I install the extensions as 
>there is no php53-extensions?
>Or should I use the php52-extensions instead?

After installing the php5

you will need to install the "php5-extensions-1.6" port:
"/usr/ports/lang/php5-extensions". Be sure to run "make config" in the
port prior to installing it. That also applies to the "php5-5.3.13"
port: "/usr/ports/lang/php5", especially if you need support for
Apache. It is not built by default.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________



More information about the freebsd-ports mailing list