<?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>david schultz dot org &#187; coding</title>
	<atom:link href="http://www.davidschultz.org/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidschultz.org</link>
	<description>(dot com was taken)</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:23:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to install Google Affiliate pixel tracking code in Magento</title>
		<link>http://www.davidschultz.org/2009/11/12/how-to-install-google-affiliate-pixel-tracking-code-in-magento/</link>
		<comments>http://www.davidschultz.org/2009/11/12/how-to-install-google-affiliate-pixel-tracking-code-in-magento/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 01:55:01 +0000</pubDate>
		<dc:creator>David Schultz</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.davidschultz.org/?p=317</guid>
		<description><![CDATA[Took me a day of scouring the web to figure out how to get this to work. After adding this code do a test order and view source and confirm it worked. #copy and paste to the bottom of #app/design/frontend/default/theme_name/template/checkout/success.phtml $companyID = "K123456"; #provided by Google $category = urlencode("Your product category"); $lastorderid = Mage::getSingleton('checkout/session')->getLastOrderId(); $_order [...]

<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/03/28/google-improves-streetmaps-2/" rel="bookmark">Google improves streetmaps</a><!-- (4.60055)--></li>
		<li><a href="http://www.davidschultz.org/2009/10/16/the-best-marketing-is-none-at-all/" rel="bookmark">The best marketing is none at all</a><!-- (3.80556)--></li>
		<li><a href="http://www.davidschultz.org/2008/03/14/in-a-crowded-market-clarity-doesnt-sell/" rel="bookmark">In a crowded market clarity doesn&#8217;t sell</a><!-- (3.71909)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Took me a day of scouring the web to figure out how to get this to work.  After adding this code do a test order and view source and confirm it worked.</p>
<pre name="code" class="php">
#copy and paste to the bottom of
#app/design/frontend/default/theme_name/template/checkout/success.phtml
$companyID = "K123456"; #provided by Google
$category = urlencode("Your product category");
$lastorderid = Mage::getSingleton('checkout/session')->getLastOrderId();
$_order = Mage::getModel('sales/order')->load($lastorderid);
$orderID = $this->getOrderId(); #get the order ID
$aProduct = array();
$totalAmt = 0;
$prdsku = "";
$prdnm = "";
$prdqn = "";
$prdpr = "";
$prcatid = "";

###########store order data in array of objects###########
foreach ($_order->getAllItems() as $item) {
	$oProduct = new stdClass();
	$oProduct->sku = $item->getSku(); #sku
	$oProduct->price = $item->getPrice(); #price
	$totalAmt = $totalAmt + ($oProduct->price * $item->getQtyOrdered()); #total amt (excl.tax/shipping)
	$oProduct->qty = $item->getQtyOrdered(); #quantity
	$oProduct->name = $item->getName(); #product name
	$oProduct->category = $category;
	array_push($aProduct, $oProduct);
	$oProduct = NULL; #nuke it
}
###########build query string variables###########
for ($i=0; $i < count($aProduct); $i++) {
	if ($i == count($aProduct)-1) {
		$prdsku .= urlencode($aProduct[$i]->sku);
		$prdnm .= urlencode($aProduct[$i]->name);
		$prdqn .= urlencode($aProduct[$i]->qty);
		$prdpr .= urlencode($aProduct[$i]->price);
		$prcatid .= urlencode($aProduct[$i]->category);
	} else {
		$prdsku .= urlencode($aProduct[$i]->sku) . "^";
		$prdnm .= urlencode($aProduct[$i]->name) . "^";
		$prdqn .= urlencode($aProduct[$i]->qty) . "^";
		$prdpr .= urlencode($aProduct[$i]->price) . "^";
		$prcatid .= urlencode($aProduct[$i]->category) ."^";
	}
}
?>

<img src="https://clickserve.cc-dt.com/link/order?vid=<?=$companyID?>&#038;oid=<?=$orderID?>&#038;amt=<?=urlencode($totalAmt)?>&#038;prdsku=<?=$prdsku?>&#038;prdnm=<?=$prdnm?>&#038;prdqn=<?=$prdqn?>&#038;prdpr=<?=$prdpr?>&#038;prcatid=<?=$prcatid?>" width=1 height=1>
</pre>


<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/03/28/google-improves-streetmaps-2/" rel="bookmark">Google improves streetmaps</a><!-- (4.60055)--></li>
		<li><a href="http://www.davidschultz.org/2009/10/16/the-best-marketing-is-none-at-all/" rel="bookmark">The best marketing is none at all</a><!-- (3.80556)--></li>
		<li><a href="http://www.davidschultz.org/2008/03/14/in-a-crowded-market-clarity-doesnt-sell/" rel="bookmark">In a crowded market clarity doesn&#8217;t sell</a><!-- (3.71909)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.davidschultz.org/2009/11/12/how-to-install-google-affiliate-pixel-tracking-code-in-magento/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My letter to Go Transit</title>
		<link>http://www.davidschultz.org/2009/02/05/my-letter-to-go-transit/</link>
		<comments>http://www.davidschultz.org/2009/02/05/my-letter-to-go-transit/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 20:59:25 +0000</pubDate>
		<dc:creator>David Schultz</dc:creator>
				<category><![CDATA[annoying]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[recommendations]]></category>
		<category><![CDATA[GO Transit]]></category>

		<guid isPermaLink="false">http://www.davidschultz.org/?p=182</guid>
		<description><![CDATA[For those not from the Toronto area, GO transit provides commuter train &#038; bus services from the burbs to union station (downtown hub). Now, GO is waaaaaay behind technologically speaking, and is plagued by constant delays &#038; technical difficulties. As a web developer, i was excited when i learned today that BART in San Francisco [...]

<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2010/07/19/recipe-for-anger-track-27-at-union-station/" rel="bookmark">Recipe for anger: Track 27 at Union Station</a><!-- (5.94692)--></li>
		<li><a href="http://www.davidschultz.org/2009/02/04/some-tips-on-using-social-media-for-bands/" rel="bookmark">Some tips on using social media for bands</a><!-- (5.0489)--></li>
		<li><a href="http://www.davidschultz.org/2008/11/18/how-to-use-evernote-to-monitor-your-seo-efforts/" rel="bookmark">How to use Evernote to monitor your SEO efforts</a><!-- (4.54793)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3320/3255819375_10cc35be7d_m.jpg" alt="" align="left"/>For those not from the Toronto area, GO transit provides commuter train &#038; bus services from the burbs to union station (downtown hub).  Now, GO is waaaaaay behind technologically speaking, and is plagued by constant delays &#038; technical difficulties.  As a web developer, i was excited when i learned today that BART in San Francisco is now exposing it&#8217;s data to the community.  It got me thinking, and a little bit angry though.  Why aren&#8217;t our transit companies offering the same things?  If they are i want to know when we can expect it.  </p>
<p>So&#8230; i sent them an email with a few recommendations:</p>
<blockquote><p>
1.  Create a  http://code.google.com/transit/spec/transit_feed_specification.html for the trains, which would get the detailed station &#038; scheduling information into Google Maps.</p>
<p>2.  For each train station, come up with a way to track the # of mins until the next train arrives and publish/maintain this information as XML for the developer community on the GO  website. </p>
<p>3. Publish/maintain the Go Transit train schedule as XML for the developer community.</p>
<p>4. Publish/maintain all service advisories in XML format for the developer community in realtime.</p>
</blockquote>
<p>I doubt i will get a response, but i will update if i do.</p>
<p><strong>February 17th, 2009:</strong>  Update &#8211; i received a response from Metrolinx (who i also sent my inquiry too).  Here is what they had to say:</p>
<blockquote><p>Note that you have sent your comments to Metrolinx.  We are a provincial agency created by the Government of Ontario in 2006 and are tasked with addressing the urgent need to improve and integrate transportation in the Greater Toronto and Hamilton Area (GTHA).  Our mission is to develop a state-of-the-art transportation system that moves people and goods efficiently, economically and in an environmentally sustainable way.  In doing so we are working closely with all of the transit authorities in the GTHA. However we are not involved in their day-to-day operations. </p>
<p>The GO Transit website is administered by GO Transit and as such I have passed your inquiry on to their Public Relations department publicrelations@gotransit.com.  If you wish you can send further comments on their website to this e-mail address.</p>
<p>Metrolinx continues to maintain a close relationship with GO Transit as reflected in &#8220;The Big Move&#8221;, our regional transportation plan for the GTHA. You can review and/or download &#8220;The Big Move&#8221; at: http://www.metrolinx.com/thebigmove/index.html .</p>
<p>Best Regards,<br />
Jacquie</p>
<p>Jacquie Menezes<br />
Senior Associate, Public Affairs and Media<br />
Metrolinx (Greater Toronto Transportation Authority)<br />
Jacquie.Menezes@metrolinx.com<br />
416.874.5923<br />
www.metrolinx.com
</p></blockquote>
<p>And the response from GO Transit directly:</p>
<blockquote><p>
Thanks for writing about the GO Transit Web site. I have forwarded your suggestions to our Web committee for review. In the meantime, thanks again for sending valuable feedback &#8212; we appreciate your ideas and links to other sites.</p>
<p>Allison Derin<br />
Webmaster<br />
GO Transit<br />
mailto:webmaster@gotransit.com</p></blockquote>
<p>Again, i will update as i receive updates.  Follow me on Twitter and i will send a Tweet as/if it happens.</p>


<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2010/07/19/recipe-for-anger-track-27-at-union-station/" rel="bookmark">Recipe for anger: Track 27 at Union Station</a><!-- (5.94692)--></li>
		<li><a href="http://www.davidschultz.org/2009/02/04/some-tips-on-using-social-media-for-bands/" rel="bookmark">Some tips on using social media for bands</a><!-- (5.0489)--></li>
		<li><a href="http://www.davidschultz.org/2008/11/18/how-to-use-evernote-to-monitor-your-seo-efforts/" rel="bookmark">How to use Evernote to monitor your SEO efforts</a><!-- (4.54793)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.davidschultz.org/2009/02/05/my-letter-to-go-transit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to setup a linux cronjob in 3 steps</title>
		<link>http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/</link>
		<comments>http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 14:01:05 +0000</pubDate>
		<dc:creator>David Schultz</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/</guid>
		<description><![CDATA[Since web apps are executed only after an HTTP request, you may have situations where scripts need to run in the background on a scheduled basis. On Linux, to do this you&#8217;ll need to get to know the crontab. The way it works is kind of like an airport. The service is always running, however [...]

<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/" rel="bookmark">How to setup a static route in OSX Leopard</a><!-- (8.11254)--></li>
		<li><a href="http://www.davidschultz.org/2008/01/14/emi-lays-off-2000-hmm-i-wonder-why/" rel="bookmark">EMI lays off 2,000 &#8211; hmm i wonder why</a><!-- (6.35239)--></li>
		<li><a href="http://www.davidschultz.org/2009/01/28/campbell-brown-interview-with-blago/" rel="bookmark">Campbell Brown interview with Blago</a><!-- (6.12207)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Since web apps are executed only after an HTTP request, you may have situations where scripts need to run in the background on a scheduled basis.  On Linux, to do this you&#8217;ll need to get to know the crontab.  The way it works is kind of like an airport.  The service is always running, however planes only depart at their scheduled times.  The crontab is kinda like that, a daemon that runs constantly in the background and checks once a minute to see if any jobs need to be executed.  </p>
<p>Let&#8217;s say you have a script located at <code>http://www.acme.com/myscript.php</code> that needs to run the first of every month at 9am.  Here&#8217;s how you&#8217;d set it up:</p>
<p>1.  Look for a file in your <code>/etc</code> folder called <code>crontab</code>.<br />
2.  You need to install a new crontab job, to do this type <code>crontab -e</code>.<br />
3.  Now the tricky part, the syntax:<br />
<img src="http://farm4.static.flickr.com/3230/2947143834_f1fda7947e.jpg?v=0" alt="" /><br />
and here&#8217;s how that translates in our example: </p>
<p><code>0 9 1 * * curl http://www.acme.com/myscript.php</code></p>
<p>Lets break it down.  0 is for the minute, 9 is the hour &#8211; so 9 hours &#038; 0 minutes which is 9am.  Day of the month, 1 &#8211; easy.  We want to do this for every month &#038; week, which is accomplished using the wildcard or * character.  Next comes what we want to execute.  It&#8217;s not enough to just type the URL of the script, you&#8217;ll need to use the CURL system function to make the HTTP request for you.  </p>
<p>Here is some more information on <a href="http://en.wikipedia.org/wiki/CURL">CURL</a> &#038; <a href="http://en.wikipedia.org/wiki/Cron">Cron jobs</a> for your reading pleasure, hope this tutorial helps!</p>


<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/" rel="bookmark">How to setup a static route in OSX Leopard</a><!-- (8.11254)--></li>
		<li><a href="http://www.davidschultz.org/2008/01/14/emi-lays-off-2000-hmm-i-wonder-why/" rel="bookmark">EMI lays off 2,000 &#8211; hmm i wonder why</a><!-- (6.35239)--></li>
		<li><a href="http://www.davidschultz.org/2009/01/28/campbell-brown-interview-with-blago/" rel="bookmark">Campbell Brown interview with Blago</a><!-- (6.12207)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sendmail says: stat=Deferred: Connection reset</title>
		<link>http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/</link>
		<comments>http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/#comments</comments>
		<pubDate>Mon, 05 May 2008 18:57:13 +0000</pubDate>
		<dc:creator>David Schultz</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/</guid>
		<description><![CDATA[I have been struggling with this problem for the last 2 days and finally figured out the solution. Your mileage may vary depending on your network configuration but first some background on mine. I have a Lighttpd web server that i am running some PHP mail scripts on. We are trying to use our company&#8217;s [...]

<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/" rel="bookmark">How to setup a static route in OSX Leopard</a><!-- (7.06439)--></li>
		<li><a href="http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/" rel="bookmark">How to setup a linux cronjob in 3 steps</a><!-- (6.26502)--></li>
		<li><a href="http://www.davidschultz.org/2008/03/31/phpmyadmin-error-cannot-start-session-without-errors/" rel="bookmark">Phpmyadmin error: &#8220;Cannot start session without errors&#8221;</a><!-- (5.73733)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>I have been struggling with this problem for the last 2 days and finally figured out the solution.  Your mileage may vary depending on your network configuration but first some background on mine.  I have a Lighttpd web server that i am running some PHP mail scripts on.  We are trying to use our company&#8217;s MTA to relay messages so i had this line in the <code>sendmail.cf</code> file, with 10.0.0.116 being the IP address of our MTA. </p>
<p><code>define(`SMART_HOST', `10.0.0.116')dnl</code></p>
<p>Still, things didn&#8217;t seem to want to work.  My network administrator wasn&#8217;t evening seeing the mail attempts on our mail server so the problem was definitely on the webserver.<br />
Turns out (as these things often are) that it was a dumb syntax problem.  The following change fixed everything:</p>
<p><code>define(`SMART_HOST', `[10.0.0.116]')dnl</code></p>
<p>Hope this helps if you are having a similar problem.</p>


<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/" rel="bookmark">How to setup a static route in OSX Leopard</a><!-- (7.06439)--></li>
		<li><a href="http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/" rel="bookmark">How to setup a linux cronjob in 3 steps</a><!-- (6.26502)--></li>
		<li><a href="http://www.davidschultz.org/2008/03/31/phpmyadmin-error-cannot-start-session-without-errors/" rel="bookmark">Phpmyadmin error: &#8220;Cannot start session without errors&#8221;</a><!-- (5.73733)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Phpmyadmin error: &#8220;Cannot start session without errors&#8221;</title>
		<link>http://www.davidschultz.org/2008/03/31/phpmyadmin-error-cannot-start-session-without-errors/</link>
		<comments>http://www.davidschultz.org/2008/03/31/phpmyadmin-error-cannot-start-session-without-errors/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 15:12:09 +0000</pubDate>
		<dc:creator>David Schultz</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.davidschultz.org/2008/03/31/phpmyadmin-error-cannot-start-session-without-errors/</guid>
		<description><![CDATA[I have been trying to get phpmyadmin working on my Fedora 8 server i&#8217;ve been setting up, and struggled for the past day or so on this error: Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Turns out it&#8217;s very easy [...]

<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/" rel="bookmark">Sendmail says: stat=Deferred: Connection reset</a><!-- (8.29688)--></li>
		<li><a href="http://www.davidschultz.org/2009/11/12/how-to-install-google-affiliate-pixel-tracking-code-in-magento/" rel="bookmark">How to install Google Affiliate pixel tracking code in Magento</a><!-- (4.39934)--></li>
		<li><a href="http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/" rel="bookmark">How to setup a static route in OSX Leopard</a><!-- (4.25633)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>I have been trying to get <a href="http://www.phpmyadmin.net/">phpmyadmin</a> working on my Fedora 8 server i&#8217;ve been setting up, and struggled for the past day or so on this error:</p>
<blockquote><p>Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.</p></blockquote>
<p>Turns out it&#8217;s very easy to fix.  First thing you&#8217;ll want to do is have a look at your error logs.  For me this was in /var/log/lighttpd/error.log (<a href="http://www.lighttpd.net/">i&#8217;m using lighttpd</a> instead of Apache).  Have a look at your error log and you will probably see errors referencing permission errors writing to your session directory.  </p>
<p>Simply chmod 777 that directory and you should be good to go.  </p>


<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/" rel="bookmark">Sendmail says: stat=Deferred: Connection reset</a><!-- (8.29688)--></li>
		<li><a href="http://www.davidschultz.org/2009/11/12/how-to-install-google-affiliate-pixel-tracking-code-in-magento/" rel="bookmark">How to install Google Affiliate pixel tracking code in Magento</a><!-- (4.39934)--></li>
		<li><a href="http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/" rel="bookmark">How to setup a static route in OSX Leopard</a><!-- (4.25633)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.davidschultz.org/2008/03/31/phpmyadmin-error-cannot-start-session-without-errors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to setup a static route in OSX Leopard</title>
		<link>http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/</link>
		<comments>http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 16:38:04 +0000</pubDate>
		<dc:creator>David Schultz</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/</guid>
		<description><![CDATA[I am in a situation at my office where i need a few static routes to reach external webservers. I had this working in 10.4 thanks to the tip over @ Macosxhints however after upgrading to Leopard my routes didn&#8217;t seem to get added to my routing table. I called Apple support this morning and [...]

<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/" rel="bookmark">How to setup a linux cronjob in 3 steps</a><!-- (7.98525)--></li>
		<li><a href="http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/" rel="bookmark">Sendmail says: stat=Deferred: Connection reset</a><!-- (7.00139)--></li>
		<li><a href="http://www.davidschultz.org/2008/04/11/pick-of-the-week-tripitcom/" rel="bookmark">Pick of the week: tripit.com</a><!-- (6.22842)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>I am in a situation at my office where i need a few static routes to reach external webservers.  I had this working in 10.4 thanks to the <a href="http://www.macosxhints.com/article.php?story=20060329085850170">tip over @ Macosxhints</a> however after upgrading to Leopard my routes didn&#8217;t seem to get added to my routing table.  I called Apple support this morning and they had no idea and actually said they don&#8217;t support this sort of thing either.  Google searches came up dry however i figured out via a few terminal commands you can get it working manually.  Here&#8217;s how.  Pop open Terminal, and type:<br />
<code><br />
su<br />
</code><br />
You&#8217;ll then need to enter your root password.  Strangely this didn&#8217;t work for me at first.  If you have this problem too, open up Directory Utility (apps/utilities) and then click on &#8216;edit&#8217; and &#8216;enable root user&#8217;.<br />
Once you have root access, you can create your static routes, here is the command:<br />
<code><br />
route add –net 192.168.5.0 10.0.1.5<br />
</code><br />
192.168.5.0 is the network i&#8217;m trying to reach, via the gateway 10.0.1.5.  </p>
<p><strong>Update:</strong>  Recently this stopped working for me, not sure if it was an OSX update or something with our internal network.  In any case, this solved the problem for me:<br />
<code><br />
sudo route add -net 192.168.5.0/24 10.0.1.5<br />
</code></p>


<h3>Related Posts:</h3>
<ol>
		<li><a href="http://www.davidschultz.org/2008/10/16/how-to-setup-a-linux-cronjob-in-3-steps/" rel="bookmark">How to setup a linux cronjob in 3 steps</a><!-- (7.98525)--></li>
		<li><a href="http://www.davidschultz.org/2008/05/05/sendmail-says-statdeferred-connection-reset/" rel="bookmark">Sendmail says: stat=Deferred: Connection reset</a><!-- (7.00139)--></li>
		<li><a href="http://www.davidschultz.org/2008/04/11/pick-of-the-week-tripitcom/" rel="bookmark">Pick of the week: tripit.com</a><!-- (6.22842)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.davidschultz.org/2008/03/04/how-to-setup-a-static-route-in-osx-leopard/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.950 seconds -->
