<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>portsnap | /var/logs/paulooi.log</title>
	<atom:link href="https://logs.paulooi.com/tag/portsnap/feed" rel="self" type="application/rss+xml" />
	<link>https://logs.paulooi.com</link>
	<description>Systems Admin, Web Development and etc</description>
	<lastBuildDate>Fri, 02 Jul 2010 03:49:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Upgrade to php52 on FreeBSD</title>
		<link>https://logs.paulooi.com/upgrade-to-php52-on-freebsd.php</link>
					<comments>https://logs.paulooi.com/upgrade-to-php52-on-freebsd.php#respond</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Fri, 02 Jul 2010 03:48:55 +0000</pubDate>
				<category><![CDATA[Systems]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[portsnap]]></category>
		<category><![CDATA[portupgrade]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=1006</guid>

					<description><![CDATA[<p>By default, after portsnap to latest FreeBSD port tree, it will upgrade your php5.2 to php5.3 automatically. There isn&#8217;t any option where you can to remain your PHP version to 5.2. In order to keep my PHP applications running on...</p>
The post <a href="https://logs.paulooi.com/upgrade-to-php52-on-freebsd.php">Upgrade to php52 on FreeBSD</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<p>By default, after portsnap to latest FreeBSD port tree, it will upgrade your php5.2 to php5.3 automatically. There isn&#8217;t any option where you can to remain your PHP version to 5.2. </p>
<p>In order to keep my PHP applications running on PHP version 5.2, what I did is upgrade all php5-* packages to php52-*, but it will be a little waste of time if doing it manually, port by port. </p>
<p>So I written this simple bash to output me the packages of php5-* which need to upgrade to php52-*</p>
<pre>
<code>
for d in `portversion -vL= | grep php5 | awk '{print $1}'`; do  OLD=`echo $d | cut -d - -f 1,2`; NEW=`echo $d | sed s/php5/php52/ | cut -d - -f 1,2`; THEPATH=`whereis $NEW | awk '{print $2}' | cut -d / -f 4,5`; echo "portupgrade -o $THEPATH $OLD && \\"; done
</code>
</pre>
<p>The bash will actually output </p>
<pre>
<code>
portupgrade -o textproc/php52-simplexml php5-simplexml && \
portupgrade -o devel/php52-spl php5-spl && \
portupgrade -o databases/php52-sqlite php5-sqlite && \
portupgrade -o devel/php52-tokenizer php5-tokenizer && \
portupgrade -o textproc/php52-xml php5-xml && \
portupgrade -o textproc/php52-xmlreader php5-xmlreader && \
portupgrade -o textproc/php52-xmlwriter php5-xmlwriter && \
portupgrade -o archivers/php52-zip php5-zip && \
portupgrade -o archivers/php52-zlib php5-zlib && \ 
</code>
</pre>
<p>Before upgrading the php extensions package, upgrade your php52 as below</p>
<pre>
<code>
portupgrade -o lang/php52 php5
</code>
</pre>
<p>On the last time, remember to remove &#8220;&#038;&#038; \&#8221;, or you can press enter key twice to activate the upgrade. </p>The post <a href="https://logs.paulooi.com/upgrade-to-php52-on-freebsd.php">Upgrade to php52 on FreeBSD</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/upgrade-to-php52-on-freebsd.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
