<?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>Scurvy Jake&#039;s Pirate Blog &#187; Code</title>
	<atom:link href="http://bogomip.net/blog/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://bogomip.net/blog</link>
	<description>Rated arrrr for Piracy</description>
	<lastBuildDate>Wed, 08 Feb 2012 18:43:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP, PDO, and MSSQL in Windows</title>
		<link>http://bogomip.net/blog/2009/11/04/php-pdo-and-mssql-in-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-pdo-and-mssql-in-windows</link>
		<comments>http://bogomip.net/blog/2009/11/04/php-pdo-and-mssql-in-windows/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 01:33:21 +0000</pubDate>
		<dc:creator>Scurvy Jake</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://bogomip.net/blog/?p=3954</guid>
		<description><![CDATA[If, like me, you've been using PHP's PDO via the MSSQL driver, be aware that newer versions of PHP do not support MSSQL natively. Microsoft has it's own PHP driver now, or you can use the FreeTDS MSSQL extension, but I strongly recommend just switching to use the provided ODBC and PDO_ODBC extensions and save [...]]]></description>
			<content:encoded><![CDATA[<p>If, like me, you've been using <a href="http://www.php.net/">PHP</a>'s PDO via the MSSQL driver, be aware that newer versions of PHP <strong>do not</strong> support MSSQL natively. Microsoft has it's <em>own</em> <a href="http://www.microsoft.com/sqlserver/2005/en/us/PHP-Driver.aspx">PHP driver</a> now, or you can use the <a href="http://www.freetds.org/">FreeTDS</a> MSSQL extension, but I strongly recommend just switching to use the provided ODBC and PDO_ODBC extensions and save yourself the trouble. If you're already using PDOs, then you just have to create the object a little differently. For example:</p>
<pre>
$sql = new PDO("odbc:Driver={SQL Native Client};Server=ip.add.re.ss;Database=dbname;Uid=user;Pwd=password");
</pre>
<p>That worked for me. Not sure what you can do about the old <strong>mssql_guid_string</strong> function if you need that, though. I have the FreeTDS lib installed as well and that lets me call it, until I figure out how to do the same thing in ODBC.</p>
<p>Yes, ASP fans, that's a <em>ONE LINE</em> connection to a database. That's all anyone should need!</p>
<img src="http://bogomip.net/blog/16cfc4b3/266bb3e9/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://bogomip.net/blog/2009/11/04/php-pdo-and-mssql-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making WordPress XHTML Strict Compliant</title>
		<link>http://bogomip.net/blog/2008/08/29/making-wordpress-xhtml-strict-compliant/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=making-wordpress-xhtml-strict-compliant</link>
		<comments>http://bogomip.net/blog/2008/08/29/making-wordpress-xhtml-strict-compliant/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 20:46:18 +0000</pubDate>
		<dc:creator>Scurvy Jake</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://bogomip.net/blog/?p=2716</guid>
		<description><![CDATA[There are two obstacles in making WordPress, even the most current version, XHTML Strict compliant. Today I discovered the second one, when you use the relatively new Gallery feature. To fix this problem, you need to eliminate an inserted style tag from the wp-includes/media.php file. The chunk looks like this (mine is found on line [...]]]></description>
			<content:encoded><![CDATA[<p>There are two obstacles in making WordPress, even the <em>most current version</em>, XHTML Strict compliant. Today I discovered the second one, when you use the relatively new <strong>Gallery</strong> feature.</p>
<p>To fix this problem, you need to eliminate an inserted style tag from the <code>wp-includes/media.php</code> file. The chunk looks like this (mine is found on line <strong>426</strong>):</p>
<pre>
&lt;style type='text/css'&gt;
	.gallery {
		margin: auto;
	}
	.gallery-item {
		float: left;
		margin-top: 10px;
		text-align: center;
		width: {$itemwidth}%;			}
	.gallery img {
		border: 2px solid #cfcfcf;
	}
	.gallery-caption {
		margin-left: 0;
	}
&lt;/style&gt;
</pre>
<p>Copy this to your theme's <code>style.css</code> stylesheet, replacing the call to <code>$itemwidth</code> with <code>width: auto;</code>. Delete the offending code from <code>media.php</code>.</p>
<p>Every time you upgrade, you'll have to repeat this process. That is, until the <a href="http://www.wordpress.org/">WordPress</a> developers make their code XHTML Strict compliant, which may never happen.</p>
<p>The second obstacle to a nice, XHTML Strict weblog is the link code. Get a copy of my <a href="http://bogomip.net/blog/wordpress-widgets/">strict_links.txt</a> widget, rename it, and add it to your widgets directory. Use it instead of the normal links widget.</p>
<img src="http://bogomip.net/blog/16cfc4b3/266bb3e9/CCBot/1.0 (+http://www.commoncrawl.org/bot.html).gif" />]]></content:encoded>
			<wfw:commentRss>http://bogomip.net/blog/2008/08/29/making-wordpress-xhtml-strict-compliant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

