<?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>boolean.co.nz &#187; Hosting</title>
	<atom:link href="http://boolean.co.nz/blog/category/hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://boolean.co.nz/blog</link>
	<description>Where there is more to logic than TRUE or FALSE</description>
	<lastBuildDate>Fri, 18 May 2012 09:56:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>08/02/2012 Emergency PHP Updates on server</title>
		<link>http://boolean.co.nz/blog/emergency-php-updates/725/</link>
		<comments>http://boolean.co.nz/blog/emergency-php-updates/725/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:42:11 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=725</guid>
		<description><![CDATA[EMERGENCY PHP UPDATES We will be applying a PHP update to the servers later this evening. This will take the primary PHP install from v5.3.9 to v5.3.10 and will resolve a vulnerability that has been patched in the 5.3.10 release. The vulnerability present in 5.3.9 allows for the possibility of remote code execution depending on [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2009/03/php-logo.png" alt="" title="php-logo" width="203" height="107" class="aligncenter size-full wp-image-61" /></td>
</tr>
</table>
<p><strong>EMERGENCY PHP UPDATES</strong></p>
<p>We will be applying a PHP update to the servers later this evening.</p>
<p>This will take the primary PHP install from v5.3.9 to v5.3.10 and will resolve a vulnerability that has been patched in the 5.3.10 release.</p>
<p>The vulnerability present in 5.3.9 allows for the possibility of remote code execution depending on how large numbers and arrays are used.</p>
<p>As this is a security issue we will be performing emergency maintenance between <strong>midnight and 3am (GMT).</strong></p>
<p>There should be no interruption to service however, as the work is being done on components critical to PHP based sites, this period should be considered at risk.</p>
<p>The work will cause slightly higher than normal load on the servers and may involve a restart of the web server.</p>
<p>In the worst cast scenario (such as a failed compile) the installer will restore a backup of the current working configuration.</p>
<p>No module or configuration changes will be made to the PHP stack and scripts should notice no difference.</p>
<p>You can view the change log on the php.net site: <a href="http://php.net/ChangeLog-5.php" title="here" target="_blank">http://php.net/ChangeLog-5.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/emergency-php-updates/725/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force trailing slash with .htaccess</title>
		<link>http://boolean.co.nz/blog/force-trailing-slash-with-htaccess/684/</link>
		<comments>http://boolean.co.nz/blog/force-trailing-slash-with-htaccess/684/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 23:22:18 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=684</guid>
		<description><![CDATA[There are a few reasons to force a trailing slash at the end of URLs including SEO A quick snippet for your .htaccess is below: &#60;IfModule mod_rewrite.c&#62; RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] &#60;/IfModule&#62; And while I&#8217;m here a quick snippet to prevent hotlinking of images. This will redirect all requests to a specified [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2011/09/apache_logo.png" alt="" title="apache_logo" width="365" height="57" class="aligncenter size-full wp-image-635" /></td>
</tr>
</table>
<p>There are a few reasons to force a trailing slash at the end of URLs including SEO</p>
<p>A quick snippet for your .htaccess is below:</p>
<div class="codesnip-container" >&lt;IfModule mod_rewrite.c&gt;<br />
 RewriteCond %{REQUEST_URI} /+[^\.]+$<br />
 RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]<br />
&lt;/IfModule&gt;</div>
<p>And while I&#8217;m here a quick snippet to prevent hotlinking of images. This will redirect all requests to a specified image, simply replace yoursite.com with your own URL, and nohotlinking.jpg with your own image and path.</p>
<div class="codesnip-container" >RewriteEngine On<br />
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yoursite\.com/ [NC]<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlinking.jpg [L]</div>
<p>And finally a snippet to put in your image assets folder (you have images stored separately right?) to prevent malicious code execution and prevent directory listing of all your assets.</p>
<div class="codesnip-container" >Options All -Indexes<br />
AddHandler cgi-script .php .php4 .php5 .pl .jsp .asp .sh .cgi<br />
Options -ExecCGI</div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/force-trailing-slash-with-htaccess/684/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox cross domain font embedding</title>
		<link>http://boolean.co.nz/blog/firefox-cross-domain-font-embedding/676/</link>
		<comments>http://boolean.co.nz/blog/firefox-cross-domain-font-embedding/676/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 23:24:59 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=676</guid>
		<description><![CDATA[Firefox has a limitation for cross domain font embedding in that it does not allow you to embed from another website. This .htaccess snippet allows you to bypass this limitation and embed fonts located on another webserver. &#60;FilesMatch &#8220;\.(ttf&#124;otf&#124;eot&#124;woff)$&#8221;&#62; &#60;IfModule mod_headers.c&#62; Header set Access-Control-Allow-Origin &#8220;http://thedomain.com&#8221; &#60;/IfModule&#62; &#60;/FilesMatch&#62;]]></description>
			<content:encoded><![CDATA[<p>Firefox has a limitation for cross domain font embedding in that it does not allow you to embed from another website. This .htaccess snippet allows you to bypass this limitation and embed fonts located on another webserver.</p>
<div class="codesnip-container" >&lt;FilesMatch &#8220;\.(ttf|otf|eot|woff)$&#8221;&gt;<br />
&lt;IfModule mod_headers.c&gt;<br />
    Header set Access-Control-Allow-Origin &#8220;http://thedomain.com&#8221;<br />
&lt;/IfModule&gt;<br />
&lt;/FilesMatch&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/firefox-cross-domain-font-embedding/676/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Host Settings Without phpinfo()</title>
		<link>http://boolean.co.nz/blog/php-host-settings-without-phpinfo/652/</link>
		<comments>http://boolean.co.nz/blog/php-host-settings-without-phpinfo/652/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 09:36:05 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=652</guid>
		<description><![CDATA[Occasionally a webhost will block the very useful phpinfo() command making it difficult to understand any limitations of the server configuration. This script can display relevant information to help you understand what is happening behind the scenes. &#60;?php $d_func = ini_get(&#8220;disable_functions&#8221;); $up_max = ini_get(&#8220;upload_max_filesize&#8221;); $up_max = str_replace(&#8220;M&#8221;,&#8221;",$up_max); $up_max_size = &#8220;Megabytes&#8221;; $post_max = ini_get(&#8220;post_max_size&#8221;); $post_max = [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2009/03/php-logo.png" alt="" title="php-logo" width="203" height="107" class="aligncenter size-full wp-image-61" />
<td>
<tr></table>
<p>Occasionally a webhost will block the very useful phpinfo() command making it difficult to understand any limitations of the server configuration. This script can display relevant information to help you understand what is happening behind the scenes.</p>
<div class="codesnip-container" >&lt;?php<br />
        $d_func = ini_get(&#8220;disable_functions&#8221;);<br />
        $up_max =  ini_get(&#8220;upload_max_filesize&#8221;);<br />
        $up_max = str_replace(&#8220;M&#8221;,&#8221;",$up_max);<br />
        $up_max_size = &#8220;Megabytes&#8221;;<br />
        $post_max = ini_get(&#8220;post_max_size&#8221;);<br />
        $post_max = str_replace(&#8220;M&#8221;,&#8221;",$post_max);<br />
        $post_max_size = &#8220;Megabytes&#8221;;<br />
        $input_max = ini_get(&#8220;max_input_time&#8221;);<br />
        $mem_limit = ini_get(&#8220;memory_limit&#8221;);<br />
        $mem_limit = str_replace(&#8220;M&#8221;,&#8221;",$mem_limit);<br />
        $mem_limit_size = &#8220;Megabytes&#8221;;<br />
        $exec_time = ini_get(&#8220;max_execution_time&#8221;);<br />
        $safe_mode = ini_get(&#8220;safe_mode&#8221;);</p>
<p>        if(!is_null($d_func) &#038;&#038; $d_func !== &#8220;&#8221;){echo  &#8220;Disabled Functions: \n $d_func&#8221;;}<br />
        if(!is_null($safe_mode) &#038;&#038; $safe_mode !== &#8220;&#8221;){echo  &#8220;&lt;span style=&#8217;color:red;&#8217;&gt;Safe Mode is Active&lt;/span&gt; &lt;br&gt;&#8221;;}<br />
        if($up_max >= 1001){$up_max = $up_max / 1024; $up_max_size = &#8220;Gigabytes&#8221;;<br />
        if($up_max >= 10001){$up_max = $up_max / 1024; $up_max_size = &#8220;Terabytes&#8221;;}}<br />
        if($post_max >= 1001){$post_max = $post_max / 1024; $post_max_size = &#8220;Gigabytes&#8221;;<br />
        if($post_max >= 10001){$post_max = $post_max / 1024;$post_max_size = &#8220;Terabytes&#8221;;}}<br />
        if (min($input_max,60)){$input_max = $input_max /60;}<br />
        if (min($exec_time,60)){$exec_time = $exec_time /60;}<br />
        if($mem_limit >= 1001){$mem_limit = $mem_limit / 1024; $mem_limit_size = &#8220;Gigabytes&#8221;;}</p>
<p>        echo &#8220;Maximum Upload Size = $up_max $up_max_size&lt;br&gt;&#8221;;<br />
        echo &#8220;Maximum Post Size = $post_max $post_max_size &lt;br&gt;&#8221;;<br />
        echo &#8220;Maximum Input Time = $input_max minute/s&lt;br&gt;&#8221;;<br />
        echo &#8220;Memory Limit = $mem_limit $mem_limit_size&lt;br&gt;&#8221;;<br />
        echo &#8220;Maximum Execution Time = $exec_time minute/s&lt;br&gt;&#8221;;<br />
?&gt;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/php-host-settings-without-phpinfo/652/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.htaccess Mod-Rewrites for WWW Domain Name Prefixes</title>
		<link>http://boolean.co.nz/blog/htaccess-mod-rewrites/590/</link>
		<comments>http://boolean.co.nz/blog/htaccess-mod-rewrites/590/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 09:36:08 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=590</guid>
		<description><![CDATA[Quite some time ago now I wrote about the importance of 301 redirects for SEO purposes. In a minor addition to that post here is a snippet I often use to ensure search engines do not view http://yourdomain.com and http://www.yourdomain.com as duplicate content. To perform a redirect from domain.com to www.domain.com, insert the following code [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src="http://boolean.co.nz/blog/wp-content/uploads/2010/05/seo.jpg" alt="" title="seo" width="285" height="160" class="aligncenter size-full wp-image-378" /></td>
</tr>
</table>
<p>Quite some time ago now I <a href="http://boolean.co.nz/blog/301-redirects/174/" title="wrote" target="_blank">wrote</a> about the importance of 301 redirects for SEO purposes.<br />
In a minor addition to that post here is a snippet I often use to ensure search engines do not view http://yourdomain.com and http://www.yourdomain.com as duplicate content.</p>
<p>To perform a redirect from domain.com to www.domain.com, insert the following code into your .htaccess file.</p>
<div class="codesnip-container" ># mod_rewrite in use<br />
Options +FollowSymlinks<br />
RewriteEngine On<br />
RewriteCond %{http_host} ^domain.com [NC]<br />
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]</div>
<p>To perform a redirect from www site to non-www site, use the following code in .htaccess file.</p>
<div class="codesnip-container" ># mod_rewrite in use<br />
Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} .<br />
RewriteCond %{HTTP_HOST} !^domain\.com<br />
RewriteRule (.*) http://domain.com/$1 [R=301, L]</div>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/htaccess-mod-rewrites/590/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail, Google Apps, Cpanel, and SPF</title>
		<link>http://boolean.co.nz/blog/mail-google-apps-cpanel-and-spf/415/</link>
		<comments>http://boolean.co.nz/blog/mail-google-apps-cpanel-and-spf/415/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 12:25:44 +0000</pubDate>
		<dc:creator>Boolean</dc:creator>
				<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://boolean.co.nz/blog/?p=415</guid>
		<description><![CDATA[Sender Policy Framework (or SPF) is an email validation system designed to addressing source address spoofing. It allows administrators to specify which hosts are allowed to send email from a given domain by creating a specific DNS SPF record in the public DNS. Mail exchangers can then check that mail from a given domain is [...]]]></description>
			<content:encoded><![CDATA[<p>Sender Policy Framework (or SPF) is an email validation system designed to addressing source address spoofing. It allows administrators to specify which hosts are allowed to send email from a given domain by creating a specific DNS SPF record in the public DNS. Mail exchangers can then check that mail from a given domain is being sent by a host sanctioned by that domains administrators.</p>
<p>So, after setting up mail from Google apps you&#8217;re getting this error:<br />
(IP addresses and domains have been changed to protect the innocent)</p>
<div class="codesnip-container" >SMTP error from remote mail server after RCPT TO:&lt;email@domain.com&gt;:<br />
    host something.email.com [127.0.0.1]: 550 &lt;email@domain.com&gt;:<br />
    Recipient address rejected: undeliverable address:<br />
    host domain.com[127.0.0.1] said: 550-something.email.com [127.0.0.2] is currently not permitted to relay 550-through this server. Perhaps you have not logged into the pop/imap server 550-in the last 30 minutes or do not have SMTP Authentication turned on in your 550 email client. (in reply to RCPT TO command)</div>
<p>You check your DNS records and everything seems to be in order&#8230;<br />
You&#8217;ve changed your <em>cname</em> for <strong>mail</strong> to point to Google: ghs.google.com<br />
You&#8217;ve changed your <em>MX records</em> for your domain to point to Googles: aspmx.l.google.com etc<br />
You&#8217;ve configured your server in Cpanel to act as a Remote Mail Exchanger</p>
<p>For Google to accept your mail server as a relay, you need to enter a line in your DNS zone:</p>
<div class="codesnip-container" >yourdomain.com TXT v=spf1 include:_spf.google.com ~all</div>
<p>(Do not use the built in SPF in Cpanel, and you may need your host to enter this line for you)</p>
<p>A little info is <a href="http://www.google.com/support/a/bin/answer.py?answer=178723">here</a> for Google Support<br />
Background reading in SPF in Wikipedia is <a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://boolean.co.nz/blog/mail-google-apps-cpanel-and-spf/415/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

