<?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>Chris&#039;s Blog of Crazy Goodness! &#187; Coding</title>
	<atom:link href="http://chrisbjax.com/category/tech/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisbjax.com</link>
	<description>My homepage on the web!</description>
	<lastBuildDate>Thu, 10 Mar 2011 01:22:00 +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>Been Absent for the last month..</title>
		<link>http://chrisbjax.com/2010/03/14/been-absent-for-the-last-month/</link>
		<comments>http://chrisbjax.com/2010/03/14/been-absent-for-the-last-month/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 16:07:06 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[gamers]]></category>
		<category><![CDATA[military]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[usmilitarygamers]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://chrisbjax.com/?p=512</guid>
		<description><![CDATA[So, I haven&#8217;t posted in awhile because I took on a side-project over at http://usmilitarygamers.com. I really like the end result, and I hope the team over there do too. I hope to circle back around and be a little &#8230; <a href="http://chrisbjax.com/2010/03/14/been-absent-for-the-last-month/">Read More <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, I haven&#8217;t posted in awhile because I took on a side-project over at <a title="US Military Gamers" href="http://usmilitarygamers.com" target="_blank">http://usmilitarygamers.com</a>. I really like the end result, and I hope the team over there do too. I hope to circle back around and be a little more productive now that I have completed the coding of the <a title="US Military Gamers" href="http://usmilitarygamers.com" target="_blank">usmilitarygamers.com</a> website.</p>
<p>I built the site simply using phpbb, some extra standalone code to draw stats on several games, and some gaming pictures for use on the headers. Some of the great artist over at the <a title="US Military Gamers" href="http://usmilitarygamers.com" target="_blank">usmg</a>, provided an exceptional mascot (shown right on the homepage), titles, and several other pieces of artwork. (Thanks Timmy, DBG, and Maximus!, you guys are awesome!)</p>
<p>If you haven&#8217;t had a chance to take a look, head on over, and take a peak.</p>
<p><a title="US Military Gamers" href="http://usmilitarygamers.com" target="_blank">http://usmilitarygamers.com</a></p>
<p>I&#8217;d love to know what you think, if you have any suggestions, drop a comment here!<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbjax.com/2010/03/14/been-absent-for-the-last-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable .htaccess authentication using Apache?</title>
		<link>http://chrisbjax.com/2008/12/04/enable-htaccess-authentication-using-apache/</link>
		<comments>http://chrisbjax.com/2008/12/04/enable-htaccess-authentication-using-apache/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 14:46:37 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[authentication]]></category>

		<guid isPermaLink="false">http://blog.chrisbjax.com/?p=32</guid>
		<description><![CDATA[Enabling password authentication on Windows using Apache (link if you wish to RTFM) isn&#8217;t too much of a chore if you have basic knowledge of some simple coding and apache configuration. A couple things to jot down: Path to your &#8230; <a href="http://chrisbjax.com/2008/12/04/enable-htaccess-authentication-using-apache/">Read More <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Enabling password authentication on Windows using <a href="http://httpd.apache.org/" target="_blank">Apache</a> (link if you wish to <a href="http://httpd.apache.org/docs/howto/auth.html" target="_blank">RTFM</a>) isn&#8217;t too much of a chore if you have basic knowledge of some simple coding and apache configuration.</p>
<p><strong>A couple things to jot down: </strong></p>
<ol>
<li>Path to your Apache server (e.g., c:\apache)</li>
<li>Path to your CONF folder (e.g., c:\apache\conf)</li>
<li>Path to your DOCROOT folder (e.g., c:\apache\htdocs)</li>
<li>Path to the folder you wish to password-protect. In myexample, lets take a<br />
folder called “secure”, so the path to this</p>
<p>would be<br />
“c:\apache\htdocs\secure”. (It could be ABOVE the htdocs</p>
<p>folder as<br />
well, FYI).</li>
</ol>
<p><strong>Ok, what to do:</strong></p>
<ol>
<li>Open up your httpd.conf. (On my machine this is at<br />
“c:\apache\conf\httpd.conf”).</li>
<li>Look for the word AllowOverride, and change it from <strong>None </strong>to <strong>All</strong>.</li>
<p><img src="images/Image/apache/allowoverride.gif" alt="" width="574" height="218" /></p>
<li>Our httpd.conf is done. Now we need to create the password<br />
file. Open up a DOS prompt and go to the apache’s BIN directory. In<br />
my case, it is “c:\apache\bin”.</li>
<p><img src="images/Image/apache/dospw.gif" alt="" width="839" height="904" /></p>
<li>Now, we need to create the .HTACCESS file itself.</li>
<p><img src="images/Image/apache/htaccess.gif" alt="" width="429" height="232" /></p>
<li><strong>Restart Apache</strong> &#8211; This is what happens when accessing your secret area!</li>
<p><img src="images/Image/apache/secretarealogin.gif" alt="" width="326" height="282" /></ol>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbjax.com/2008/12/04/enable-htaccess-authentication-using-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up mod_auth_sspi &amp; adldap</title>
		<link>http://chrisbjax.com/2008/09/26/setting-up-mod_auth_sspi-adldap/</link>
		<comments>http://chrisbjax.com/2008/09/26/setting-up-mod_auth_sspi-adldap/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 17:39:24 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[adldap]]></category>
		<category><![CDATA[mod_auth_sspi]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.chrisbjax.com/?p=29</guid>
		<description><![CDATA[Outlines setting up mod_auth_sspi &#038; adldap to provide seamless authentication to Active Directory. <a href="http://chrisbjax.com/2008/09/26/setting-up-mod_auth_sspi-adldap/">Read More <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WOW, that&#8217;s a mouthful!</p>
<p>Well, luckily, I just managed to get this working myself! Hurray for me!</p>
<p><strong>WHAT THIS DOES???</strong></p>
<p>This script will use the SSPI module to grab your local login<br />
DOMAIN\ID, break the domain name off the front of your ID, then<br />
utilizing adldap, query AD for your user ID, which is displayed<br />
lastname,firstname, then break that apart, and echo first name last<br />
name.</p>
<p>You can easily copy this on your intranet pages. (Which is what I use it for,)</p>
<p><strong>ASSUMPTIONS</strong></p>
<ul>
<li> Windows 2003 STD server</li>
<li> PHP, MYSQL, APACHE (Typically referred to as a WAMP installation) installed and running correctly.</li>
<li>You have a working knowledge of PHP, and apache, and how to edit, modify files.</li>
</ul>
<p><strong>SETUP</strong></p>
<p>Download the current release of <a href="http://adldap.sourceforge.net/download.php">ADLDAP from their website </a>(At the time of this writing, the current version was v2.1)</p>
<p>Edit the file to point to your LDAP server. (See example below)</p>
<table style="background-color: #ccffff; height: 238px;" border="1" width="477">
<tbody>
<tr>
<td><span style="color: #339966;">class </span>adLDAP {</p>
<p><span style="color: #ff6600;">// BEFORE YOU ASK A QUESTION, PLEASE READ THE DOCUMENTATION AND THE FAQ</span></p>
<p>// http://adldap.sourceforge.net/documentation.php</p>
<p>// http://adldap.sourceforge.net/faq.php</p>
<p><span style="color: #ff6600;"> // You can set your default variables here, or when you invoke the class</span></p>
<p><span style="color: #339966;">var</span> $_account_suffix=<span style="color: #ff0000;">&#8220;@yourdomin.com&#8221;</span>;</p>
<p><span style="color: #339966;">var</span> $_base_dn = <span style="color: #ff0000;">&#8220;DC=yourdomain,DC=com&#8221;</span>;</p>
<p><span style="color: #ff6600;">// An array of domain controllers. Specify multiple controllers if you</span></p>
<p>// would like the class to balance the LDAP queries amongst multiple servers</p>
<p><span style="color: #339966;">var</span> $_domain_controllers = <span style="color: #0000ff;">array</span> (<span style="color: #ff0000;">&#8220;yourdomaincontroller.yourdomin.com&#8221;</span>);</p>
<p><span style="color: #ff6600;">// optional account with higher privileges for searching</span></p>
<p>// not really that optional because you can&#8217;t query much as a user</p>
<p><span style="color: #339966;">var</span> $_ad_username=<span style="color: #ff0000;">&#8220;account_to_query_AD&#8221;</span>;</p>
<p><span style="color: #339966;">var</span> $_ad_password=<span style="color: #ff0000;">&#8220;password_for_Account&#8221;</span>;</td>
</tr>
</tbody>
</table>
<p>Copy the adldap.php file to your website. (I installed into /includes folder.)</p>
<p>ok, we&#8217;re done..</p>
<p>Just kidding, but not too much more!<br />
<img title="Wink" src="admin/editor/plugins/emotions/images/smiley-wink.gif" border="0" alt="Wink" /></p>
<p>Next, Download <a href="http://sourceforge.net/projects/mod-auth-sspi">mod-auth-sspi from sourceforge.net</a> .</p>
<p>Copy the files <strong>mod_auth_sspi.so</strong> and <strong>sspipkgs.exe</strong> to your apache modules folder.</p>
<p>Add the module to the server&#8217;s config file by editing httpd.con.</p>
<table style="background-color: #ccffff; height: 34px;" border="1" width="570">
<tbody>
<tr>
<td>LoadModule sspi_auth_module modules/mod_auth_sspi.so</td>
</tr>
</tbody>
</table>
<p>Protect a directory or location.</p>
<p>You can put these directives inside the httpd.conf file, or inside .htaccess</p>
<p>files if AllowOverride AuthConfig is set.</p>
<table style="background-color: #ccffff; height: 189px;" border="1" width="286">
<tbody>
<tr>
<td>&lt;Directory &#8220;C:/SSPI&#8221;&gt;</p>
<p>AllowOverride None</p>
<p>Options None</p>
<p>Order allow,deny</p>
<p>Allow from all</p>
<p>AuthName &#8220;My Intranet&#8221;</p>
<p>AuthType SSPI</p>
<p>SSPIAuth On</p>
<p>SSPIAuthoritative On</p>
<p>require valid-user</p>
<p>&lt;/Directory&gt;</td>
</tr>
</tbody>
</table>
<p>NOTE &#8211; There is information on the SSPI</p>
<p>Create a file named : <strong>whoami.php</strong> or you can name it, <strong>ilikepinkelephants.php</strong> if you prefer.</p>
<p>Copy this into it.</p>
<table style="background-color: #ccffff; height: 232px;" border="1" width="575">
<tbody>
<tr>
<td><span style="color: #ff0000;"><strong>&lt;?php</strong></span> <span style="color: #339966;">require</span>(<span style="color: #ff0000;">&#8216;includes/adLDAP.php&#8217;</span>);<span style="color: #ff0000;"> <strong>?&gt;</strong></span></p>
<p><span style="color: #ff0000;"><strong>&lt;?php</strong></span></p>
<p>$cred = <span style="color: #0000ff;">explode</span>(<span style="color: #ff0000;">&#8216;\\&#8217;</span>,<span style="color: #0000ff;">$_SERVER</span>[<span style="color: #ff0000;">'REMOTE_USER'</span>]);</p>
<p>if (<span style="color: #0000ff;">count</span>($cred) <span style="color: #0000ff;">==</span> <span style="color: #ff0000;">1</span>) <span style="color: #0000ff;">array_unshift</span>($cred, <span style="color: #ff0000;">&#8220;(no domain info &#8211; perhaps SSPIOmitDomain is On)&#8221;</span>);</p>
<p><span style="color: #0000ff;">list</span>($domain, $user) = $cred;</p>
<p>$ldap=<span style="color: #339966;">new</span> adLDAP($options);</p>
<p><span style="color: #339966;">if</span> (<span style="color: #ff0000;">1</span>){</p>
<p>$result = $ldap-&gt;user_info($user,<span style="color: #0000ff;">array</span>(<span style="color: #ff0000;">&#8216;displayname&#8217;</span>));</p>
<p><span style="color: #0000ff;">$_SESSION</span>[<span style="color: #ff0000;">'username'</span>] = $result[<span style="color: #ff0000;">0</span>][displayname][<span style="color: #ff0000;">0</span>];</p>
<p>$fullname = <span style="color: #0000ff;">$_SESSION</span>[<span style="color: #ff0000;">'username'</span>];</p>
<p>$splitname = <span style="color: #0000ff;">explode</span>(<span style="color: #ff0000;">&#8220;,&#8221;</span>, $fullname);</p>
<p><span style="color: #0000ff;">echo</span> $splitname[<span style="color: #ff0000;">1</span>];</p>
<p><span style="color: #0000ff;">echo </span>(<span style="color: #ff0000;">&#8221; &#8220;</span>);</p>
<p><span style="color: #0000ff;">echo</span> $splitname[<span style="color: #ff0000;">0</span>];</p>
<p>}</p>
<p><span style="color: #ff0000;"><strong>?&gt;</strong></span></td>
</tr>
</tbody>
</table>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbjax.com/2008/09/26/setting-up-mod_auth_sspi-adldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

