<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Website Design West Midlands</title>
	
	<link>http://www.sant-media.co.uk</link>
	<description>Sant Media Graphic Design</description>
	<lastBuildDate>Sat, 28 Jan 2012 19:40:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/santmedia" /><feedburner:info uri="santmedia" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>santmedia</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>ConfigServer Exploit Scanner – external perl script to run upon detection of a match</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/AuFj31xpSn4/</link>
		<comments>http://www.sant-media.co.uk/2012/01/configserver-exploit-scanner-external-script-to-run-upon-detection-of-a-match/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 19:40:22 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[config server]]></category>
		<category><![CDATA[CXS]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2210</guid>
		<description><![CDATA[One very useful option recently added to CXS is &#8211;script For example, I am currently using something like: /usr/sbin/cxs &#8211;report /var/log/cxs.scan &#8211;logfile /var/log/cxs.log &#8211;mail reports@myhost.co.uk &#8211;vir -I /etc/cxs/cxs.ignore &#8211;options mMOfSGChednWZDR &#8211;script /root/cxswatchscript.sh &#8211;xtra /etc/cxs/cxs.xtra -Z &#8211;sum -F 200000 -C /var/clamd -T 10 -B &#8211;allusers the script defined above, /root/cxswatchscript.sh, receives 4 arguments from CXS $1 [...]]]></description>
			<content:encoded><![CDATA[<p>One very useful option recently added to CXS is &#8211;script</p>
<p>For example, I am currently using something like:</p>
<p>/usr/sbin/cxs &#8211;report /var/log/cxs.scan &#8211;logfile /var/log/cxs.log &#8211;mail reports@myhost.co.uk &#8211;vir -I /etc/cxs/cxs.ignore &#8211;options mMOfSGChednWZDR &#8211;script /root/cxswatchscript.sh &#8211;xtra /etc/cxs/cxs.xtra -Z &#8211;sum -F 200000 -C /var/clamd -T 10 -B &#8211;allusers</p>
<p>the script defined above, /root/cxswatchscript.sh, receives 4 arguments from CXS</p>
<p>$1 = filename<br />
$2 = option triggered<br />
$3 = message reported<br />
$4 = account name</p>
<p><!--more--></p>
<p>As I wasn&#8217;t sure if I could get away with running a perl script directly, I use cxswatchscript.sh as a wrapper. cxswatchscript.sh contains:</p>
<p>&nbsp;</p>
<p>Then cxswatchscript.pl contains:</p>
<p>The reason I don&#8217;t use the &#8220;Option Triggered&#8221; argument (the second one) is that ClamAV also picks up some javasript viruses, and while these things might technically be a virus, they don&#8217;t pose a threat to the server, and I wouldn&#8217;t want to suspend a user account based on finding one. The perl script allows us to be far more selective in the conditions that lead to a suspension.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/AuFj31xpSn4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2012/01/configserver-exploit-scanner-external-script-to-run-upon-detection-of-a-match/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2012/01/configserver-exploit-scanner-external-script-to-run-upon-detection-of-a-match/</feedburner:origLink></item>
		<item>
		<title>ConfigServer Exploit Scanner – Individual User Warning Email Script</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/cbr9nPGijZ8/</link>
		<comments>http://www.sant-media.co.uk/2012/01/configserver-exploit-scanner-individual-user-warning-email-script/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:41:32 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ConfigServer]]></category>
		<category><![CDATA[CXS]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2199</guid>
		<description><![CDATA[Parse the CXS Log file for warnings, and email your customers with details of the Malware found in their accounts via a Perl script. Got ConfigServer Exploit Scanner &#8211; CXS &#8211; installed on your cPanel/WHM server? Doing a full server scan every now and then, and getting swamped with the reports? Want a script that [...]]]></description>
			<content:encoded><![CDATA[<p>Parse the CXS Log file for warnings, and email your customers with details of the Malware found in their accounts via a Perl script.</p>
<ul>
<li>Got ConfigServer Exploit Scanner &#8211; CXS &#8211; installed on your cPanel/WHM server?</li>
<li>Doing a full server scan every now and then, and getting swamped with the reports?</li>
<li>Want a script that will trawl the reports, and email the cpanel users with their problems automatically?</li>
</ul>
<p>Then you came to the right place!<!--more--></p>
<h2>Requirements</h2>
<p>You need to have CXS installed, and you need to be generating a Scan Report Log file after your periodic scan. This is the file that is in this sort of format:</p>
<p><strong>Jan 21 02:34:45 apollo cxs[526881]: ['/home/username/public_html/thingybob.info/adsense/volume1.zip'] &#8211; ClamAV detected virus = [HTML.Phishing.Bank-581]</strong></p>
<p>It&#8217;s important to ensure this file is truncated before each CXS run, otherwise you will be sending out an ever increasing number of warning emails each week!</p>
<p>This Perl script also uses a couple of Perl modules that are normally available by default &#8211; Email::Valid and MIME::Lite</p>
<p>That&#8217;s it!</p>
<p>Just pop the script somewhere safe, and cron it to run a safe time after your cxs scan is schedules to run (to make sure it parses the completed log file). It will email (via Sendmail) a report to each cPanel user (via the cPanel account&#8217;s contact email address) with their affected files in an attached text file.</p>
<h2>Version 2!</h2>
<p><strong>This version is now aware of resellers, and will email the reseller instead of the cpanel user directly.</strong></p>
<p>Oh, yes, and obviously, you use this entirely at your own risk &#8211; absolutely at your own risk!!!</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/cbr9nPGijZ8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2012/01/configserver-exploit-scanner-individual-user-warning-email-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2012/01/configserver-exploit-scanner-individual-user-warning-email-script/</feedburner:origLink></item>
		<item>
		<title>Retry timeout exceeded – Exim greylist problem</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/XgOwFRRlfsE/</link>
		<comments>http://www.sant-media.co.uk/2011/11/retry-timeout-exceeded-exim-greylist-problem/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 12:02:03 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[exim]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2191</guid>
		<description><![CDATA[This article relates to Exim 4, running in a WHM/cPanel environment under Centos, but may affect other configs too. You may find instances where a local user tries to send mail to a host that operates greylisting. The messages never gets to the recipient. You see things like this in the exim_mainlog Possible simple reasons [...]]]></description>
			<content:encoded><![CDATA[<p>This article relates to Exim 4, running in a WHM/cPanel environment under Centos, but may affect other configs too.</p>
<p>You may find instances where a local user tries to send mail to a host that operates greylisting. The messages never gets to the recipient. You see things like this in the exim_mainlog</p>
<p><!--more--></p>
<h2>Possible simple reasons for messages failing due to greylisting</h2>
<h3>Queue Interval time</h3>
<p>Now, I&#8217;m assuming here that you have a sensible queue retry interval set in the exim command ( the -q switch ). You can check this by running</p>
<pre>ps aux | grep exim</pre>
<p>and checking the output&#8230;</p>
<pre>/usr/sbin/exim -bd -q15m</pre>
<p>The -q15m above means the queue is running every 15 minutes. In a WHM/cPanel environment you should set this in the Tweak Settings &gt; Mail section.</p>
<p>If your retry interval is too long, you may miss the greylist window, and get greylisted again upon retrying, and thus eventually the message will fail.</p>
<h3>Max load queue runner sleep factor</h3>
<p>By default, exim will not run the queue if the system linux load average goes above 3.00 &#8211; on a modern server with a dozen cpu cores this is a patently silly value. The value should really be set to at least the number of cores on the machine. The actual exim config variable concerned is deliver_queue_load_max.</p>
<p>You can adjust/over-ride the value in the default exim.conf file by adding this to the first box at the top of the advanced exim config screen in WHM.</p>
<pre>deliver_queue_load_max = 12</pre>
<h2>More tricky reasons for messages failing</h2>
<p>Exim uses a number of hints databases. On a cPanel server, these are in /var/spool/exim</p>
<p>First thing to do is check what exim thinks the next retry will be for your failed message:</p>
<pre></pre>
<p>Now. In this instance I know the message was only sent on 16th Nov so there must be a bug somewhere for exim to think it was first sent on 03rd Nov.</p>
<p>My first try was to run</p>
<pre># exim_tidydb -t 7d /var/spool/exim retry</pre>
<p>This removed a whole bunch of retry data from the database, but to no avail. Exim still had any message going to this domain as originally failing on the 3rd Nov.</p>
<p>I then decided to rip out the data for this domain directly using exim_fixdb. The man entry for exim_fixdb is a bit dry, and doesn&#8217;t really tell you how to identify the record keys, but it&#8217;s actually quite easy once you find out how!</p>
<p>First, search the database for your suspect domain:</p>
<pre></pre>
<p>The key to the hints database record is</p>
<pre>R:remoteuser@remotedomain.co.uk:&lt;localuser@localdomain.co.uk&gt;</pre>
<p>So, now just run exim_fixdb</p>
<pre></pre>
<p>the d command just deletes the most previously viewed record. That&#8217;s it! Now run exinext again:</p>
<pre># exinext kismarketing.co.uk
No retry data found for kismarketing.co.uk</pre>
<p>That&#8217;s it &#8211; any messages sent to the remote domain should now retry properly again.</p>
<p>Enjoy.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/XgOwFRRlfsE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/11/retry-timeout-exceeded-exim-greylist-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/11/retry-timeout-exceeded-exim-greylist-problem/</feedburner:origLink></item>
		<item>
		<title>How to switch from Mobile Me iCloud to Google Apps</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/f9yXJ2USYNQ/</link>
		<comments>http://www.sant-media.co.uk/2011/11/how-to-switch-from-mobile-me-icloud-to-google-apps/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 11:05:41 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General Tech Tips]]></category>
		<category><![CDATA[Gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[icloud]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2172</guid>
		<description><![CDATA[I decided to divorce myself from the Apple-a-tron that is iCloud for a number of reasons. I don&#8217;t like being forced to upgrade to iCloud I don&#8217;t like being forced to upgrade to Lion to use iCloud As a user of Adobe CS5 and numerous peripherals for photo/print etc, I can&#8217;t see how upgrading to [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to divorce myself from the Apple-a-tron that is iCloud for a number of reasons.</p>
<ul>
<li>I don&#8217;t like being forced to upgrade to iCloud</li>
<li>I don&#8217;t like being forced to upgrade to Lion to use iCloud</li>
<li>As a user of Adobe CS5 and numerous peripherals for photo/print etc, I can&#8217;t see how upgrading to Lion is going to make anything easier for me (actually the reverse)</li>
<li>I felt it was time to move my online self to a domain that I control, instead of me.com or mac.com</li>
</ul>
<p>So, how to do it? I run a number of Macs, and an iPhone so whatever I choose has to work on both, and be relatively painless. This guide isn&#8217;t for total beginners, I wish I had the time to describe every step in detail with screenshots, but anyone with a sense of adventure should get through this guide without difficulty.<!--more--></p>
<h2>Step 1 &#8211; buy a domain</h2>
<p>OK, so I got myself a domain, for the sake of argument mrsant.co.uk &#8211; that was the easy bit.</p>
<h2>Step 2 &#8211; sign up to Google Apps Free</h2>
<p>Again, this was pretty easy. I just went to</p>
<p><a href="http://www.google.com/apps/intl/en/group/index.html" target="_blank">http://www.google.com/apps/intl/en/group/index.html</a></p>
<p>And went through their sign up process. You will need to verify your domain by adding a dns TXT record to the zone file, or by uploading a file to the website for your domain &#8211; but this is straightforward and much the same as verifying a website for use with Google&#8217;s Webmaster Tools or Analytics.</p>
<p>Once you have verified that you own the domain, then you need to active the services. Activating your email in Google Apps will require you to configure the MX records for your domain to point at Google&#8217;s mail cluster.</p>
<p>You will be asked at some point if you want to set up other users &#8211; just select No at this stage as we are only interested in setting up the first mailbox account.</p>
<p>Once you have got this bit done, you should be able to log into Google using your new email address (e.g. steve@mrsant.co.uk) and start using gmail in the way you already know and love.</p>
<h2>Step 3 &#8211; Configure mail.app for Google Apps</h2>
<p>OK, this is where I learnt a few things about how Google handles IMAP folders and how mail.app can be configured to work with it.</p>
<p>Enable IMAP access for your Google mailbox. This is done in your mailbox settings (click the gear/cog icon top right of your Google mail window) &gt; Forwarding and POP/IMAP tab. Leave the options as default (Auto-Expunge on).</p>
<p>Now, in mail.app, just set up your account as follows:</p>
<p><img class="aligncenter size-full wp-image-2177" title="Configuring Mail.app for Google Apps" src="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail1.jpg" alt="Configuring Mail.app for Google Apps" width="590" height="607" />And the SMTP settings that matter&#8230;</p>
<p><a href="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail2.jpg"><img class="aligncenter size-full wp-image-2178" title="Mail.app smtp settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail2.jpg" alt="Mail.app smtp settings" width="501" height="508" /></a></p>
<p>Mailbox behaviours that work for me</p>
<p><a href="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail3.jpg"><img class="aligncenter size-full wp-image-2179" title="Mail.app Mailbox Behaviours for Google Apps" src="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail3.jpg" alt="Mail.app Mailbox Behaviours for Google Apps" width="590" height="607" /></a>And finally, the advanced settings</p>
<h3><a href="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail4.jpg"><img class="aligncenter size-full wp-image-2180" title="Mail.app Advanced Settings for Google Apps" src="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail4.jpg" alt="Mail.app Advanced Settings for Google Apps" width="590" height="607" /></a>Getting the folders to behave themselves</h3>
<p><a href="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail5.jpg"><img class="alignright size-medium wp-image-2182" title="Mail folders" src="http://www.sant-media.co.uk/wp-content/uploads/2011/11/mail5-106x300.jpg" alt="Mail folders" width="106" height="300" /></a>To prevent mail.app from creating extra folders in the gmail system you must tell mail.app which folders in the Google Apps mailbox to use as the default Sent Items, Trash, Junk, and Draft. You do this by expanding the new Gmail mailbox in mail.app&#8217;s left column, and selecting each folder in turn, then selecting from the mail.app menu, Mailbox &gt; User This Mailbox For &gt; [Draft, Sent, Trash, Junk]</p>
<p>Once you have done this correctly, you should just be left with the Starred and Important folders, as shown in the screenshot opposite.</p>
<h2>About Gmail&#8217;s folder system</h2>
<p>Gmail (Google Apps mail) uses a slightly funky system for storing messages in IMAP folders. It&#8217;s actually pretty neat, and allows very effective use of space. It creates folders virtually from the labels you attach to messages in the web interface. So, if you have a message with a 10Mb attachment, and assign it to two labels, then it will only take up 10Mb in your Gmail account. Try it and see! However, when you view it using mail.app or any other IMAP client, you will see the same message in two folders. Unfortunately, on your Mac, if storing the messages locally (which I always do) then the magic is lost and you will be keeping two separate copies.</p>
<p>This is esoteric, and doesn&#8217;t really matter in day to day usage, but sometimes, you might want to find a message on your Mac, and you might think it&#8217;s gone&#8230; forever. But &#8211; there is an idiosyncrasy in the way IMAP clients interact with the labelling system. If you drag a message from a Gmail folder in mail, to a local folder on your mac, you might think yo uhave removed it from your Google account. You haven&#8217;t. What you have done is remove Gmail label from the message in the Gmail system, and copied the message to your local Mac disk. The message will still exist in the  Gmail account in the &#8220;All Mail&#8221; folder.</p>
<p>The &#8220;All Mail&#8221; folder in Gmail is (you guessed), another virtual folder, but this one is a bit special. It contains all messages including those that have no labels at all&#8230; i.e. those messages that do not appear in any folder in an IMAP client such as mail.app. So, if you can&#8217;t find a message in Mail.app, then there is always a slim chance it might be buried somewhere in your Gmail account.</p>
<p>Currently, there is no easy way to filter out all unlabelled mail in Gmail. This is something that people have requested for years, but Google have not yet provided.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/f9yXJ2USYNQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/11/how-to-switch-from-mobile-me-icloud-to-google-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/11/how-to-switch-from-mobile-me-icloud-to-google-apps/</feedburner:origLink></item>
		<item>
		<title>How to test your website before switching DNS</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/NOpBwMbC9IE/</link>
		<comments>http://www.sant-media.co.uk/2011/09/how-to-test-your-website-before-transferring-dns/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 16:16:44 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General Tech Tips]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[linux tips]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2140</guid>
		<description><![CDATA[This article will show you how you can access and test your joomla, wordpress, drupal, or other content managed website before you actually change nameservers or DNS and risk a huge disaster! I&#8217;m surprised I haven&#8217;t written about this before &#8211; it&#8217;s such a simple thing to do, and is an absolute killer tip for [...]]]></description>
			<content:encoded><![CDATA[<p>This article will show you how you can access and test your joomla, wordpress, drupal, or other content managed website before you actually change nameservers or DNS and risk a huge disaster! I&#8217;m surprised I haven&#8217;t written about this before &#8211; it&#8217;s such a simple thing to do, and is an absolute killer tip for any developers out there.<!--more--></p>
<h2>The Problem</h2>
<p>Your customer has a website at www.mycustomer.com &#8211; this is pointing at an ip address of 1.2.3.4 and everything is hunky dory. You have been engaged to build their new website (lucky you!) and you have either beavered away using WAMP or MAMP locally (if you are running your home compiled copy of apache then you shouldn&#8217;t need to read this article!), or maybe you have just developed the site on a temporary domain using another hosting account.</p>
<p>Whatever method you have used to develop your site, you now find yourself in a position where you need to move it to the final production hosting server, and you need to change the nameservers, or the DNS records for your customer&#8217;s domain to activate the new hosting.</p>
<p>But&#8230; you haven&#8217;t been able to fully test the installation because your site isn&#8217;t static, probably relies on mod_rewrite for those SEO friendly URLs and the mod_userdir solution offered by the hosting company, http://hostingco.com/~username/yoursite just won&#8217;t work with most modern sites. So, there&#8217;s no way to actually see the site running before you throw the switch, as it were.</p>
<p>How many times have you transferred the DNS to point at the new server, biting your nails in the hope that everything will &#8220;just work&#8221;&#8230; how&#8217;s that working out for you, eh?</p>
<h2>The Solution &#8211; introducing your hosts file</h2>
<p>The solution is to &#8220;cheat&#8221; your development PC into thinking that www.mycustomer.com (your customer&#8217;s new website) actually lives on the new hosting account, and not the old one. You do this by modifying the local hosts file (yes, local space hosts, not localhosts).</p>
<p>Whenever your computer tries to resolve the IP address of a website (lets assume we&#8217;re looking for www.mycustomer.com), it follows (roughly) this sort of a pattern&#8230;</p>
<p>1.) do I have an entry for www.mycustomer.com in my local hosts file?</p>
<p>2.) do I have an entry for www.mycustomer.com in my local DNS cache that hasn&#8217;t expired?</p>
<p>3.) ask my ISP&#8217;s DNS servers to get the IP address for me.</p>
<p>If the process succeeds at stage 1 or 2, then it stops looking any further. This saves time, and makes life easier for the global DNS system.</p>
<p>So, if your new hosting account has an IP address of 77.72.7.58 then all we need to do is tell your local PC that www.mycustomer.com lives there. And here&#8217;s how you do it!</p>
<h3>Windows</h3>
<p><strong><span style="color: #ff6600;">C:\Windows</span>\system32\drivers\etc\hosts</strong></p>
<p>The bit in orange may change depending on where Windows is installed, but this is the default.</p>
<p>A default windows hosts file looks something like this:</p>
<p>You just need to add onto the end, something like:</p>
<p>Just open the file using notepad, and you&#8217;re away!</p>
<h3>Mac or Linux</h3>
<p>On a Mac and any flavour of Linux I&#8217;m aware of, the hosts file lives at</p>
<p><strong>/etc/hosts</strong></p>
<p>simple, eh? Again, the default hosts file doesn&#8217;t contain very much, usually just something like:</p>
<p>So again, all you have to do is add the following</p>
<p>Depending on your setup, you may not have permissions to edit this file. The best way to edit it is via the command line using something like:</p>
<p>If pico doesn&#8217;t work, try using nano. I&#8217;m not covering vi because, again, if you know vi, then you won&#8217;t need this article!</p>
<h2>The result</h2>
<p>Thats it! You should now be able to ping the address mycustomer.com or www.mycustomer.com and get the IP address of the new server. If ping is giving the right results, then so should your web browser &#8211; go and give it a go! If your web browser is not giving you the content from your new server, then clear it&#8217;s cache to make sure.</p>
<p>Now you can launch that new website with absolute confidence that it works properly! When you finally go live, just remove or comment out the entries from your hosts files by putting a hash # at the start of the lines. Remember <strong>NOT to remove</strong> or comment out the <strong>127.0.0.1 localhost</strong> entries or you will break your computer&#8217;s networking facilities.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/NOpBwMbC9IE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/09/how-to-test-your-website-before-transferring-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/09/how-to-test-your-website-before-transferring-dns/</feedburner:origLink></item>
		<item>
		<title>Find and replace all timthumb.php on server – bash script</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/N5KxJiMaVTE/</link>
		<comments>http://www.sant-media.co.uk/2011/08/find-and-replace-all-timthumb-php-on-server-bash-script/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 09:04:00 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[exploits]]></category>
		<category><![CDATA[ziphost]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2134</guid>
		<description><![CDATA[The recent vulnerablity found in the popular timthumb.php image resizer has hit websites worldwide pretty hard. Pretty easy to deal with if you are just running your own site &#8211; just replace the script with the latest version from the source. If you are running a hosting company, then you have either mitigated the issue [...]]]></description>
			<content:encoded><![CDATA[<p>The recent <a href="http://markmaunder.com/2011/zero-day-vulnerability-in-many-wordpress-themes/" target="_blank">vulnerablity found in the popular timthumb.php image resizer</a> has hit websites worldwide pretty hard. Pretty easy to deal with if you are just running your own site &#8211; just <a href="http://code.google.com/p/timthumb/" target="_blank">replace the script with the latest version from the source</a>.</p>
<p>If you are running a hosting company, then you have either mitigated the issue somehow, or your helpdesk is probably still hung over from the after effects of exploited timthumb scripts.</p>
<p>So, cutting to the chase, here&#8217;s a script that I have used to run through whole cPanel based servers, looking for files called timthumb.php or thumb.php, which contain the text &#8220;timthumb&#8221; (almost every instance I have seen of the script contains this code in it somewhere).</p>
<p>It then moves/renames the file to something safe, and copies over the latest source from a location you can tweak in the script, and then sets the ownership and permissions correctly (assuming you are running suPHP).</p>
<h2>The bash script:</h2>
<p>Obviously, the usual disclaimers apply here &#8211; You are free to use this script, but NO responsibility can be accepted for anything that goes wrong if you choose to!</p>
<p>This is actually version 2, as it were &#8211; I have modified the script so that it now looks for the version number within the script and only updates versions that do not match those shown in the if statement.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/N5KxJiMaVTE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/08/find-and-replace-all-timthumb-php-on-server-bash-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/08/find-and-replace-all-timthumb-php-on-server-bash-script/</feedburner:origLink></item>
		<item>
		<title>NATS AWARE GPS Lanyard Problem</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/tDFGJzFmFo4/</link>
		<comments>http://www.sant-media.co.uk/2011/07/nats-aware-gps-lanyard-problem/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 18:42:55 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[flying]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2122</guid>
		<description><![CDATA[OK, so you have the nice little NATS AWARE GPS unit for your microlight. Because you are doing things by the book, you are going to submit TIL109a to the BMAA to show that you have been duly diligent in the fitting of the unit to your aircraft. However, if like most pilots, you fit [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so you have the nice little <a href="http://www.airspaceaware.com/" target="_blank">NATS AWARE GPS</a> unit for your microlight. Because you are doing things by the book, you are going to submit TIL109a to the BMAA to show that you have been duly diligent in the fitting of the unit to your aircraft.</p>
<p>However, if like most pilots, you fit your AWARE unit in a removable manner, Section 2 on page 4 of the TIL (specifically section 2.1) asks &#8220;Lanyard fitted &#8211; Ensure GPS is not a hazard if supported only by the lanyard.&#8221;</p>
<p>OK, I&#8217;m not knocking the AWARE or Airbox in any way. I love my Aware,  and heartily recommend one to anyone who wants a simple GPS device to  help keep themselves away from controlled airspace &#8211; but&#8230;</p>
<p>It&#8217;s ironic that the AWARE, developed by Airbox in association with NATS, and supported by the BMAA with it&#8217;s own fast track TIL minor mod submission, doesn&#8217;t actually have a Lanyard loop anywhere on it&#8217;s shiney orange and black casing.</p>
<h2>To make an omelette</h2>
<p>To make a lanyard hole I needed to know where to drill (oh my! there goes the warranty!) two holes. So, it was time to take the back off. Doing so would also reveal the location and type of LiPo battery powering the unit &#8211; thus making it easier to replace in future.</p>
<p>Note: I really shouldn&#8217;t have to say this, but taking your AWARE apart is at least going to invalidate the warranty, and if you&#8217;re ham fisted, quite likely to end in tears&#8230;</p>
<p>The case is a bit fiddly to open up &#8211; 4 tiny grub screws (circled in BLUE) hold the back of the case to the orange screen mouting frame, so whizz those out, and then there are four snap tabs on the inside of the case loacted as shown below (circled in RED):</p>
<p>You just have to sneek a small blade/tip into the gap between the black and orange plastic to locate these and apply a bit of pressure to click them free. Be carefull not to push too hard and break the tabs!</p>
<p>I first considered the corner where the speaker is mounted but discounted this as it would be too weak, relying on a little bit of the black casing, which is pretty thin.</p>
<p>The better solution would be a single hole near the stylus hole itself. If drilling into the case blind while it is still assembled, be VERY careful, as if you bodge your drill bit in too far you may rupture the LiPo battery with spectacular results&#8230; The drill bit should not go in any more than 2mm.</p>
<p>Once drilled, pass a nylon tie/zip/cable wrap into the stylus  hole, and out of the new hole in the case and pull it tight. A standard/generic lanyard can then be  fitted around the exposed portion of the cable tie and fixed to a point in the aircraft (or the mounting bracket &#8211; see below). Although this denies the stylus it&#8217;s storage hole, this is a very strong solution, which easily passed a 9G load test.</p>
<h2>Another solution</h2>
<p>Large piece of PCB circuit board glued to the back of the case with a hole in! &#8211; Hysol 9462 is probably one of the better epoxies to do this with.</p>
<h2>Mounting bracket</h2>
<p>We used the <a href="http://www.ram-mount.co.uk/universal-pda-holder-p-1028.html" target="_blank">RAM-HOL-PD3</a> universal PDA mount in our Skyranger, which has plenty of opportunity for an extra hole for a lanyard fitting. It&#8217;s a great mount, with a spring loaded side claw, so popping the GPS in and out is easy.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/tDFGJzFmFo4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/07/nats-aware-gps-lanyard-problem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/07/nats-aware-gps-lanyard-problem/</feedburner:origLink></item>
		<item>
		<title>Shift Key Contrain Broken in Illustrator</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/AKTbeQKfzzI/</link>
		<comments>http://www.sant-media.co.uk/2011/05/shift-key-contrain-broken-in-illustrator/#comments</comments>
		<pubDate>Tue, 10 May 2011 10:07:17 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Graphic Design]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[cs5]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2117</guid>
		<description><![CDATA[If you suddenly find the Shift key no longer constrains to porportions in Adobe Illustrator, and holding down the space bar no longer allows you to pan around your artwork, here&#8217;s the weirdest fix you will ever find for this Illustrator problem. For info, I have had this on CS5 since a clean install on [...]]]></description>
			<content:encoded><![CDATA[<p>If you suddenly find the Shift key no longer constrains to porportions in Adobe Illustrator, and holding down the space bar no longer allows you to pan around your artwork, here&#8217;s the weirdest fix you will ever find for this Illustrator problem. For info, I have had this on CS5 since a clean install on OSX Snow Leaopard.</p>
<p>Install Tweetdeck&#8230; Open Tweetdeck&#8230; then go back to Illustrator &#8211; and hey presto! No longer do i have to log out and back in again to get round this REALLY annoying bug.</p>
<p>Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/AKTbeQKfzzI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/05/shift-key-contrain-broken-in-illustrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/05/shift-key-contrain-broken-in-illustrator/</feedburner:origLink></item>
		<item>
		<title>Configure iPhone for cPanel Email</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/RPmT40aGdB8/</link>
		<comments>http://www.sant-media.co.uk/2011/04/configure-iphone-for-cpanel-email/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 08:49:05 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General Tech Tips]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[WHM Cpanel]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2098</guid>
		<description><![CDATA[I get asked this so many times, I though I would save myself a bit of time, and publish a simple guide to setting up an iPhone for a POP3 or IMAP email account. Although the title says for cPanel, this guide is fine for just about any POP3 or IMAP account where you know [...]]]></description>
			<content:encoded><![CDATA[<p>I get asked this so many times, I though I would save myself a bit of time, and publish a simple guide to setting up an iPhone for a POP3 or IMAP email account. Although the title says for cPanel, this guide is fine for just about any POP3 or IMAP account where you know the server and account details.</p>
<p>The screenshots were taken from my iPhone 4 runnng iOS 4.3.x. So, lets start.</p>
<p>Tap the <strong>Settings</strong> icon on your iPhone&#8217;s home screen. This will bring you to this screen (below).</p>
<p><img class="alignnone size-full wp-image-2099" title="iPhone Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0552.jpg" alt="iPhone Settings" width="213" height="320" /><!--more--></p>
<p>Tap the <strong>Mail, Contacts, Calendars</strong> icon tp get the following screen.</p>
<p><img class="alignnone size-full wp-image-2100" title="iPhone Email Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0553.jpg" alt="iPhone Email Settings" width="213" height="320" /></p>
<p>OK, now tap the <strong>Add Account&#8230;</strong> icon to get the following screen</p>
<p><img class="alignnone size-full wp-image-2101" title="iPhone Email Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0554.jpg" alt="iPhone Email Settings" width="213" height="320" /></p>
<p>Tap <strong>Other</strong></p>
<p><strong><img class="alignnone size-full wp-image-2102" title="iPhone Email Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0555.jpg" alt="iPhone Email Settings" width="213" height="320" /></strong></p>
<p>You guessed, tap the <strong>Add Mail Account</strong> icon (not too hard, is it?)<strong> </strong></p>
<p><strong><img class="alignnone size-full wp-image-2103" title="iPhone Email Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0556.jpg" alt="iPhone Email Settings" width="213" height="320" /></strong></p>
<p>The <strong>New Account</strong> screen takes the basic details of your account:<strong> </strong></p>
<ul>
<li><strong>Name</strong> &#8211; This is the friendly name that will identify your outgoing emails (e.g. Steve Sant).</li>
<li><strong>Address</strong> &#8211; this should be your full email address for the POP3 or IMAP account.</li>
<li><strong>Password</strong> &#8211; This is the password that was configured for the mailbox (NOT your cPanel password).</li>
<li><strong>Description</strong> &#8211; this is just to help you identify the account in your settings later &#8211; call it anything you like.</li>
</ul>
<p>Then tap <strong>Next</strong> at the top of the screen, which will bring you to the following screen.</p>
<p><img class="alignnone size-full wp-image-2106" title="iPhone Email Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0557.jpg" alt="iPhone Email Settings" width="213" height="425" /></p>
<p>Choose whether you want to connect using POP3 (messages downloaded locally to your iPhone) or IMAP (messages are kept on the server so you can also read them from your home PC/Mac). Just remember if you are using IMAP that you will start using up your user account space quota.</p>
<p>You will need to fill in the following:</p>
<p>Incoming Mail Server<strong> </strong></p>
<ul>
<li><strong>Host Name</strong> &#8211; This is almost always mail.domain.com &#8211; so if your email address is tommy@finger.co.uk, then your mail server is almost certainly mail.finger.co.uk</li>
<li><strong>User Name</strong> &#8211; For cPanel accounts, the account username is always the same as the mailbox address &#8211; if you are not using cPanel then you might have a different user name, but it will still be provided to you when you create your mailbox.</li>
<li><strong>Password</strong> &#8211; This should already be filled in for you, but if not, then enter your mailbox password again here.</li>
</ul>
<p>Outgoing Mail Server</p>
<ul>
<li><strong>Host Name</strong> &#8211; Again, this is almost always mail.domain.com, the same as your incoming server.</li>
<li><strong>User Name</strong> &#8211; Use the same details as you entered for your incoming mail server, above.</li>
<li><strong>Password</strong> &#8211; This should already be filled in for you, but if not, then enter your mailbox password again here.</li>
</ul>
<p>Tap the <strong>Next</strong> button, at the top to verify your settings.</p>
<p>At this stage, you may get one or two responses from your iPhone:</p>
<h3>1.) The SSL Certificate on the mail server you are trying to connect to, doesn&#8217;t protect the server name you specified</h3>
<p>It is very likely that at this stage you will receive a Cannot Verify Server Identity warning. This is because the SSL certificate that is protecting your mail server is probably assigned to the main server name, and not your individual domain. If you contact your hosting provider, they should be able to tell you the right server names to use, to avoid this error.</p>
<p><img class="alignnone size-full wp-image-2109" title="iPhone Cannot Verify Server Identity" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0574.jpg" alt="iPhone Cannot Verify Server Identity" width="213" height="320" /></p>
<p>You have two choices here. <strong>Continue</strong>, and ignore the message, or press <strong>Cancel</strong> and swith to using a NON SSL connection.</p>
<p>In all respects, it&#8217;s probably better to press <strong>Continue</strong> and ignore the problem. Although, strictly speaking, means that if you accidentally connected to another server (unlikely) or if you were the victim of DNS poisoning you wouldn&#8217;t know about it, it&#8217;s still a more secure choice than going with a NON SSL connection (which is still just as vulnerable to DNS poisoning).</p>
<h3>2.) Your iPhone Cannot Connect Using SSL</h3>
<p><img class="alignnone size-full wp-image-2110" title="iPhone Cannot Connect Using SSL" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0559.jpg" alt="iPhone Cannot Connect Using SSL" width="213" height="320" /></p>
<p>This simply means that your mail server doesn&#8217;t offer the facility to connect using SSL. To be honest, if you get this, then there is something amis with your hosting provider&#8217;s server or, infinitely more likely, you have entered the wrong details somewhere. So tap <strong>No</strong> and go over everything again!</p>
<p>If everything worked out (and in most cases it should), then great! If you still can&#8217;t connect to your outgoing server, then read on&#8230;</p>
<h2>Still got problems?</h2>
<h3>Advanced Incoming Mail Server Settings</h3>
<p>If you need to alter advanced settings for your incoming server, then tap the <strong>Advanced</strong> button at the bottom of the account settings screen :</p>
<p><img class="alignnone size-full wp-image-2112" title="Advanced Button" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0560.jpg" alt="Advanced Button" width="213" height="320" /></p>
<p>This will give you the following screen :</p>
<p><img class="alignnone size-full wp-image-2113" title="iPhone Incoming Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0561.jpg" alt="iPhone Incoming Settings" width="213" height="320" /></p>
<p>Here you can choose if you want SSL, the type of authentication, and when messages should be deleted from the server, if ever. You can also choose to use a non-standard TCP Port.</p>
<h3>Advanced Outgoing Mail Server Settings</h3>
<p>If you need to alter advanced settings for your incoming server, then tap the <strong>SMTP</strong> button at the bottom of the account settings screen :</p>
<p><img title="Advanced Button" src="../wp-content/uploads/2011/04/IMG_0560.jpg" alt="Advanced Button" width="213" height="320" /></p>
<p>This brings you to this screen :</p>
<p><img class="alignnone size-full wp-image-2114" title="SMTP Server Selection iPhone" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0562.jpg" alt="SMTP Server Selection iPhone" width="213" height="320" /></p>
<p>You should see your chosen server at the top (as your Primary Server). All of the other servers should say <strong>Off</strong> (unless you are an expert, in which case you shouldn&#8217;t be reading this guide!). Tap on your Primary Server at the top, to bring you to the following screen :</p>
<p><img class="alignnone size-full wp-image-2115" title="iPhone SMTP Server Advanced Settings" src="http://www.sant-media.co.uk/wp-content/uploads/2011/04/IMG_0563.jpg" alt="iPhone SMTP Server Advanced Settings" width="213" height="320" /></p>
<p>Here you can configure the Host Name, User Name, Password, Use SSL, Authentication method, and TCP Port.</p>
<p>Many large ISPs block you from using SMTP servers outside of their network. You may run up against this problem if your iPhone connects to your home WiFi network and your home broadband is with one of the big providers in the UK or USA.</p>
<p>This is usually circumvented by connecting to your mail server using a different Port other than 25 (the default). For example, ziphost.co.uk use Port 525 as well as 25, so just change your Server Port to 525 and you you should get round the problem.</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/RPmT40aGdB8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/04/configure-iphone-for-cpanel-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/04/configure-iphone-for-cpanel-email/</feedburner:origLink></item>
		<item>
		<title>PHP error_reporting Boolean Values</title>
		<link>http://feedproxy.google.com/~r/santmedia/~3/ygrubPK1Taw/</link>
		<comments>http://www.sant-media.co.uk/2011/04/php-error_reporting-boolean-values/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 10:27:12 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sant-media.co.uk/?p=2093</guid>
		<description><![CDATA[The PHP page is really not that useful, and only talks about using the PHP Contstants E_ALL, E_NOTICE, E_STRICT etc This information is not obvious on the PHP site, so I&#8217;m just putting it here as an aid to my brain cells. This is for PHP 5.2.x E_RECOVERABLE_ERROR = 4096 E_USER_NOTICE = 1024 E_USER_WARNING = [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting" target="_blank">PHP page is really not that useful</a>, and only talks about using the PHP Contstants E_ALL, E_NOTICE, E_STRICT etc</p>
<p>This information is not obvious on the PHP site, so I&#8217;m just putting it here as an aid to my brain cells. This is for PHP 5.2.x</p>
<p>E_RECOVERABLE_ERROR  = 4096<br />
E_USER_NOTICE = 1024<br />
E_USER_WARNING = 512<br />
E_USER_ERROR = 256<br />
E_COMPILE_WARNING = 128<br />
E_COMPILE_ERROR = 64<br />
E_CORE_WARNING = 32<br />
E_CORE_ERROR = 16<br />
E_NOTICE = 8<br />
E_PARSE = 4<br />
E_WARNING = 2<br />
E_ERROR = 1</p>
<p>E_ALL = 6143 = 1011111111111</p>
<p>Therefore E_ALL &amp; ~E_NOTICE = 6143 &#8211; 8 = 6135</p>
<p>And to kill warnings as well:</p>
<p>E_ALL &amp; ~E_NOTICE &amp; ~E_WARNING = 6143 &#8211; 8- 2 = 6133</p>
<img src="http://feeds.feedburner.com/~r/santmedia/~4/ygrubPK1Taw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sant-media.co.uk/2011/04/php-error_reporting-boolean-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.sant-media.co.uk/2011/04/php-error_reporting-boolean-values/</feedburner:origLink></item>
	</channel>
</rss>

