<?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>richard hyland &#187; Web Development</title>
	<atom:link href="http://www.richardhyland.com/diary/category/computers-internet/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardhyland.com/diary</link>
	<description>random ramblings of a web, windows and iphone developer, oh and amateur photographer</description>
	<lastBuildDate>Mon, 01 Aug 2011 14:45:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<cloud domain='www.richardhyland.com' port='80' path='/diary/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Thank you YouTube for helping kill off IE6</title>
		<link>http://www.richardhyland.com/diary/2009/07/15/thank-you-youtube-for-helping-kill-off-ie6/</link>
		<comments>http://www.richardhyland.com/diary/2009/07/15/thank-you-youtube-for-helping-kill-off-ie6/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 07:23:52 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=510</guid>
		<description><![CDATA[Think of the developers&#8230;. that and the many man hours wasted trying to get websites to work on an archaic web browser that is Internet Explorer 6. When it was released IE6 was a good web browser but Internet Explorer 7 was released in October 2006, yes that&#8217;s right almost 3 years ago and Internet [...]]]></description>
			<content:encoded><![CDATA[<p>Think of the developers&#8230;. that and the many man hours wasted trying to get websites to work on an archaic web browser that is Internet Explorer 6.</p>
<p>When it was released IE6 was a good web browser but Internet Explorer 7 was released in October 2006, yes that&#8217;s right almost 3 years ago and Internet Explorer 8 has been out for many months now too!</p>
<p>There is simply no excuse for not upgrading, if you have an internal intranet application that requires IE6, dare I say start looking for a new bit of software that has been updated in the past 3 years?</p>
<p>However I noticed over at Techcrunch today &#8220;<a title="YouTube Will Be Next To Kiss IE6 Support Goodbye" rel="bookmark" href="http://www.techcrunch.com/2009/07/14/youtube-will-be-next-to-kiss-ie6-support-goodbye/">YouTube Will Be Next To Kiss IE6 Support Goodbye</a>&#8221; this image taken by a user of Internet Explorer 6:</p>
<p><img class="aligncenter size-full wp-image-511" title="youtube-ie6" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/07/youtube-ie6.png" alt="youtube-ie6" width="630" height="259" /></p>
<p>It just needs a few more major sites to totally drop support for IE6 and the job is done, and it couldn&#8217;t come soon enough!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/07/15/thank-you-youtube-for-helping-kill-off-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getters and Setters in PHP?</title>
		<link>http://www.richardhyland.com/diary/2009/05/30/getters-and-setters-in-php/</link>
		<comments>http://www.richardhyland.com/diary/2009/05/30/getters-and-setters-in-php/#comments</comments>
		<pubDate>Sat, 30 May 2009 19:32:51 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[adLDAP]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=487</guid>
		<description><![CDATA[This is the question I&#8217;ve been pondering this week. In older versions of PHP other than to keep code neat there was no real need for this functionality, but with PHP 5 you can declare access properties for variables and functions in classes.  In other OO languages, such as C# we&#8217;ve been used to it [...]]]></description>
			<content:encoded><![CDATA[<p>This is the question I&#8217;ve been pondering this week.</p>
<p>In older versions of PHP other than to keep code neat there was no real need for this functionality, but with PHP 5 you can declare access properties for variables and functions in classes.  In other OO languages, such as C# we&#8217;ve been used to it for a long time.  In traditional OOP, if we wanted to get or set an object&#8217;s private member, we would need to write a public method to do the job.<br />
The reason behind making a member data private and then accessing it through a public method is to avoid the implementing-user to access it directly.  There can be many reasons for prohibiting direct access to member data to the implementing-code.</p>
<p>PHP traditionally has a weak type system, a further check of the data type may be necessary. PHP 5 and C# .NET have a getter and setter method feature, making it look like we&#8217;re accessing the data member directly.</p>
<p>For instance in PHP </p>
<pre class="php" name="code">
class Circle
 {
        private $radius; # integer
        # Constructor
        public function __construct($radius = 15)
         {
                self::__set('radius', $radius);
         }

        # Setter
        public function __set($name, $value)
         {
                switch ($name)
                 {
                        case 'radius':
                          if (!is_numeric($value)) # is_int() for strict type checking
                           throw new Exception('Radius must be of a numeric type');
                          if ($value < 10 || $value > 500)
                           throw new Exception('Radius must be within the range of 10 - 500');
                          $this->radius = $value;
                        break;
                        default:
                          throw new Exception("Attempt to set a non-existing property: $name");
                        break;
                 }
         }

        # Getter
        public function __get($name)
         {
                if (in_array($name, array('radius')))
                 return $this->$name;

                switch ($name)
                 {
                        default:
                          throw new Exception("Attempt to get a non-existing property: $name");
                        break;
                 }
         }

 }

$c = new Circle();
$c->radius = 25;
echo $c->radius;
</pre>
<p>The problems with this method are two fold.  Firstly, because PHP is a weakly typed language you can&#8217;t really guarantee that the set and get are in the right format so you have to handle that in the __set and __get functions, and secondly you would be able to set or get any private variable in that class.</p>
<p>Based on the second point, is it therefore worth actually defining a manual setter and getter for each private variable you want to allow access to?  For example:</p>
<pre class="php" name="code">
class test {
	private $count;
	public function setCount( $value )
	{
		$this->count = $value;
	}
	public function getCount()
	{
		return $this->count;
	}
}
</pre>
<p>Because if we use this method we could actually check in the setter if the variable is_int($value) and throw an exception if it isn&#8217;t.</p>
<p>My question is, based on the fact that traditionally PHP is a weakly typed language, is it worth</p>
<ul>
<li>using the traditional OO format of getters and setters __get and __set</li>
<li>is it worth declaring your own get and set public functions for only specific variables you want to allow</li>
<li>or is it worth just making the variable public and setting it directly from outside the class e.g.</li>
</ul>
<pre name="code" class="php">
class testClass {
    public $count;
}
$myclass = new testClass();
$myclass->count = 1;
</pre>
<p>The reason I ask is that is that I&#8217;m considering how to handle getters and setters in <a href="http://adldap.sourceforge.net" target="_blank">adLDAP</a>.  adLDAP is a PHP library that I&#8217;m one of two developers maintaining.  This is an open source library that provides Microsoft Active Directory integration over LDAP for PHP scripts, such as creating user accounts, Exchange mailboxes, managing groups and authentication, etc.</p>
<p>The library currently has private member variables for things such as the domain controller, a domain admin username and password, ssl settings, etc.  The __construct function also allows these to be set through an array passed to it.  However I have the need to actually disconnect from my domain controller, change a property and re-connect again.  So my reason for this post is, what&#8217;s the best way to handle these getters and setters based on my three choices above?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/05/30/getters-and-setters-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing browser loyalties</title>
		<link>http://www.richardhyland.com/diary/2009/03/11/changing-browser-loyalties/</link>
		<comments>http://www.richardhyland.com/diary/2009/03/11/changing-browser-loyalties/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 09:28:58 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Computers & Internet]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=362</guid>
		<description><![CDATA[I&#8217;m a web developer and unlike a lot of developers I have been a big fan and user of Internet Explorer 7 and now version 8. However the standards compliance of Internet Explorer has always left something to be desired.  With the introduction of 7 a few years back the job of making sites work [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-365" title="internet_explorer_7_logo" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/03/internet_explorer_7_logo.png" alt="internet_explorer_7_logo" width="154" height="154" />I&#8217;m a web developer and unlike a lot of developers I have been a big fan and user of Internet Explorer 7 and now version 8.</p>
<p>However the standards compliance of Internet Explorer has always left something to be desired.  With the introduction of 7 a few years back the job of making sites work in Internet Explorer became a whole lot easier, but there is still a lot missing that really ought to be included, and thank goodness transparent PNG support was added.</p>
<p>Recently I switched to using Internet Explorer 8 RC as my main browser and whilst I like it there were a number of failings I found.  The first is the so-called standards compliance.  Well seeing as it doesn&#8217;t support lots of CSS 3 properties doesn&#8217;t really make it standards compliant, but I digress. Mainly my issues were with it&#8217;s rendering of pages that looked great in Firefox, Chrome, Opera and Safari but just didn&#8217;t work properly in Internet Explorer 8.  The sites weren&#8217;t even using browser sniffing to load different stylesheets.  Quite simply IE&#8217;s implementation of the standards was different to all the other major browsers.  Sorry Microsoft, must try harder!</p>
<p>Over the past month or so I&#8217;ve suddenly discovered that I now use Firefox 3 as my primary browser at work (I still use Safari 4 at home as I&#8217;m a mac person) and combine it with Firebug and it&#8217;s simply stunning.</p>
<p><a href="http://www.mozilla.com/firefox?from=sfx&amp;uid=0&amp;t=307"><img src="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/200x32_best-yet.png" border="0" alt="Spreadfirefox Affiliate Button" /></a></p>
<p>What actually prompted me to write about this was a story I picked up upon this morning entitled &#8216;<a href="http://tech.slashdot.org/article.pl?sid=09/03/10/1942232" target="_self">IE8 May Be End of the Line For Internet Explorer</a>&#8216;.  It discusses the fact that Microsoft might be considering using Webkit (the engine behind Chrome and Safari) for Internet Explorer. In an article on <a href="http://www.appleinsider.com/articles/08/11/06/microsofts_ballmer_considers_using_webkit_within_ie.html" target="_self">AppleInsider</a> Steve Ballmer is quoted as saying</p>
<blockquote><p><strong>Addressing a developer conference in Sydney Australia, Microsoft CEO Steve Ballmer said the idea of using WebKit as the rendering engine within its web browser was &#8220;interesting&#8221; and added &#8220;we may look at that.&#8221;</strong></p></blockquote>
<p>The fact that Ballmer would even mention using WebKit is very interesting indeed as you&#8217;d expect such a thing to be dismissed out of hand.  WebKit quite simply has the fastest and best rendering engine of any modern browser.  Just try <a href="http://www.apple.com/safari/" target="_blank">Safari 4</a> on Windows or a Mac to try it out for yourself</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/03/11/changing-browser-loyalties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing other people&#8217;s code</title>
		<link>http://www.richardhyland.com/diary/2009/03/10/fixing-other-peoples-code/</link>
		<comments>http://www.richardhyland.com/diary/2009/03/10/fixing-other-peoples-code/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 18:07:58 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/2009/03/10/fixing-other-peoples-code/</guid>
		<description><![CDATA[Well I&#8217;ve spent a very productive afternoon fixing CSS bugs in jQuery UI http://jqueryui.com, to make a very specific set of conditions work under Internet Explorer. If you&#8217;re interested, basicaly putting an overflow inside the dialog overlow causes the first overflow to render incorrectly if the positions are relative. The great thing, though about the [...]]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;ve spent a very productive afternoon fixing CSS bugs in jQuery UI http://jqueryui.com, to make a very specific set of conditions work under Internet Explorer.</p>
<p>If you&#8217;re interested, basicaly putting an overflow inside the dialog overlow causes the first overflow to render incorrectly if the positions are relative.  </p>
<p>The great thing, though about the open source community is I can now help my fellow programmers by submitting my findings (and fixes) back to the UI dev team. </p>
<p>This is where I have mixed feelings about open source, as in GPL style open source. If I write software as a sole developer what can I realistically offer than a small amount of support in addition to effectively giving my code away for free to anyone who buys a licence. Then for them to be able to resell it and I don&#8217;t make money anymore. </p>
<p>The GPL is great for big projects or simply hobbies but it isn&#8217;t all that great for sole developers. I much prefercthr method of giving source with the application but don&#8217;t give distribution rights away. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/03/10/fixing-other-peoples-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two days with PDO and my lack of faith in the PHP extension developers</title>
		<link>http://www.richardhyland.com/diary/2009/02/25/two-days-with-pdo-and-my-lack-of-faith-in-the-php-extension-developers/</link>
		<comments>http://www.richardhyland.com/diary/2009/02/25/two-days-with-pdo-and-my-lack-of-faith-in-the-php-extension-developers/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 10:13:53 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Computers & Internet]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=323</guid>
		<description><![CDATA[OK let me first start by saying, I absolutely love PHP, I tend to compile my PHP from source and for the most part have absolutely no issues with it whatsoever. Now for work I needed to install PDO extensions to PHP with Microsoft SQL Server support (PDO_DBLIB). I shall also start off by saying [...]]]></description>
			<content:encoded><![CDATA[<p>OK let me first start by saying, I absolutely love <a href="http://uk.php.net" target="_self">PHP</a>, I tend to compile my PHP from source and for the most part have absolutely no issues with it whatsoever.</p>
<p>Now for work I needed to install <a href="http://uk.php.net/pdo" target="_self">PDO</a> extensions to PHP with Microsoft SQL Server support (<a href="http://uk.php.net/manual/en/ref.pdo-dblib.php" target="_self">PDO_DBLIB</a>). I shall also start off by saying that I currently use the standard sqlite extensions to PHP.</p>
<p>Now PDO is actually available on Linux as pdo.so in the modules directory usually by default so let&#8217;s actually just try to run</p>
<blockquote><p>pecl install pdo_dblib</p></blockquote>
<p>Can&#8217;t do that we get the error</p>
<blockquote><p>&#8220;pear/PDO_DBLIB requires PHP extension &#8220;pdo&#8221; (version &gt;= 1.0)&#8221;</p></blockquote>
<p>OK well we had PDO installed but clearly the wrong version.  First up I recompiled PHP adding in the following configuration lines</p>
<blockquote><p>&#8211;with-zlib &#8211;enable-pdo=shared &#8211;with-pdo-sqlite=shared &#8211;with-sqlite=shared</p></blockquote>
<p>I actually already had zlib compiled, I just reference it here as it&#8217;s required. That all worked great, without errors.  So now let&#8217;s run</p>
<blockquote><p>pecl install pdo</p></blockquote>
<p>we should get the right version, correct?  No we still get the same error.  This led me to the following <a href="http://pecl.php.net/bugs/bug.php?edit=1&amp;id=7745" target="_self">bug report</a>.  Note that this bug was opened in May 2006 and is still unsolved at the time of writing.  What we have to do is manually download the package, edit package.xml and remove the PDO dependency line.  Install as usual and restart apache!</p>
<p>These are the steps that work</p>
<blockquote><p>pecl download pdo_dblib</p>
<p>This will download a tar ball of the extension. Extract the tar ball.</p>
<p>tar -xzvf PDO_DBLIB-*.tgz</p>
<p>That will uncompress the package in to a standalone file, package.xml<br />
and a folder containing the extension, in my case it was, PDO_DBLIB-X.X.<br />
Where X was the version number. Open package.xml using your favourite<br />
command line editor. Find and remove the line,</p>
<p>&lt;dep type=&#8221;ext&#8221; rel=&#8221;ge&#8221; version=&#8221;1.0&#8243;&gt;pdo&lt;/dep&gt;</p>
<p>Save the package.xml file, and move it in to the PDO_DBLIB directory.</p>
<p>mv package.xml ./PDO_DBLIB-X.X</p>
<p>Navigate to the PDO_DBLIB directory, then install the package from the<br />
directory. You may need root access for this step.</p>
<p>cd ./PDO_DBLIB-XX</p>
<p>pecl install package.xml</p></blockquote>
<p>After editing php.ini to load</p>
<blockquote><p>extension=pdo.so<br />
extension=pdo_dblib.so</p></blockquote>
<p>phpinfo() reported that the DBLib driver was available as was PDO, all was great. Now I tried to run sqlite_open and it refused to work.</p>
<p>I thought maybe it was the pdo sqlite extension that was conflicting, as I don&#8217;t actually use the pdo version of sqlite, just the main function library I decided to reconfigure php without the sqlite options.</p>
<p>Then I get an error saying that I had configured PDO as a shared object but sqlite was static.  Hmm the PHP manual tells me something different though and I quote</p>
<blockquote><p>In PHP 5, the SQLite extension and the engine itself are bundled and compiled by default. However, since PHP 5.1.0 you need to manually activate the extension in php.ini (because it is now bundled as shared). Moreover, since PHP 5.1.0 SQLite depends on PDO it must be enabled too, by adding the following lines to php.ini (in order):</p></blockquote>
<p>So this is telling me that SQLite is enabled by default and is installed as shared.  Well the PHP installer just told me different, that it&#8217;s installed by default but as static!</p>
<p>OK so back to configure PHP again but this time with the sqlite shared options.  Then we&#8217;ll reference sqlite.so in the php.ini extensions and restart apache!</p>
<p>Oh no we can&#8217;t load apache because the version of sqlite.so is incompatible with the version we need for pdo_dblib.so.</p>
<p>Let us run</p>
<blockquote><p>pecl install sqlite</p></blockquote>
<p>Running that gives us the following error</p>
<blockquote><p>tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:125: warning: initialization from<br />
incompatible pointer type<br />
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:126: warning: initialization from<br />
incompatible pointer type<br />
*** Error code 1<br />
make: Fatal error: Command failed for target `sqlite.lo&#8217;<br />
ERROR: `make&#8217; failed</p></blockquote>
<p>The PHP bug report at <a href="http://pecl.php.net/bugs/bug.php?id=8181">http://pecl.php.net/bugs/bug.php?id=8181</a> that was opened in July 2006 tells us this has all been fixed, but with numerous responses telling the developers that it&#8217;s still broken.  At the time of writing, this is still broken!</p>
<p>This then leads me to the following fix</p>
<blockquote><p>$ pear download sqlite<br />
then unpacked and began to compile it<br />
$ tar zxvf SQLite-1.0.3.tgz<br />
$ cd SQLite-1.0.3<br />
$ phpize<br />
$ ./configure<br />
$ make</p>
<p>edit sqlite.c, comment out the following line:<br />
/* static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; */</p>
<p>And then change these lines<br />
function_entry sqlite_functions[] = {<br />
PHP_FE(sqlite_open, arg3_force_ref)<br />
PHP_FE(sqlite_popen, arg3_force_ref)<br />
to:<br />
function_entry sqlite_functions[] = {<br />
PHP_FE(sqlite_open, third_arg_force_ref)<br />
PHP_FE(sqlite_popen, third_arg_force_ref)</p>
<p>$ make<br />
$ make install<br />
$ cp modules/sqlite.so /usr/lib/php/modules<br />
$ /sbin/service/httpd restart</p></blockquote>
<p>Why oh why do I have to edit the c source code to get this working?   Which by the way DOES actually fix the problem and now I have PDO, SQLite and PDO_DBLIB working on the same system.</p>
<p>This is why I&#8217;m starting to loose faith in the open source PHP community, not because they do a great job in the first place, but because bugs like this exist for well over 2 years!</p>
<p>The response from the Open Source community will be, fix it yourself.  That simply isn&#8217;t the point, I&#8217;m not a C developer, nor do I have the inclination to be.  I also do not know the inner C workings of PHP to easily fix these issues.</p>
<p>I&#8217;ve just wasted two days of my life researching, testing, debugging PHP extensions, I hope it helps anyone else with these issues!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/02/25/two-days-with-pdo-and-my-lack-of-faith-in-the-php-extension-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Choosing a hosting provider</title>
		<link>http://www.richardhyland.com/diary/2009/01/30/choosing-a-hosting-provider/</link>
		<comments>http://www.richardhyland.com/diary/2009/01/30/choosing-a-hosting-provider/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 18:00:26 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Computers & Internet]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=304</guid>
		<description><![CDATA[Always a bit daunting and a question I&#8217;m often asked. &#8216;I want a website but where do I host it&#8217;? A quick Google search will reveal thousands of companies (and the 12 Google Adwords results) and 10&#8242;s of different options. A web developer looking to publish a website will most likely be even more confused [...]]]></description>
			<content:encoded><![CDATA[<p>Always a bit daunting and a question I&#8217;m often asked. &#8216;I want a website but where do I host it&#8217;?</p>
<p>A quick Google search will reveal thousands of companies (and the 12 Google Adwords results) and 10&#8242;s of different options.</p>
<p>A web developer looking to publish a website will most likely be even more confused when doing a search, instead of finding a good web hosting provider highlighted by the search engine.</p>
<p>The reason is very simple many individuals and companies, small and big, have seen the opportunities in web hosting.  Indeed even I partnered with a friend a number of years back to sell space on one of my dedicated servers&#8230; it was space going to spare why not make some money from it?  Of course responsibility and support needs come with that and that is the reason I stopped offering it as I had too much real work to do!</p>
<p>The result of this saw new web hosting providers created overnight, to go with this there is now a plethora of forums, &#8216;reviews&#8217; sites, publications and middle parties, mixed with an entire array of web hosting products, from free hosting to powerful dedicated or co-located servers.</p>
<p>Now I&#8217;m not going to recommend any specific providers, even the ones that currently host my site but to try to explain the options available.</p>
<p><strong>Free Web Hosting</strong></p>
<p>Unless you have a personal website, you should <strong>never look for free web hosting</strong>.  Sorry you just shouldn&#8217;t, unless that is your experimenting and testing code or are willing to be at the whim of a company that can delete, loose your website without any guarantees from the provider themselves.</p>
<p>Companies that offer free hosting tend to do it for the following reasons:</p>
<ul>
<li>they will recoup their costs back by inserting ads on your website or</li>
<li>they are providing Internet for you, and offer you a &#8216;free web space&#8217; and free email, as part of their Internet package, so it&#8217;s not truely free anyway</li>
</ul>
<p>Putting ads outside your control on your own website can be irrelevant and obtrusive  and won’t make your website appear credible. Those webpages are as credible a myspace page, and are just useful to host a couple of images and html pages.</p>
<p>As for Internet Hosting Providers, their free web hosting service is often tied to your subscription. This means that as soon as you stop doing business with them, the free web space is most likely to be deleted or at the very least you will no longer have access to it for updating your site.</p>
<p><strong>Shared Web Hosting or &#8216;Cheap&#8217; Web Hosting</strong></p>
<p>Cheap web hosting is almost always shared web hosting.  A shared web host is where you get a little bit of space on a larger powerful server.  Shared hosting is very common amongst websites online.  Pricing ranges from just over $1 to over $30 (it is common for many web hosts to change in US $ even if they aren&#8217;t based in the US!).</p>
<p>They offer a huge array of options from PHP to .NET to OSCommerce to PHPBB.</p>
<p>Here is what you should look for in shared hosting:</p>
<ul>
<li><strong>Web Technologies</strong> supported. If you are looking to open up a wordpress blog, you need obviously to make sure that the shared plan has PHP and MySQL. Same for Ruby On Rails applications, or .NET shared hosting. This criteria is probably the most important since there’s no use finding a cheap web hosting provider if it won’t run your website. Here’s a possible list of what to look for: programming languages, database, web server software installed, cron jobs, domain name tools, etc.</li>
<li><strong>Number of users hosted on a single machine</strong>. The total number of users directly affects the speed of your website, and there are lots of providers who overload their servers. To gauge this number, ask for a list of active and fairly big websites under their shared web hosting plan, and see if the websites are running well.   They may not be able to divulge the exact domains running but they should be able to give you and idea of how many sites.</li>
<li><strong>Price and possible discounts</strong>. Many companies offer deals and discounts at specific periods so shop around.</li>
<li><strong>Support and Guarantees</strong>. Lastly, doing business with a web hosting company is mostly a long-term relationship, as it is a huge hassle moving hosting providers, especially when it comes to moving all your domains and IP addresses, etc. You might find a great deal, from a new unknown provider, but what you need to make sure is that this company is reliable, that they will still be there one year from now; and there will be someone listening to you if you are having a technical problem with your website.  Looking for well used support forums and live chat capabilities from your provider are good indicators.</li>
</ul>
<p><strong>Dedicated Servers or &#8216;Virtual Private Servers&#8217;</strong></p>
<p>You can look for a VPS (virtual private server) or a dedicated server if you are a small or large company serious about your web presence, if you are a web developer who need performance and greater control of your web server, or if you plan to host an entire array of websites, either your own, or your clients’.</p>
<p>Here are the advantages for virtual private servers offerings:</p>
<ul>
<li>it’s <strong>often cheaper</strong> (although not always) than dedicated servers</li>
<li><strong>provisioning</strong> is usually automated, on-demand and quick, which is good for web developers looking for a hassle-free experience or quick deployment of their server infrastructure.  You can have your server ready for your to load your sites on in minutes.</li>
<li><strong>billing can be done hourly</strong>, which can be a key business argument for startups and companies alike,</li>
<li>you get <strong>SSH access</strong> and a control panel (Plesk or cPanel), which is often enough for your needs.</li>
</ul>
<p>Here are the advantages for dedicated servers offers:</p>
<ul>
<li>you can get <strong>customized servers</strong>, fine-tuned to your needs, such as the exact quantity of RAM, the right CPU, network speed, required bandwidth etc. You can order a RAID hardware setup for instance, which is impossible for a VPS. Need more RAM than processing power? it’s possible. Do you prefer AMD chips instead of Intels? Just order it in the form.</li>
<li>you can setup <strong>advanced configurations</strong> for your technology infrastructure, by setting up firewalls, web clusters, load-balancers, anti-DDOS solutions, etc., which is again, impossible for a VPS</li>
<li>you don’t have to design advanced backup solutions, since your dedicated server is physical and your data won’t evaporate one day, which is the case for VPSs. Of course you still need to consider backups but it&#8217;s just the same as backing up your home computer, just make sure you do it!</li>
<li>a dedicated server can be <strong>cheaper</strong> than many purchased virtual servers, if you use virtualization software such as Virtuozzo or VMWare. For example, by virtualizing your dedicated server, you can have one instance as the web server, another instance as the database server, another instance for cache.</li>
<li>You have <strong>100% control of your server</strong>. The web hosting provider cannot for instance offer CPU or RAM bursts to other users, so performance will be equal and guaranteed any time of the year.</li>
</ul>
<p>In my opinion the biggest advanced of dedicated vs VPS is that there are known ways to secure your data, whereas data tampering is a real issue in cloud computing.</p>
<p>Here are the main points you should look for when choosing the best web hosting providers for your dedicated or virtual server:</p>
<div>
<ol>
<li><strong>Assess if the company owns their data center</strong>, or if they are a reseller who are in fact hosting their server in another company. Look for a physical address, phone lines, network details. Of course, it’s better to do business with a company which runs its own data center. It’s not only about the price, but the guarantee that there will be personel who will physically fix servers when the need arises, know their own equipment and hardware inside out and have a quick turnaround</li>
<li><strong>Price</strong> of your desired configuration, and price of hardware parts and software, both the <strong>setup and monthly costs</strong></li>
<li>Path to <strong>scalability</strong>, such as availability of more powerful configurations</li>
<li><strong>Quality of network</strong>, which can be done with traceroutes, pings or by testing various websites hosted there</li>
<li><strong>Reliability and trustworthiness</strong>. See for instance how many years the company has been in business. For instance, a company which has been operating for more than 10 years means it is unlikely to disappear overnight. Also, a company which has a open blogs and forums is more trustworthy than another web hosting company which doesn’t offer a place for its users to collaborate and exchange.  A lack of a forum could also indicate the company doesn&#8217;t have many customers.</li>
<li><strong>Support</strong>. Assess if the company’s support is responsive, if there are customer complaints on the company’s forum.</li>
</ol>
</div>
<p>As stated in the shared hosting section, don’t forget that doing business with a web hosting company is above all a long-term relationship. Please don&#8217;t judge purely on the price, choose most of all a company you can trust.</p>
<p>If anyone is interested my site is hosted on a dedicated server by <a href="http://www.iweb.com" target="_blank">iWeb</a> in Canada after a disasterous experience with The Planet when their datacentre had their power transformer explode!  It&#8217;s running CentOS and sitting on a 100Mb/s port so network speed won&#8217;t be an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/01/30/choosing-a-hosting-provider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New design</title>
		<link>http://www.richardhyland.com/diary/2008/02/18/new-design/</link>
		<comments>http://www.richardhyland.com/diary/2008/02/18/new-design/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 15:01:32 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Computers & Internet]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/2008/02/18/new-design/</guid>
		<description><![CDATA[I&#8217;ve made the switch over to richardhyland.com and a brand new design to go with it.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made the switch over to richardhyland.com and a brand new design to go with it. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2008/02/18/new-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beth&#8217;s new site</title>
		<link>http://www.richardhyland.com/diary/2007/06/30/beths-new-site/</link>
		<comments>http://www.richardhyland.com/diary/2007/06/30/beths-new-site/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 22:30:40 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.richardhyland.me.uk/diary/?p=94</guid>
		<description><![CDATA[I&#8217;ve just finished coding Beth&#8217;s new site, go take a look www.bethjohn.com]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished coding Beth&#8217;s new site, go take a look <a href="http://www.bethjohn.com/">www.bethjohn.com</a></p>
<p><a href="http://www.richardhyland.me.uk/diary/wp-content/uploads/2007/07/bjsite.jpg" title="Beth’s Site"><img src="http://www.richardhyland.me.uk/diary/wp-content/uploads/2007/07/bjsite.thumbnail.jpg" alt="Beth’s Site" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2007/06/30/beths-new-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

