<?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>Life of a Programmer &#187; SweetCron</title>
	<atom:link href="http://jeremysimkins.com/category/sweetcron/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeremysimkins.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 19 Feb 2010 22:45:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Use one SweetCron install for multiple domains</title>
		<link>http://jeremysimkins.com/sweetcron/use-one-sweetcron-install-for-multiple-domains/</link>
		<comments>http://jeremysimkins.com/sweetcron/use-one-sweetcron-install-for-multiple-domains/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 05:58:50 +0000</pubDate>
		<dc:creator>SoN9ne</dc:creator>
				<category><![CDATA[SweetCron]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[son9ne]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://jeremysimkins.com/wordpress/?p=3</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Well,</p>
<p>After playing with sweetcron for a bit I wanted to have 4 sites use it but I didn&#8217;t want to have to update each site everytime I need to update sweetcron. I found a little tweak you can do to get sweetcron working on multple domains with one install.<br />
<span id="more-4"></span><br />
First, create the folder and put the files in there from the sweetcron download.</p>
<p>Next, point a domain to that folder ( i am assuming you already know how to create domains and already know how to point your domains to a folder on your server)</p>
<p>Next, point the second domain to that same folder. (at this point you will notice both domains are identical and use the same sweetcron.)</p>
<p>Now we are ready to get each site using its own sweetcron.</p>
<p>First, open <em>/system/applications/config/config.php<br />
</em>you will want to change<br />
&#8220;<em>$config['base_url']    = &#8220;http://www.your-site.com/&#8221;;&#8221;<br />
to<br />
&#8220;$url = $_SERVER['SERVER_NAME'];<br />
$config['base_url']    = &#8216;http://&#8217;.$url.&#8217;/';&#8221;</em></p>
<div id="attachment_4" class="wp-caption aligncenter" style="width: 310px"><a href="http://jeremysimkins.com/wp-content/uploads/2008/08/picture-2.png" rel="lightbox[4]"><img class="size-medium wp-image-4" title="config.php" src="http://jeremysimkins.com/wp-content/uploads/2008/08/picture-2-300x108.png" alt="config.php screenshot" width="300" height="108" /></a><p class="wp-caption-text">config.php </p></div>
<p>This will keep the scope correct for which domain you com in from.</p>
<p>Second, open <em>/system/applications/config/database.php<br />
</em>now since we are using multiple domains we will want to create a switch so we can pull the correct data for each domain. I could not get the database prefix to work for me on this setup and I didn&#8217;t bother to look into it since I just used different databases for each site. So I created a switch off of the given domain and set the appropriate database to use.</p>
<div id="attachment_5" class="wp-caption aligncenter" style="width: 273px"><a href="http://jeremysimkins.com/wp-content/uploads/2008/08/picture-3.png" rel="lightbox[4]"><img class="size-medium wp-image-5" title="database.php" src="http://jeremysimkins.com/wp-content/uploads/2008/08/picture-3-263x300.png" alt="database.php screenshot" width="263" height="300" /></a><p class="wp-caption-text">database.php </p></div>
<p>Now you are able to have multiple sites point to one install of sweetcron.</p>
<p><em><strong>** NOTE **</strong></em><br />
I had one issue with install on this. I could not get the database prefix to work correctly with sweetcron. I&#8217;m not sure why but i didn&#8217;t spend anytime looking into it either. It was just as easy for me to use different databases for each domain.  In theory you could do the same switch on the database prefix instead of the database name.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeremysimkins.com/sweetcron/use-one-sweetcron-install-for-multiple-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
