<?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>ICESQUARE - Solve Computer Server Problems, Computer Help, Server Support, Server Help</title>
	<atom:link href="http://icesquare.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://icesquare.com/wordpress</link>
	<description>Solve Computer Server Problems, Computer Help, Server Support, Server Help</description>
	<lastBuildDate>Wed, 22 Feb 2012 05:22:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Add-ons for New Version of Firefox 10</title>
		<link>http://icesquare.com/wordpress/firefox-add-ons/</link>
		<comments>http://icesquare.com/wordpress/firefox-add-ons/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 17:22:40 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Everyday Computer Problem]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=1438</guid>
		<description><![CDATA[Every time Firefox releases a major upgrade, we love it because it comes with lots of cool features. At the mean time, we hate it because lots of our favorite add-ons are not working with the new Firefox. Sometimes, the owners of the add-ons might be too busy, and it might take a while to [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2011/11/firefox-09-intro-150x150.png" alt="" title="Firefox" width="150" height="150" class="alignleft size-thumbnail wp-image-1765" /></p>
<p>Every time Firefox releases a major upgrade, we love it because it comes with lots of cool features. At the mean time, we hate it because lots of our favorite add-ons are not working with the new Firefox. Sometimes, the owners of the add-ons might be too busy, and it might take a while to release a compatible version. That&#8217;s why I put some of my favorite add-ons here. They are 100% compatible with the new Firefox, and I only modified the source codes that by-pass the version compatibly check.</p>
<p>In the other words, the add-on will work the way it was in the old version, and you will receive an upgrade if the owner releases a newer version.</p>
<p>So far I have made the following add-ons available in the latest version of Firefox:</p>
<style>
.tableHeader{
   border:1px dashed #666; padding:5px; font-weight:bold; font-size:15px;
}</p>
<p>.tableContent{
   border:1px dashed #666; padding:10px; font-weight:bold; font-size:13px;
}
</style>
<table style="border:1px dashed #666; padding:5px; margin:10px;">
<tr>
<td class="tableHeader">Add-On</td>
<td class="tableHeader">Download</td>
<td class="tableHeader">Comment</td>
<td class="tableHeader">Author&#8217;s URL</td>
</tr>
<tr>
<td class="tableHeader">BandWidthTester 0.5.9</td>
<td class="tableHeader"><a href="/download/BandWidthTester-0.5.9-icesquare.com.xpi" title="BandWidthTester 0.5.9">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader">N.A</td>
</tr>
<tr>
<td class="tableHeader">BlockSite 0.7.1.1</td>
<td class="tableHeader"><a href="/download/blocksite-0.7.1.1-fx-icesquare.com.xpi" title="BlockSite 0.7.1.1">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader"><a href="https://addons.mozilla.org/en-us/firefox/addon/blocksite/" title="BlockSite" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">Bookmark Duplicate Detector 0.7.5</td>
<td class="tableHeader"><a href="/download/bookmark_duplicate_detector-0.7.5-fx_icesquare.com.xpi" title="Bookmark Duplicate Detector 0.7.5">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader"><a href="https://addons.mozilla.org/en-US/firefox/addon/bookmark-duplicate-detector/" title="Bookmark Duplicate Detector" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">CopyPlainText 0.3.4</td>
<td class="tableHeader"><a href="/download/CopyPlainText-0.3.4.xpi" title="CopyPlainText 0.3.4">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader">N.A.</td>
</tr>
<tr>
<td class="tableHeader">del.icio.us 1.2.1</td>
<td class="tableHeader"><a href="/download/del.icio.us_buttons-1.2.1-updated.xpi" title="del.icio.us 1.2.1">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader">N.A.</td>
</tr>
<tr>
<td class="tableHeader">FireSheep 0.1.1</td>
<td class="tableHeader"><a href="/download/firesheep-0.1-1-icesquare.xpi" title="FireSheep 0.1.1">Download</a></td>
<td class="tableHeader">Not tested</td>
<td class="tableHeader"><a href="https://github.com/codebutler/firesheep/downloads" title="FireSheep" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">Google Calendar Tab 3.8</td>
<td class="tableHeader"><a href="/download/google_calendar_tab-3.8-tb.xpi" title="Google Calendar Tab 3.8">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader">N.A.</td>
</tr>
<tr>
<td class="tableHeader">Multiproxy Switch 1.33</td>
<td class="tableHeader"><a href="/download/multiproxy_switch_1.33-icesquare.com.xpi" title="Multiproxy Switch 1.33">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader"><a href="http://sites.google.com/site/switchproxy/" title="Multiproxy Switch" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">PermaTabs Mod 1.93</td>
<td class="tableHeader"><a href="/download/permatabs_mod-1.9.3-fx-icesquare.com.xpi" title="PermaTabs Mod 1.93">Download</a></td>
<td class="tableHeader">Not Tested</td>
<td class="tableHeader"><a href="http://snaplinks.mozdev.org" title="Snap Links Plus" target="_blank">Add-on Homepage</a></td>
</tr>
<tr>
<td class="tableHeader">Snap Links Plus 1.08</td>
<td class="tableHeader"><a href="/download/snaplinks-1.0.8-fx+sm-icesquare.com.xpi" title="Snap Links 1.0.8">Download</a></td>
<td class="tableHeader">Tested</td>
<td class="tableHeader">N.A.</td>
</tr>
</table>
<p>If you need any add-on, please post in the comment below. I will try to make it available here.</p>
<p>Enjoy your new Firefox!</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-1438"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffirefox-add-ons%2F' data-shr_title='Add-ons+for+New+Version+of+Firefox+10'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffirefox-add-ons%2F' data-shr_title='Add-ons+for+New+Version+of+Firefox+10'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/firefox-add-ons/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>ZFS: Compression VS Deduplication (Dedup) in Simple English</title>
		<link>http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/</link>
		<comments>http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 16:36:45 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[dedup]]></category>
		<category><![CDATA[deduplication]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2689</guid>
		<description><![CDATA[Many people are confused between the compression and deduplication because they are so similar. Both of them are designed to reduce the size of the data being stored in the storage. Let me explain the difference between them in simple English. 1. This is how your data looks like originally (Assuming only one unique file): [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><style>
.separator{
   border:1px dashed #999;
   margin:20px;
}
</style>
<p><img src="/wordpress/wp-content/uploads/2012/02/Data.png" alt="" title="Data" width="165" height="167" class="alignleft" /></p>
<p>Many people are confused between the compression and deduplication because they are so similar. Both of them are designed to reduce the size of the data being stored in the storage. Let me explain the difference between them in simple English.</p>
<div style="margin-top:100px;"></div>
<h3>1. This is how your data looks like originally (Assuming only one unique file):</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>2. This is how your data look like after being stored in a ZFS pool with compression enabled.</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/></p>
<div class="separator"></div>
<h3>3. This is how your data look like after being stored in a ZFS pool with deduplication enabled.</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>4. Let say we are storing three identical files, i.e., </h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>5. ZFS: Compression Only</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/></p>
<div class="separator"></div>
<h3>6. ZFS: Deduplication Only</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_big.png"/></p>
<div class="separator"></div>
<h3>7. ZFS: Compression + Deduplication</h3>
<p><img src="/wordpress/wp-content/uploads/2012/02/apple_small.png"/></p>
<div style="margin-top:100px;"></div>
<p>Of course, enabling both compression and deduplication will save lots of free space. However, it comes with a very high price tag. If you like to enable deduplication, you need to make sure that you have at least 2GB of memory per 1TB of storage. For example, if your ZFS pool is 10TB, you need to have 20GB of memory installed in your system. Otherwise, you will experience a huge performance hit.</p>
<p>Hope this article helps you to understand the difference between compression and deduplication.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2689"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fzfs-compression-vs-deduplication-dedup-in-simple-english%2F' data-shr_title='ZFS%3A+Compression+VS+Deduplication+%28Dedup%29+in+Simple+English'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fzfs-compression-vs-deduplication-dedup-in-simple-english%2F' data-shr_title='ZFS%3A+Compression+VS+Deduplication+%28Dedup%29+in+Simple+English'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/zfs-compression-vs-deduplication-dedup-in-simple-english/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Reason Why You Should NOT Use Microsoft Exchange in Your Business</title>
		<link>http://icesquare.com/wordpress/top-reason-why-you-should-not-use-microsoft-exchange-in-your-business/</link>
		<comments>http://icesquare.com/wordpress/top-reason-why-you-should-not-use-microsoft-exchange-in-your-business/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:39:35 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Fun Stuffs]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Microsoft Exchange]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2671</guid>
		<description><![CDATA[Today, I sent a message to a company through their contact page on their website. It is a standard contact page, i.e., you need to fill in your contact information and the details of your request, and they will follow up with you later. An hour later, I received a reply from them, saying that [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/02/failure-sign1-300x198.jpg" alt="" title="Failure" width="300" height="198" class="alignleft size-medium wp-image-2675" /></p>
<p>Today, I sent a message to a company through their contact page on their website. It is a standard contact page, i.e., you need to fill in your contact information and the details of your request, and they will follow up with you later. An hour later, I received a reply from them, saying that they would like more information from me. Therefore, I reply to their email. Few seconds later, I got the following:</p>
<pre>
Delivery has failed to these recipients or distribution lists:

Assistly@company.com
Your message wasn't delivered because of security policies. Microsoft Exchange will not try to redeliver this message for you. Please provide the following diagnostic text to your system administrator.
Sent by Microsoft Exchange Server 2007

Diagnostic information for administrators:

....

(Another 100 lines of error messages)
</pre>
<p>
Initially, I thought I made a mistake when typing the email address. Therefore, I redid it and verified every single letter in the email address. Unfortunately, I got the same message again. After trying it for 5 times, I gave up, and this company loses a sale.</p>
<p>
There are few things we&#8217;ve learned here. First, never display very technical error messages to the customers. They are very boring for non-engineers. Second, don&#8217;t assume that every customer is patient. Not every one is willing to re-send the same email for 5 times. Third, it takes many years to build a city but it only takes few hours to destroy it. With today&#8217;s technology, it is too easy to spread out the bad words.</p>
<p>
I think this is not a right way to run a custom request management system (or ticket system). It should never yell to the customer. Instead, it should let the stuffs to evaluate the customer&#8217;s reply rather than letting the Microsoft Exchange Server to do it.</p>
<p>I don&#8217;t recommend using Microsoft Exchange for your business. It just hurts your business.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2671"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ftop-reason-why-you-should-not-use-microsoft-exchange-in-your-business%2F' data-shr_title='Top+Reason+Why+You+Should+NOT+Use+Microsoft+Exchange+in+Your+Business'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ftop-reason-why-you-should-not-use-microsoft-exchange-in-your-business%2F' data-shr_title='Top+Reason+Why+You+Should+NOT+Use+Microsoft+Exchange+in+Your+Business'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/top-reason-why-you-should-not-use-microsoft-exchange-in-your-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Solved]Failed to enable the &#8216;dataready&#8217; Accept Filter</title>
		<link>http://icesquare.com/wordpress/solvedfailed-to-enable-the-dataready-accept-filter/</link>
		<comments>http://icesquare.com/wordpress/solvedfailed-to-enable-the-dataready-accept-filter/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 04:37:11 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2662</guid>
		<description><![CDATA[After I updated the Apache to 2.2.22 for my FreeBSD box today, I got a problem: #apachectl stop #apachectl start [warn] (2)No such file or directory: Failed to enable the 'dataready' Accept Filter If you search for Failed to enable the &#8216;dataready&#8217; Accept Filter on Google, you probably will find a lot of posts about [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/02/981694_color_feather_isolated_2.jpg" alt="" title="Apache Problem" width="250" class="alignleft size-full wp-image-2667" /></p>
<p>After I updated the Apache to 2.2.22 for my FreeBSD box today, I got a problem:</p>
<pre style="margin-left:250px;">
#apachectl stop
#apachectl start

[warn] (2)No such file or directory: Failed to enable the 'dataready' Accept Filter
</pre>
<p>If you search for <strong>Failed to enable the &#8216;dataready&#8217; Accept Filter</strong> on Google, you probably will find a lot of posts about this solution, like the following:</p>
<pre>
#kldload accf_http
</pre>
<p>Or include the following in the boot loader (/boot/loader.conf):</p>
<pre>
accf_http_load="YES"
</pre>
<p>However, even you already done these two things, this problem still exists. </p>
<pre>
#kldload accf_http
kldload: can't load accf_http: File exists
</pre>
<p>Why? That&#8217;s because the problem is not coming from accf_http. Instead, the problem is the missing dataready filter, which is accf_data. To solve this problem, simply do the following. First, update the <strong>/boot/loader.conf</strong> and add the following into the file: </p>
<p></p>
<pre>
accf_data_load="YES"
</pre>
<p>Of course, any changes to the boot loader requires a reboot. If you don&#8217;t want to reboot the machine, simple load the module manually and restart the Apache, i.e.,</p>
<pre>
#kldload accf_data
#apachectl stop
#apachectl start
</pre>
<p>That&#8217;s it! Apache will stop complaining the dataready filter and will work happily.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2662"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fsolvedfailed-to-enable-the-dataready-accept-filter%2F' data-shr_title='%5BSolved%5DFailed+to+enable+the+%27dataready%27+Accept+Filter'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fsolvedfailed-to-enable-the-dataready-accept-filter%2F' data-shr_title='%5BSolved%5DFailed+to+enable+the+%27dataready%27+Accept+Filter'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/solvedfailed-to-enable-the-dataready-accept-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP]imagecreatefrompng Error (After upgrading FreeBSD)</title>
		<link>http://icesquare.com/wordpress/php-imagecreatefrompng-error/</link>
		<comments>http://icesquare.com/wordpress/php-imagecreatefrompng-error/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 19:02:11 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Programming Problems]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2646</guid>
		<description><![CDATA[Today, I found that one of my PHP scripts stop working. After some investigations, I found that it was the function, imagecreatefrompng, which caused the problem. Interestingly, other similar functions such as imagecreatefromgif and imagecreatefromjpeg were completely working fine. The program stopped working when calling imagecreatefrompng only. Initially, I thought the problem was coming from [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/01/error.png" class="alignleft" /></p>
<p>Today, I found that one of my PHP scripts stop working. After some investigations, I found that it was the function, <strong>imagecreatefrompng</strong>, which caused the problem.</p>
<p>Interestingly, other similar functions such as imagecreatefromgif and imagecreatefromjpeg were completely working fine. The program stopped working when calling <strong>imagecreatefrompng</strong> only.</p>
<p class="alignright"></p>
<p>Initially, I thought the problem was coming from the PHP side. Therefore, I tried to get the error messages as many as possible, such as PHP error (error_reporting), Apache error (error_log), and even system error (dmesg). Unfortunately, I couldn&#8217;t find anything.</p>
<p>The script was working completely fine until I upgraded the system. So I think the problem may come from a missing library. To give you some background, here is how <strong>imagecreatefrompng</strong> works. First, your program calls <strong>imagecreatefrompng</strong>, which involves the GD library. GD library calls a PNG function in your system (possibly libpng) to process the PNG file. Since the program comes with from the system library, PHP / Apache will not report anything about it.</p>
<p>Since it will be too complicated to identify which library caused the problem, I decide to reinstall all ports. It sounds a very long process but it wasn&#8217;t at all. It only took 20 minutes to finish the whole thing. So here is what I did:</p>
<p></p>
<pre>
#FreeBSD
#sudo portmaster -fa
</pre>
<p>After the installation is completed, I rebooted the machine and everything worked again!</p>
<p>Enjoy!</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2646"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fphp-imagecreatefrompng-error%2F' data-shr_title='%5BPHP%5Dimagecreatefrompng+Error+%28After+upgrading+FreeBSD%29'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fphp-imagecreatefrompng-error%2F' data-shr_title='%5BPHP%5Dimagecreatefrompng+Error+%28After+upgrading+FreeBSD%29'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/php-imagecreatefrompng-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upgrade FreeBSD from 8 to 9</title>
		<link>http://icesquare.com/wordpress/upgrade-freebsd-8-to-9/</link>
		<comments>http://icesquare.com/wordpress/upgrade-freebsd-8-to-9/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 18:48:36 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2616</guid>
		<description><![CDATA[Upgrading FreeBSD is very easy. Thanks for the simple architecture and the disconnection between the kernel and the applications (ports), it won&#8217;t take too long to upgrade the system (15 to 45 mins). Here is a quick tutorial to show you how to do it. Notice that this tutorial only works for i386 or amd64. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2011/09/FreeBSDIcon.png" class="alignleft" width="250"/></p>
<p>Upgrading FreeBSD is very easy. Thanks for the simple architecture and the disconnection between the kernel and the applications (ports), it won&#8217;t take too long to upgrade the system (15 to 45 mins). Here is a quick tutorial to show you how to do it.</p>
<p>Notice that this tutorial only works for i386 or amd64. For other CPU architectures such as Sparc, you will either reinstall the whole thing or <a href="http://www.surlyjake.com/2009/03/how-to-update-my-sparc-freebsd-install/" target="_blank">rebuild the whole world</a> (i.e., make buildworld). One way or the other, that&#8217;s a very time-consuming process.</p>
<p>First, I am assuming that your FreeBSD is up-to-date in your current version. You can do it by running the following command:</p>
<p>First, make sure that your ports are up to date.</p>
<pre>
#Download the latest ports
sudo portsnap fetch update

#Upgrade the old ports:
sudo portmaster -Da
</pre>
<p>Next, we want to upgrade the FreeBSD. Currently, the lastest version is 9.0:</p>
<pre>
sudo freebsd-update upgrade -r 9.0-RELEASE
</pre>
<p>FreeBSD will try to download files for you. Just say yes.</p>
<pre>
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 8.2-RELEASE from update5.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base world/manpages

The following components of FreeBSD do not seem to be installed:
src/base src/bin src/cddl src/contrib src/crypto src/etc src/games
src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue
src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin
world/catpages world/dict world/doc world/games world/info world/lib32
world/proflibs

Does this look reasonable (y/n)? y
</pre>
<p>Next, it will download the patches. Depending on your internet connection speed, it may take 1 to 10 minutes:</p>
<pre>
...
Applying patches... done.
Fetching 1962 files... done.
Attempting to automatically merge changes in files... done.
</pre>
<div class="alignright" style="margin-left:20px;"></div>
<p style="margin-top:30px; margin-left:20px; padding-right:20px;">Now, FreeBSD will try to check whether your configuration is compatible with the new version or not. It may need your help to merge the configuration files manually. Notice that it uses VI, a standard (and very old, not really user-friendly) editor in Unix. If you&#8217;ve never used vi before, here are some simple commands:</p>
<div style="margin-bottom:70px;"> </div>
<pre>
#By default, a document is opened in read-only mode. To switch to a wrote mode:
i

#To set the mode to read only
Press the ESC key

#Delete a character
x

#Delete the whole line
dd

#Save a file
:w

#To quite vi
:q

#To save and quite
:wq
</pre>
<p>After some file editing, FreeBSD will give you a summary of what files will be changed. Just hit either ESC or q to end the list.</p>
<pre>
...
/usr/share/man/man3/lwres_addr_parse.3.gz
/usr/share/man/man3/lwres_buffer.3.gz
/usr/share/man/man3/lwres_buffer_add.3.gz
/usr/share/man/man3/lwres_buffer_back.3.gz
/usr/share/man/man3/lwres_buffer_clear.3.gz
/usr/share/man/man3/lwres_buffer_first.3.gz
/usr/share/man/man3/lwres_buffer_forward.3.gz
/usr/share/man/man3/lwres_buffer_getmem.3.gz
</pre>
<p>At this point, FreeBSD finish the upgrade plan. (It hasn&#8217;t make any change to your system.) Now we need to give a green light to FreeBSD to start upgrade the system.</p>
<pre>
sudo freebsd-update install
</pre>
<pre>
...Please reboot and run "/usr/sbin/freebsd-update install" again to finish installing updates.
</pre>
<p>After the reboot, run the command again to update the userland components:</p>
<p><pre>
sudo freebsd-update install
</pre>
<p></p>
<pre>
Installing updates...
Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "/usr/sbin/freebsd-update install"
again to finish installing updates.
</pre>
</p>
<p>Reboot the computer again to finish the upgrade.</p>
<pre>
sudo reboot
</pre>
<p>Now, we need to upgrade all of the ports. Notice that this step is <strong>optional</strong>. You don&#8217;t need to do it unless you found any problem after the upgrade.</p>
<pre>
#Upgrade all the installed ports
sudo portmaster -fa
</pre>
<p>Reboot the computer again to finish the upgrade.</p>
<pre>
sudo reboot
</pre>
<p>Make sure that FreeBSD is running on the latest version:</p>
<pre>
# uname -a
FreeBSD 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
</pre>
<p>Have fun with FreeBSD.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2616"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fupgrade-freebsd-8-to-9%2F' data-shr_title='How+to+Upgrade+FreeBSD+from+8+to+9'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fupgrade-freebsd-8-to-9%2F' data-shr_title='How+to+Upgrade+FreeBSD+from+8+to+9'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/upgrade-freebsd-8-to-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Say NO to SOPA/PIPA</title>
		<link>http://icesquare.com/wordpress/say-no-to-sopa-pipa/</link>
		<comments>http://icesquare.com/wordpress/say-no-to-sopa-pipa/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 16:01:52 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Everyday Computer Problem]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2602</guid>
		<description><![CDATA[Everyday, many people from US and other countries find their solutions here to solve their computer problem through the search engine. If the Stop Online Piracy Act (SOPA) and Protect Intellectual Property Act (PIPA) are passed, it simply allows US government to censor the web. Someday, IceSquare may be blocked from the major search engines. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/01/simpson-scream-the-simpsons-movie-123388_480_684.jpg" alt="" title="Say No to SOPA and PIPA" width="250"class="alignleft size-full wp-image-2603" /></p>
<p>Everyday, many people from US and other countries find their solutions here to solve their computer problem through the search engine. If the <a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act" target="_blank">Stop Online Piracy Act (SOPA)</a> and <a href="http://en.wikipedia.org/wiki/PROTECT_IP_Act" target="_blank">Protect Intellectual Property Act (PIPA)</a> are passed, it simply allows US government to censor the web. Someday, IceSquare may be blocked from the major search engines. In the other words, you won&#8217;t be able to find any solutions of your computer problem here.
</p>
<p>Please sign the petition at <a href="https://www.google.com/landing/takeaction/" target="_blank">Google</a> to oppose SOPA and PIPA. If you live in US, please click <a href="http://en.wikipedia.org/wiki/Special:CongressLookup" target="_blank">here</a> to tell your congress not to censor the web. Please visit <a href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more" target="_blank">here</a> if you like to learn more about SOPA and PIPA.</p>
<p>Thank you.</p>
<p>&#8211;Derrick</p>
<p></p>
<div class="shr-publisher-2602"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fsay-no-to-sopa-pipa%2F' data-shr_title='Say+NO+to+SOPA%2FPIPA'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fsay-no-to-sopa-pipa%2F' data-shr_title='Say+NO+to+SOPA%2FPIPA'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/say-no-to-sopa-pipa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FreeBSD+ZFS]One or more devices has experienced an error resulting in data corruption.  Applications may be affected.</title>
		<link>http://icesquare.com/wordpress/freebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected/</link>
		<comments>http://icesquare.com/wordpress/freebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 05:06:11 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2562</guid>
		<description><![CDATA[When you check the ZFS status, you may find the following error message: One or more devices has experienced an error resulting in data corruption. Applications may be affected.. There can be million reasons to cause this error message showing up. Of course, 99% of them are caused by hardware failure, such as bad hard [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/01/HomerStranglesBart2.gif" alt="" title="Oh Crap!" width="300" class="alignleft size-full wp-image-2571" /></p>
<p>
When you check the ZFS status, you may find the following error message: <strong></strong><strong>One or more devices has experienced an error resulting in data corruption. Applications may be affected.</strong>. There can be million reasons to cause this error message showing up. Of course, 99% of them are caused by hardware failure, such as bad hard drives, broken cables, defective motherboard, or even bad memory. In this article, I am assuming that you already eliminated these possibilities, and have scratched your head for hours, and still have no clue which part went wrong. In fact, that&#8217;s what I did today.</p>
<p>
Long story short. Here is how I experienced this error:
</p>
<pre>
FreeBSD: 8.2-> 9.0
ZFS: 4 -> 5
ZPool: 15 -> 28
</pre>
<p>My system was working fine (FreeBSD 8.2; ZFS ver. 4, Zpool ver. 15), everything seems perfect. After I upgraded my system to FreeBSD 9, I upgraded the ZFS and Zpool to ver.5 and ver. 28, respectively. Everything seemed working fine until I check the status:
</p>
<pre>
sudo zpool status -v
</pre>
<pre>
#sudo zpool status -v
  pool: storage
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: http://www.sun.com/msg/ZFS-8000-8A
config:

        NAME        STATE     READ WRITE CKSUM
        storage     ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            ada0    ONLINE       0     0     0
            ada2    ONLINE       0     0     0
            ada3    ONLINE       0     0     0
            ada4    ONLINE       0     0     0
            ada5    ONLINE       0     0     0
            ada6    ONLINE       0     0     0
            ada7    ONLINE       0     0     0

errors: Permanent errors have been detected in the following files:

        storage/data:&lt;0x0&gt;
</pre>
<p>There are few things you need to pay attention:</p>
<p>The pool seems working fine, otherwise you will see FAULTED instead of ONLINE:</p>
<pre>
state: ONLINE
</pre>
<p></p>
<p>The system has no problem to read/write the data. Doesn&#8217;t seem to be hardware problem:</p>
<pre>
NAME        STATE     READ WRITE CKSUM
        storage     ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            ada0    ONLINE       0     0     0
            ada2    ONLINE       0     0     0
            ada3    ONLINE       0     0     0
            ada4    ONLINE       0     0     0
            ada5    ONLINE       0     0     0
            ada6    ONLINE       0     0     0
            ada7    ONLINE       0     0     0
</pre>
<p>This error message may give you some clue what&#8217;s wrong. Notice that storage and data are the pool names.</p>
<pre>
errors: Permanent errors have been detected in the following files:

        storage/data:&lt;0x0&gt;
</pre>
<p>
The &lt;0&#215;0&gt; represents the meta data of the pool. I think the problem may come from the upgrade process. Here are the steps how to solve this problem.
</p>
<h3>Force Clearing the Error</h3>
<p>You can try to clear the error by running:</p>
<pre>
sudo zpool clear -F mypool
</pre>
<p>If it can clear the error, you are done. However, it is likely that it won&#8217;t work, and you need to move to the next step.</p>
<h3>Scrubbing the Pool</h3>
<p>You can try to scrub the entire pool by running:</p>
<pre>
sudo zpool scrub mypool
</pre>
<div class="alignright"></div>
<p>This will make the system to inspect every single block and correct the error. Although this process is long (It took 5 hours to inspect my 10TB pool), there is a very high chance that the problem will be corrected. Don&#8217;t forget to clear error after scrubbing the pool.</p>
<h3>Making each devices online again</h3>
<p>If the error still exists after scrubbing the entire pool (and clearing the error), you can try to force making each device go online:</p>
<pre>
sudo zpool online mypool /dev/ada0 /dev/ada2 /dev/ad4 ...
</pre>
<h3>Try to reboot the computer</h3>
<p>This is the last thing you can try. This will force the computer to mount the pool again. Hopefully it will clear the error and error status.</p>
<h3>Rebuild the pool</h3>
<p>If none of the method works, the only solution left is to rebuild the pool.</p>
<pre>
#Backup your data first
#sudo zpool destroy mypool
#sudo zpool create mypool ...
</pre>
<p>Good luck.</p>
<p></p>
<div class="shr-publisher-2562"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected%2F' data-shr_title='%5BFreeBSD%2BZFS%5DOne+or+more+devices+has+experienced+an+error+resulting+in+data+corruption.++Applications+may+be+affected.'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected%2F' data-shr_title='%5BFreeBSD%2BZFS%5DOne+or+more+devices+has+experienced+an+error+resulting+in+data+corruption.++Applications+may+be+affected.'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/freebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Clean Up / Reset User Account To Default on Linux, Ubuntu, Fedora Automatically</title>
		<link>http://icesquare.com/wordpress/how-to-clean-up-reset-user-account-to-default-on-linux-ubuntu-fedora-automatically/</link>
		<comments>http://icesquare.com/wordpress/how-to-clean-up-reset-user-account-to-default-on-linux-ubuntu-fedora-automatically/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 21:56:51 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2523</guid>
		<description><![CDATA[Imagine that you set up a computer at a public location, such as cafe, library, or computer lab in your school, so that any one can use your computer. Most of the time, users mainly use the web browsers for surfing the web, checking the email, or updating the status on social websites etc. At [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><style>
h2 {
margin-top:30px;"
}
</style>
<p><img class="alignleft size-medium wp-image-2524" src="/wordpress/wp-content/uploads/2012/01/400px-broom_icon.png" alt="" width="200" /></p>
<p>Imagine that you set up a computer at a public location, such as cafe, library, or computer lab in your school, so that any one can use your computer. Most of the time, users mainly use the web browsers for surfing the web, checking the email, or updating the status on social websites etc. At the mean time, they may download some files on your computer, generating a lot of browsing history in your web browsers, accidentally saving their user names/passwords in the browsers etc. How do you clean up these mess? How do you reset the user account to default automatically?
</p>
<p>
First, I am assuming that your computer is running Linux, such as Ubuntu, Fedora, Debian etc. It really doesn&#8217;t matter which Linux you use, because most Linux uses the same kernel. The idea describes in this article is applicable to any Linux.</p>
<h2>Idea</h2>
<p>
Linux and Windows are very very different. Linux has a much better control on the user permissions. For example, if you simply create a standard user on Linux, e.g.,</p>
<pre>
sudo adduser guestuser
</pre>
<p>where this new user, <strong>guestuser</strong>, is a standard user only.</p>
<div class="alignright"></div>
<p>If you log in as guestuser, all of the files you create will be stored in your home folder only, i.e., /home/guestuser. Unlike Windows, there is no registry or something similar. In the other words, all of your activities are limited within your home folder. If you like to create a file outside your scope, you will need to have the root access. Of course, you won&#8217;t grand the root access to the guest user.</p>
<p>Now you understand that the guest user can only mess around the home directory only (/home/guestuser). In order to clean up or reset the user account to default, all you need is to reset this folder to default.</p>
<h2>Setup a Home Directory On Ram Disk</h2>
<p>We are going to implement this idea using ram disk. If you don&#8217;t know anything about ram disk, you can think about it as a usb thumb drive, except that it is a super fast device, and cannot hold any data after each reboot. In the other words, if we set up a the home directory of the guestuser on a ram disk, all of the mess will be gone after each reboot. So here are the steps:</p>
<p>First, we want to create a guestuser first:</p>
<pre>
sudo adduser guestuser
</pre>
<p>This will add a new user into the system and create its home directory. Next, we want to create a ram disk. Before we do it, let&#8217;s find out how much memory you have in your system:</p>
<pre>
free -m
</pre>
<p>On my machine, I have 2GB (2000 MB) memory in total.</p>
<pre>
             total     used     free   shared  buffers  cached
Mem:          1999     1789      209        0      119    1176
-/+ buffers/cache:      492     1506
Swap:         3150        0     3150
</pre>
<p>Since I only have 2GB of memory, I want to keep some of them for my system. I think using 512MB for the ramdisk is enough.</p>
<p>To create a ramdisk during the boot, simply modify /etc/rc.local</p>
<pre>
sudo nano /etc/rc.local
</pre>
<p>And include the following commands:</p>
<p></p>
<pre>
#Create a 512MB ramdisk, and map it to the home directory of the guestuser.
mount -t ramfs -o size=512M ramfs /home/guestuser

#After the ramdisk is mapped, the directory will be owned by the root.
#We need to modify the permission such that guestuser can access it.
chown -R guest:guest /home/guestuser
</pre>
<p>Here are some special notes for different Linux:</p>
<div style="margin-left:20px;">
<p><strong>Fedora 15</strong> or earlier: None</p>
<p><strong>Fedora 16</strong>: By default, /etc/rc.local is missing. Please refer my another post: <a href="/wordpress/fedora-16-etc-rc-local/" title="Fedora 16 /etc/rc.local is missing" alt="Fedora 16 /etc/rc.local is missing" target="_blank">Fedora 16 /etc/rc.local is missing</a>) for details.</p>
<p><strong>Ubuntu</strong>: Please include your code before <strong>exit 0</strong> command, otherwise it won&#8217;t work, i.e.,</p>
</div>
<pre>
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

mount -t ramfs -o size=512M ramfs /home/guestuser
chown -R guestuser:guestuser /home/guestuser

exit 0
</pre>
<p>After the set up is completed, simply reboot the computer to make the ramdisk effective.</p>
<h2>Testing</h2>
<p>Now, try to log in as the guestuser. You can try to download some files to your home directory; visit some websites; or even change the wallpaper. All of these settings will be stored in your home directory. Next, try to log out the account, restart the computer and log in to your account again. You will notice that everything will be reset to default, i.e., all of your previously downloaded files are gone, wallpaper will be reset to default, the web history is cleared etc.</p>
<p>Enjoy running a clean, maintenance-free workstation.</p>
<p></p>
<div class="shr-publisher-2523"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fhow-to-clean-up-reset-user-account-to-default-on-linux-ubuntu-fedora-automatically%2F' data-shr_title='How+to+Clean+Up+%2F+Reset+User+Account+To+Default+on+Linux%2C+Ubuntu%2C+Fedora+Automatically'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Fhow-to-clean-up-reset-user-account-to-default-on-linux-ubuntu-fedora-automatically%2F' data-shr_title='How+to+Clean+Up+%2F+Reset+User+Account+To+Default+on+Linux%2C+Ubuntu%2C+Fedora+Automatically'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/how-to-clean-up-reset-user-account-to-default-on-linux-ubuntu-fedora-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FreeBSD]Problem to update PHP port</title>
		<link>http://icesquare.com/wordpress/freebsdproblem-to-update-php-port/</link>
		<comments>http://icesquare.com/wordpress/freebsdproblem-to-update-php-port/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 19:54:34 +0000</pubDate>
		<dc:creator>Derrick</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server Problems]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://icesquare.com/wordpress/?p=2502</guid>
		<description><![CDATA[A new version of PHP (5.3.9) was available in FreeBSD today. Since it contained a lot of security fixes and enhancements, I decided to give it a try. After testing the new PHP in couple test servers, I think it is ready to upgrade the PHP on the production server. Oh well, I didn&#8217;t expect [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><img src="/wordpress/wp-content/uploads/2012/01/PHP-Problem.jpg" class="alignleft" width="300"/></p>
<p>A new version of PHP (5.3.9) was available in FreeBSD today. Since it contained a lot of security fixes and enhancements, I decided to give it a try. After testing the new PHP in couple test servers, I think it is ready to upgrade the PHP on the production server. Oh well, I didn&#8217;t expect that I needed to spend my whole lunch break to trouble-shoot this problem. So here is what I did:</p>
<pre style="margin-top:50px;">
# cd /usr/ports/lang/php5
# make install
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for php5-5.3.9
===>  Extracting for php5-5.3.9
=> SHA256 Checksum mismatch for php-5.3.9.tar.bz2.
=> SHA256 Checksum OK for suhosin-patch-5.3.4-0.9.10.patch.gz.
===>  Refetch for 1 more times files: php-5.3.9.tar.bz2
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for php5-5.3.9
=> php-5.3.9.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://dk.php.net/distributions/.
fetch: http://dk.php.net/distributions/php-5.3.9.tar.bz2: Requested Range Not Satisfiable
=> Attempting to fetch from http://de.php.net/distributions/.
fetch: http://de.php.net/distributions/php-5.3.9.tar.bz2: Requested Range Not Satisfiable
=> Attempting to fetch from http://es.php.net/distributions/.
fetch: http://es.php.net/distributions/php-5.3.9.tar.bz2: Requested Range Not Satisfiable
=> Attempting to fetch from http://fi.php.net/distributions/.
fetch: http://fi.php.net/distributions/php-5.3.9.tar.bz2: Requested Range Not Satisfiable
=> Attempting to fetch from http://fr.php.net/distributions/.
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for php5-5.3.9
=> SHA256 Checksum mismatch for php-5.3.9.tar.bz2.
=> SHA256 Checksum OK for  suhosin-patch-5.3.9-0.9.10.patch.gz
===>  Giving up on fetching files: php-5.3.9.tar.bz2
Make sure the Makefile and distinfo file (/usr/ports/lang/php5/distinfo)
are up to date.  If you are absolutely sure you want to override this
check, type "make NO_CHECKSUM=yes [other args]".
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.
</pre>
<p>Initially, I thought it was a checksum error. So I decided to skip the checksum, i.e.,</p>
<pre>
#make install NO_CHECKSUM=yes
</pre>
<p>Unfortunately, it gave the same error. I think the problem might come from corrupted port files or port database. Instead of finding the source of the problem, I decided to rebuild the whole thing.</p>
<p>First, let&#8217;s remove the port database:</p>
<p></p>
<pre>
#sudo rm -Rf /var/db/portsnap/*
</pre>
<p>Next, we need to re-download all port files:</p>
<pre>
#sudo portsnap fetch extract
</pre>
<p>Some new ports may be released during the extraction, let&#8217;s make sure that the port tree is up to date:</p>
<pre>
#sudo portsnap fetch update
</pre>
<p>Now, we need to manually download the php source. Make sure that the file is stored in /usr/ports/distfiles/</p>
<pre>
#cd /usr/ports/distfiles/
#sudo wget http://fi.php.net/distributions/php-5.3.9.tar.bz2
</pre>
<p>Now, try to test whether the system can build php again. Notice that this will not install the PHP in your system.</p>
<pre>
cd /usr/ports/lang/php5
sudo make
</pre>
<p>If it gives no error, which means the PHP is ready to go. Now let&#8217;s clean up our work and make sure everything is ready.</p>
<pre>
sudo make clean
</pre>
<p>Notice that there is no way to upgrade the PHP from Make without uninstall it. Since it is a production server, I want to keep the website running. So I decide to let Portmaster to do all dirty works for me.</p>
<pre>
sudo portmaster -Da
</pre>
<p>Depending on your CPU, it may take 5 minutes to an hour to finish the update. Normally, the standard php package will work fine after the update. However, if it is not a standard package, such as PECL, you will need to do one more step. For example, here is the error messages right after I upgraded PHP:</p>
<pre>
#php -v
[eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.3.8.
Rebuild it for your PHP version (5.3.9) or download precompiled binaries.

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/memcache.so' - /usr/local/lib/php/20090626/memcache.so: Undefined symbol "php_session_create_id" in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/tokyo_tyrant.so' - /usr/local/lib/php/20090626/tokyo_tyrant.so: Undefined symbol "ps_globals" in Unknown on line 0

PHP 5.3.9 with Suhosin-Patch (cli) (built: Jan 12 2012 13:09:43)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
</pre>
<h4>[eAccelerator] This build of &#8220;eAccelerator&#8221; was compiled for PHP version 5.3.8.<br />
Rebuild it for your PHP version (5.3.9) or download precompiled binaries.</h4>
<p>To solve this problem, simple rebuild the package, i.e.,</p>
<pre>
cd /usr/ports/www/eaccelerator
sudo make deinstall install clean
</pre>
<h4>
PHP Warning:  PHP Startup: Unable to load dynamic library &#8216;/usr/local/lib/php/20090626/memcache.so&#8217; &#8211; /usr/local/lib/php/20090626/memcache.so: Undefined symbol &#8220;php_session_create_id&#8221; in Unknown on line 0</h4>
<pre>
#cd /usr/ports/databases/pecl-memcache
#sudo make deinstall
#sudo make install clean
</pre>
<h4>
PHP Warning:  PHP Startup: Unable to load dynamic library &#8216;/usr/local/lib/php/20090626/tokyo_tyrant.so&#8217; &#8211; /usr/local/lib/php/20090626/tokyo_tyrant.so: Undefined symbol &#8220;ps_globals&#8221; in Unknown on line 0<br />
</h4>
<pre>
#cd /usr/ports/pecl-tokyo_tyrant
#sudo make deinstall
#sudo make install clean
</pre>
<p>After the re-installation is completed, make sure that PHP gives no complain:</p>
<pre>
#php -v

PHP 5.3.9 with Suhosin-Patch (cli) (built: Jan 12 2012 13:09:43)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
</pre>
<p>That&#8217;s it! Have fun.</p>
<p></p>
<div class="shr-publisher-2502"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='standard' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsdproblem-to-update-php-port%2F' data-shr_title='%5BFreeBSD%5DProblem+to+update+PHP+port'></a><a class='shareaholic-googleplusone' data-shr_size='standard' data-shr_count='false' data-shr_href='http%3A%2F%2Ficesquare.com%2Fwordpress%2Ffreebsdproblem-to-update-php-port%2F' data-shr_title='%5BFreeBSD%5DProblem+to+update+PHP+port'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://icesquare.com/wordpress/freebsdproblem-to-update-php-port/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

