<?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>Dusty Reagan &#187; PHP</title>
	<atom:link href="http://dustyreagan.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://dustyreagan.com</link>
	<description>On Technology &#38; Entrepreneurship</description>
	<lastBuildDate>Thu, 01 Dec 2011 08:00:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to reference Smarty variables inside {php} tags</title>
		<link>http://dustyreagan.com/how-to-reference-smarty-variables-inside-php-tags/</link>
		<comments>http://dustyreagan.com/how-to-reference-smarty-variables-inside-php-tags/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 10:01:15 +0000</pubDate>
		<dc:creator>Dusty Reagan</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[JobberBase]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Smarty]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/?p=410</guid>
		<description><![CDATA[I gotta&#8217; be honest, I&#8217;ve never used the Smarty Template Engine before in my life. I&#8217;m currently working on a project to integrate WordPress and JobberBase so they use the same WordPress theme. JobberBase uses Smarty, so I&#8217;m getting a crash course. &#8230; <a href="http://dustyreagan.com/how-to-reference-smarty-variables-inside-php-tags/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I gotta&#8217; be honest, I&#8217;ve never used the <a href="http://www.smarty.net/" target="_blank">Smarty Template Engine</a> before in my life. I&#8217;m currently working on a project to integrate WordPress and JobberBase so they use the same <a href="http://wordpress.org/" target="_blank">WordPress</a> theme. <a href="http://jobberbase.com/" target="_blank">JobberBase</a> uses Smarty, so I&#8217;m getting a crash course.</p>
<p>You can use PHP in the template (.tpl) files and reference the values of the assigned Smarty template variables like this:</p>
<pre>{php}
  $html_title = $this-&gt;_tpl_vars['html_title'];
  $echo $html_title;
{/php}</pre>
<p>I&#8217;m sure Smarty users cringe at this sort of thing, being that it adds business logic to the template files. But, this is just the functionality I need to hack the JobberBase templates without mucking around in core JobberBase code.</p>
<p>I found this solution in the <a href="http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions#template-8" target="_blank">Smarty FAQ</a> after hours of Googling.</p>
<img src="http://dustyreagan.com/?ak_action=api_record_view&id=410&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/how-to-reference-smarty-variables-inside-php-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Downgrade PHP 5.3 to 5.2</title>
		<link>http://dustyreagan.com/downgrade-php-5-3-to-5-2/</link>
		<comments>http://dustyreagan.com/downgrade-php-5-3-to-5-2/#comments</comments>
		<pubDate>Wed, 05 May 2010 06:20:52 +0000</pubDate>
		<dc:creator>Dusty Reagan</dc:creator>
				<category><![CDATA[IT & Administration]]></category>
		<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/?p=195</guid>
		<description><![CDATA[Like many others, I recently upgraded my Production server to PHP 5.3. I&#8217;m not quite sure of the reason anymore. I think I was trying to integrate a PHP profiler that required something in 5.3. Whatever my original reason, after &#8230; <a href="http://dustyreagan.com/downgrade-php-5-3-to-5-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">Like many others, I recently upgraded my Production server to PHP 5.3. I&#8217;m not quite sure of the reason anymore. I think I was trying to integrate a PHP profiler that required something in 5.3. Whatever my original reason, after I got 5.3 installed on my server, it started slowly hemorrhaging memory and occasionally freezing up, always during the middle of the night while I slept of course. So, today I set about downgrading PHP 5.3.2 to PHP 5.2.13. Here is what worked for me.</p>
<h1>The Setup</h1>
<p style="text-align: justify">First off, I&#8217;m running Ubuntu-Hardy, and both my PHP 5.3 and 5.2 distributions came from <a href="http://dotdeb.org/">dotdeb.org</a>. I have a Production server and a Test server that I try to keep as similar as possible. The first thing I did was make a backup of my Test server with PHP 5.3 installed and my app functional. Then I began hacking away on my Test server trying to successfully downgrade to PHP 5.2. When I screwed the Test server up beyond repair, I restored from backup. Likewise, when I made progress I documented my steps, restored from backup, and tried to repeat my success. I did this several times and eventually made a script that successfully downgraded PHP. I rehearsed this script 3 times on my Test server, backed-up my Production server, then repeated the script on my Production server. IT WORKED!</p>
<p style="text-align: justify"><em><strong>NOTICE:</strong></em> I probably have a couple of unnecessary steps in here that I didn&#8217;t bother to investigate their necessity. You may also need to uninstall and reinstall different PHP modules than I did, depending on the requirements of your applications.</p>
<h1>My Final Steps</h1>
<ol>
<li>Remove PHP
<ol>
<li><em>sudo apt-get remove php5-common</em></li>
<li><em>sudo apt-get remove php5-cli</em></li>
<li><em>sudo apt-get remove php5</em></li>
<li><em>sudo apt-get autoremove memcached</em></li>
</ol>
</li>
<li>Update your sources list to point to PHP 5.2
<ol>
<li><em>sudo nano /etc/apt/sources.list</em></li>
<li>Remove the references to PHP 5.3 packages. For me that was:
<pre>deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all</pre>
</li>
<li>Add the following 5.2 packages:
<pre>deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all</pre>
</li>
</ol>
</li>
<li>Install PHP 5.2
<ol>
<li><em>sudo apt-get update</em></li>
<li><em>sudo apt-get install php5-cli</em></li>
<li><em>sudo apt-get install php5</em></li>
</ol>
</li>
<li>Reinstall any PHP modules your application requires. For me that was:
<ol>
<li><em>sudo apt-get install memcached</em></li>
<li><em>sudo apt-get install php5-memcache</em></li>
<li><em>sudo apt-get install php5-curl</em></li>
<li><em>sudo apt-get install php5-mysql</em></li>
</ol>
</li>
<li><em>sudo reboot</em></li>
</ol>
<p>After my production server rebooted, I had to fidget with Apache to get it started again. You may have to:</p>
<ul>
<li><em>sudo /etc/init.d/apache2 restart</em></li>
<li><em>sudo /etc/init.d/apache2 stop</em></li>
<li><em>sudo /etc/init.d/apache2 start</em></li>
</ul>
<p>Hope this helps!</p>
<img src="http://dustyreagan.com/?ak_action=api_record_view&id=195&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/downgrade-php-5-3-to-5-2/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to Update Ubuntu Hardy to PHP 5.2.9</title>
		<link>http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/</link>
		<comments>http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 09:01:04 +0000</pubDate>
		<dc:creator>Dusty Reagan</dc:creator>
				<category><![CDATA[IT & Administration]]></category>
		<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[alt]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/?p=133</guid>
		<description><![CDATA[First upgrade your software as is. &#62;&#62; sudo apt-get update &#62;&#62; sudo apt-get upgrade Then add the following to your /etc/apt/sources.list file. &#62;&#62; sudo nano /etc/apt/sources.list deb http://http.us.debian.org/debian stable all deb http://security.debian.org/ stable/updates main contrib deb http://packages.dotdeb.org/ stable all Finally &#8230; <a href="http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3><strong>First</strong> upgrade your software as is.</h3>
<p><code>&gt;&gt; sudo apt-get update</code></p>
<p><code>&gt;&gt; sudo apt-get upgrade</code></p>
<h3><strong>Then</strong> add the following to your /etc/apt/sources.list file.</h3>
<p><code>&gt;&gt; sudo nano /etc/apt/sources.list</code></p>
<pre>deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all</pre>
<h3><strong></p>
<p>Finally</strong> run the update to install PHP 5.2.9.</h3>
<p><code>&gt;&gt; sudo apt-get update</code></p>
<p><code>&gt;&gt; sudo apt-get install php5-cli</code></p>
<p><code>&gt;&gt; sudo /etc/init.d/apache2 restart</code></p>
<img src="http://dustyreagan.com/?ak_action=api_record_view&id=133&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

