<?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>Lance Williams &#187; Techy</title>
	<atom:link href="http://lancewilliams.us/tag/techy/feed/" rel="self" type="application/rss+xml" />
	<link>http://lancewilliams.us</link>
	<description>my blog</description>
	<lastBuildDate>Fri, 17 Jul 2009 21:21:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>How to move a site from one server to another using cPanel and WHM</title>
		<link>http://lancewilliams.us/techy/how-to-move-a-site-from-one-server-to-another-using-cpanel-and-whm/</link>
		<comments>http://lancewilliams.us/techy/how-to-move-a-site-from-one-server-to-another-using-cpanel-and-whm/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 02:39:20 +0000</pubDate>
		<dc:creator>imaginos</dc:creator>
				<category><![CDATA[Techy]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://i.maginos.com/?p=24</guid>
		<description><![CDATA[First thing you have to do is create the backup/restore file in cPanel on your old server.  This is very simple. You just need to log in to your cPanel, click on Backups and click on Generate/Download a Full Backup. You can choose a backup destination, for the purpose of this example, I&#8217;m just going [...]]]></description>
			<content:encoded><![CDATA[<p>First thing you have to do is create the backup/restore file in cPanel on your old server.  This is very simple.</p>
<p>You just need to log in to your cPanel, click on Backups and click on Generate/Download a Full Backup.  You can choose a backup destination, for the purpose of this example, I&#8217;m just going to leave the default and save it to the Home Directory.  You can save it to a remote FTP if you want, but that sometimes creates difficulties and I find it easiest to do everything as its own separate step.  You fill out the email field with your email address as it&#8217;ll send you an email once it&#8217;s done (depending on the size of the site, it can take a long time).  Then just hit Generate Backup.</p>
<p>Once you get the email letting you know it&#8217;s done, log in to that site in FTP and download the backup file (backup-12.30.2008_13-27-10_somesite.tar).</p>
<p>Now move to the new server where you will be hosting the site.</p>
<p>Note: don&#8217;t create an account for the site on the new server, the restore process will do that for you and if there&#8217;s an existing account with the same user name, it won&#8217;t work.</p>
<p>First you have to upload the cPanel move/restore .tar (backup-12.30.2008_13-27-10_somesite.tar) to the server, any existing site is fine.</p>
<p>Then you log in through SSH (this is how I do it, you may have another way) and move the file to the /home directory of the whole server.</p>
<p>After that, you log into WHM on that server.  Under Backup is Restore a Full Backup/cpmove file.  Click on that.  You should see the move/restore .tar listed in the box on the bottom.  It usually has the user name in the name of the .tar (in this case, somesite).  You put that user name in the Enter the username for the account you wish to restore: field and hit Restore.</p>
<p>It&#8217;ll process the file, create the account and get everything set up as it was on the old server.</p>
]]></content:encoded>
			<wfw:commentRss>http://lancewilliams.us/techy/how-to-move-a-site-from-one-server-to-another-using-cpanel-and-whm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple should buy Yahoo</title>
		<link>http://lancewilliams.us/techy/apple-should-buy-yahoo/</link>
		<comments>http://lancewilliams.us/techy/apple-should-buy-yahoo/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 22:17:03 +0000</pubDate>
		<dc:creator>imaginos</dc:creator>
				<category><![CDATA[Techy]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://i.maginos.com/?p=17</guid>
		<description><![CDATA[Well, the title pretty much says it all. With all this talk of Yahoo going down in flames and Microsoft wanting to buy it and Google wanting to share their ads, something needs to be done with this site. And Steve Jobs is the man to do it. Imagine what Apple could do with an [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the title pretty much says it all. With all this talk of Yahoo going down in flames and Microsoft wanting to buy it and Google wanting to share their ads, something needs to be done with this site. And Steve Jobs is the man to do it. Imagine what Apple could do with an established site like that and a big jump forward in the search engine game by grabbing all their technology, users and algorithm (which needs work). </p>
]]></content:encoded>
			<wfw:commentRss>http://lancewilliams.us/techy/apple-should-buy-yahoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a variable for your MySQL database</title>
		<link>http://lancewilliams.us/techy/using-a-variable-for-your-mysql-database/</link>
		<comments>http://lancewilliams.us/techy/using-a-variable-for-your-mysql-database/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 00:18:39 +0000</pubDate>
		<dc:creator>imaginos</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Techy]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://i.maginos.com/?p=13</guid>
		<description><![CDATA[So, I&#8217;m working on a site making a bunch of changes.  I need to change the name of a database and well, to make a long story short, it&#8217;s called by name throughout all the files.  So I thought I&#8217;d do a quick post on how to use a variable name in place of the [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m working on a site making a bunch of changes.  I need to change the name of a database and well, to make a long story short, it&#8217;s called by name throughout all the files.  So I thought I&#8217;d do a quick post on how to use a variable name in place of the MySQL database name.  I had to figure it out myself, and had a hard time finding anywhere how to do it, although it&#8217;s not that difficult.</p>
<p>First off, you should have a config file that&#8217;s being called from every page in your site.  This way you can define some variables that you&#8217;ll be able to access throughout your site.  This is pretty common and is in fact the case on the site I&#8217;m working on.</p>
<p>Your config file should look something like this:</p>
<p><code>&lt;?php</p>
<p>$dbhost = 'localhost';<br />
$dbuser = 'mrcool';<br />
$dbpass = 'coolpassword';<br />
$dbname = 'database_name';</p>
<p>$dbh = mysql_connect($dbhost,$dbuser,$dbpass)<br />
or die (mysql_error());</p>
<p>$setts['sitename'] = "My Super Cool Site";<br />
$setts['siteurl'] = "http://www.mysupercoolsite.com/";<br />
$setts['email'] = "me@mysupercoolsite.com";<br />
$setts['default_theme'] = "CoolTheme";<br />
$setts['db_name'] = $dbname;</p>
<p>?&gt;</code></p>
<p>This covers the basics and allows you to do a lot of cool things with your site.  Anywhere you need to put the base url, you can just use $setts['siteurl'] instead and it makes your whole site portable.  And, as the point of this post, you can use $setts['db_name'] in place of the actual name anywhere you need to.  You can even go one more and name all your tables as variables here, so they can be changed in one spot and affect the whole site.</p>
<p>Ok, last part here.  How to use the variable in place of the name:</p>
<p>Take:</p>
<p>$query = mysql_query(&#8220;INSERT INTO database_name.tblName (first, second, third) VALUES<br />
(&#8216;First Value&#8217;,'Second Value&#8217;,'Third Value&#8217;)&#8221;) or die(mysql_error());</p>
<p>And instead use:</p>
<p>$query = mysql_query(&#8220;INSERT INTO &#8221; . $setts['db_name'] . &#8220;.tblName (first, second, third) VALUES<br />
(&#8216;First Value&#8217;,'Second Value&#8217;,'Third Value&#8217;)&#8221;) or die(mysql_error());</p>
<p>It&#8217;s just simple concatenation.  You have to close the quotes with &#8221; then use the . as the connector, put in your variable name and then another . to add the rest which needs to have the quotes started again.</p>
<p>Hope that helps someone <img src='http://lancewilliams.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lancewilliams.us/techy/using-a-variable-for-your-mysql-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gina&#8217;s Site</title>
		<link>http://lancewilliams.us/general/ginas-site/</link>
		<comments>http://lancewilliams.us/general/ginas-site/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 21:38:33 +0000</pubDate>
		<dc:creator>imaginos</dc:creator>
				<category><![CDATA[General Stuff]]></category>
		<category><![CDATA[gina]]></category>
		<category><![CDATA[my sites]]></category>
		<category><![CDATA[Techy]]></category>

		<guid isPermaLink="false">http://i.maginos.com/?p=10</guid>
		<description><![CDATA[So, I&#8217;ve set up a website for Gina so she can get some more clients through online advertising and SEO.  It&#8217;s at www.hairdesignbygina.com.  It&#8217;s pretty cool because it gives me a chance to play with a lot of the stuff I&#8217;ve learned programmatically over the years.  I&#8217;ve built the site on a php template that [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve set up a website for Gina so she can get some more clients through online advertising and SEO.  It&#8217;s at <a href="http://www.hairdesignbygina.com">www.hairdesignbygina.com</a>.  It&#8217;s pretty cool because it gives me a chance to play with a lot of the stuff I&#8217;ve learned programmatically over the years.  I&#8217;ve built the site on a php template that I&#8217;ve designed (there&#8217;s not much to it, but I&#8217;m still pretty happy with myself).  I also get to put to use what I&#8217;ve learned about CSS and do some really cool design stuff with it.  It&#8217;s still in it&#8217;s infancy, but I&#8217;m pretty happy with what I&#8217;ve done so far.</p>
<p>I&#8217;m also getting to play around with Flash and JavaScript a bit too.  I&#8217;ve put up a Flash gallery page that converts all the pictures so they look like polaroids thrown onto a table.  It&#8217;s pretty cool.  I&#8217;ve just got some dummy pictures in there now, but once we get some pics of her clients, we&#8217;ll put them in.  It&#8217;s got a bug in IE though where it only works the first time you visit.  If you refresh the page, or go to another page and come back, it doesn&#8217;t work.  Kinda pissing me off on that one.  I&#8217;d like to be able to make some changes to it though and I&#8217;m working on some ways to do that (of course I need to learn a bit more about Flash first).  I&#8217;ve also got a pretty cool flash gallery where I can show before and afters in a book-like format where you can actually flip pages.  It&#8217;s really cool, but that&#8217;s not live yet.</p>
<p>I also just today found a pretty cool mootools FAQ script, so I got to play with that a bit too.</p>
<p>I really like having this site to learn and play with, which will also (hopefully) be something we can turn profitable by driving business to Gina.</p>
]]></content:encoded>
			<wfw:commentRss>http://lancewilliams.us/general/ginas-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sent from my iPhone</title>
		<link>http://lancewilliams.us/techy/sent-from-my-iphone/</link>
		<comments>http://lancewilliams.us/techy/sent-from-my-iphone/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 22:51:53 +0000</pubDate>
		<dc:creator>imaginos</dc:creator>
				<category><![CDATA[Techy]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://i.maginos.com/techy/sent-from-my-iphone/</guid>
		<description><![CDATA[So WordPress has an iPhone app that let&#8217;s you manage your blog from your phone. Pretty damn cool, huh? So I&#8217;m writing this post from my phone chillin out far away from home Can&#8217;t wait to see what else I can do.]]></description>
			<content:encoded><![CDATA[<p>So WordPress has an iPhone app that let&#8217;s you manage your blog from your phone. Pretty damn cool, huh? So I&#8217;m writing this post from my phone chillin out far away from home <img src='http://lancewilliams.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Can&#8217;t wait to see what else I can do. </p>
]]></content:encoded>
			<wfw:commentRss>http://lancewilliams.us/techy/sent-from-my-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

