<?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>Mark Headrick&#039;s Blog &#187; WordPress</title>
	<atom:link href="http://blog.markheadrick.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.markheadrick.com</link>
	<description>My ramblings about what&#039;s new on my website and whatever else comes to mind.</description>
	<lastBuildDate>Mon, 26 Jul 2010 12:30:11 +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>Making Block-Spam-By-Math work better for you</title>
		<link>http://blog.markheadrick.com/2010/06/22/making-block-spam-by-math-work-better-for-you/</link>
		<comments>http://blog.markheadrick.com/2010/06/22/making-block-spam-by-math-work-better-for-you/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 04:42:05 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/?p=769</guid>
		<description><![CDATA[This is a follow-up to the post I made a couple days ago about upgrading to WordPress 3.0 and looking for a new spam protection plugin that asked to solve a math problem. The one I chose was Block-Spam-By-Math because &#8230; <a href="http://blog.markheadrick.com/2010/06/22/making-block-spam-by-math-work-better-for-you/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a follow-up to the post I made a couple days ago about upgrading to <a href="http://wordpress.org/development/2010/06/thelonious/" target="_blank">WordPress 3.0</a> and looking for a new spam protection plugin that asked to solve a math problem. The one I chose was <a href="http://wordpress.org/extend/plugins/block-spam-by-math/" target="_blank">Block-Spam-By-Math</a> because it seemed to work out of the box. Well, since then, I&#8217;ve learned that the plugin, as is, is not all it&#8217;s cracked up to be. I was still receiving numerous spam comments (which Akismet did catch). Due to the content of the comments, I could tell that these were automated or done by bots most likely and not humans. I, of course, understand that no plugin like this is going to stop an actual human hired to or set upon spamming blogs and galleries.</p>
<p>After examining how this plugin worked, it became rather obvious that it was pretty much useless. The plugin always performs addition and the two numbers to be added are there in the form with very recognizable field names and, well, it does have &#8220;X + Y&#8221; within the form text. A bot that knows how this plugin works and the field names it uses could easily parse the form&#8217;s contents to get the two numbers, add them together, and then supply the answer using an obviously known POST variable name. In fact, because the plugin adds the numbers that are submitted to it by the form, the bots can simply supply their own arguments for the plugin to use. All it has to do is use the correct POST field names. Since this is an established plugin on the WordPress site, I&#8217;m sure the blog spammers have learned to expect this plugin to be in use on WordPress blogs and have written their code to effectively get around it.</p>
<p>The solution that I wanted to use, which I do with my guest book on my main website, is to store the answer and/or the arguments on the server, such as in a session variable because these values are only known to the scripts running on the server; however, the way the plugin is written (or WordPress itself), the function that sets up the form is some how executed more than once when viewing a post thereby causing the values to change from what is presented on the form itself. Maybe it&#8217;s related to this theme&#8217;s possibility of having nested comments. This may explain why they perform the math on the values sent in by the form itself. So, what I did was to simply change the field names that it used to some random things I thought of to throw the bot&#8217;s parsing or string searching and posting functions off.</p>
<p>This has appeared to do the trick as I can now see spam attacks in my latest visitors log at my webhost resulting in 403 errors that this plugin generates on a failed response. This also proves that these attacks are coming from bots and not humans putting in the answers.</p>
<p>To make this change yourself, edit the <strong>/wp-content/plugins/block-spam-by-math/block-spam-by-math.php</strong> file and look for <strong>function add_hidden_fields()</strong> and <strong>function check_hidden_fields()</strong> and simply change the corresponding <strong>name</strong> and <strong>$_POST[]</strong> variables it uses:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">      <span style="color: #000000; font-weight: bold;">function</span> add_hidden_fields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$mathvalue0</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$mathvalue1</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div&gt;&lt;b&gt;IMPORTANT!&lt;/b&gt; To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-) '</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;What is <span style="color: #006699; font-weight: bold;">$mathvalue0</span> + <span style="color: #006699; font-weight: bold;">$mathvalue1</span> ?&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;input type=&quot;text&quot; name=&quot;changeme2&quot; value=&quot;&quot; /&gt;'</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div style=&quot;display:none&quot;&gt;Please leave these two fields as-is: '</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;input type='text' name='changeme0' value='<span style="color: #006699; font-weight: bold;">$mathvalue0</span>' /&gt;&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;input type='text' name='changeme1' value='<span style="color: #006699; font-weight: bold;">$mathvalue1</span>' /&gt;&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Check for hidden fields and wp_die() in case of error</span>
      <span style="color: #000000; font-weight: bold;">function</span> check_hidden_fields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #666666; font-style: italic;">// Get values from POST data</span>
         <span style="color: #000088;">$val0</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$val1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$val2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'changeme0'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$val0</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'changeme0'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'changeme1'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$val1</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'changeme1'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'changeme2'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$val2</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'changeme2'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Check values</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$val0</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$val1</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$val2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$val0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> ntval<span style="color: #009900;">&#40;</span><span style="color: #000088;">$val1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// Die and return error 403 Forbidden</span>
            wp_die<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Bye Bye, SPAMBOT!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'403 Forbidden'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'response'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">403</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span></pre></div></div>

<p>In the code above you want to change the <strong>changemeX</strong> items. The original code and my new code has something other than what is shown here. To be even sneakier you could change them once a week or however often and there&#8217;s no need for them to be the same thing with 0, 1, and 2 after them. They just have to match each other in the functions.  As I&#8217;m sitting here typing this, I just had another idea to try. <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Anyway, hopefully this well help cut down some of the automated comment spam attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2010/06/22/making-block-spam-by-math-work-better-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog has been upgraded to WordPress v3.0!</title>
		<link>http://blog.markheadrick.com/2010/06/20/blog-has-been-upgraded-to-wordpress-v3-0/</link>
		<comments>http://blog.markheadrick.com/2010/06/20/blog-has-been-upgraded-to-wordpress-v3-0/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 04:30:23 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Website Update]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/?p=758</guid>
		<description><![CDATA[I have upgraded my blog to WordPress v3.0 which was just released a couple days ago. As I always do, I backed-up all my files and database before proceeding. I have a local copy of my blog on the PC &#8230; <a href="http://blog.markheadrick.com/2010/06/20/blog-has-been-upgraded-to-wordpress-v3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have upgraded my blog to <a title="WordPress v3.0" href="http://wordpress.org/development/2010/06/thelonious/" target="_blank">WordPress v3.0</a> which was just released a couple days ago. As I always do, I backed-up all my files and database before proceeding. I have a local copy of my blog on the PC so I upgraded it first. I did the auto upgrade option again which seemed to have worked well.  Even so, once again I had to edit the <strong>/wp-includes/vars.php</strong> file to force <strong>$is_apache</strong> to <strong>true</strong> (see below) since the SERVER_SOFTWARE variable comes back as WebServerX instead of Apache.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Server detection</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Whether the server software is Apache or something else
 * @global bool $is_apache
 */</span>
<span style="color: #666666; font-style: italic;">//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;</span>
<span style="color: #000088;">$is_apache</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009933; font-style: italic;">/**
 * Whether the server software is IIS or something else
 * @global bool $is_IIS
 */</span>
<span style="color: #000088;">$is_IIS</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_SOFTWARE'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Microsoft-IIS'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></pre></div></div>

<p>I also had to edit the <strong>/wp-login.php</strong> file and add session_start(); at the beginning for the Register Plus plug-in to work properly as PHP sessions are not automatically started at my webhost (I could make them auto-start if I wanted but I&#8217;d rather have control of it via my scripts):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">session_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">/**
 * WordPress User Page</span></pre></div></div>

<p>Now I could have stopped here; however, I wanted to use the new default WordPress theme, <strong>Twenty Ten</strong> which had a wider footprint and additional functionality beyond the previous default theme. I also figured it would be the most stable and up-to-date theme to work with the new WordPress version.  I made of a copy of the theme and placed it into its own directory, giving it my own name.</p>
<p>Since this was a new theme, I had to modify some of the PHP files to add my custom code. All I really had to do was add a JavaScript code snippet to the <strong>/mytheme/header.php</strong> file that some of my archived pages use to show and hide parts of their content. I also had to add a piece of code to the <strong>/mytheme/comments.php</strong> file for the <strong><a title="Math Comment Spam Protection" href="http://wordpress.org/extend/plugins/math-comment-spam-protection/" target="_blank">Math Comment Spam Protection</a></strong> plugin to function; however, this theme&#8217;s coding of the comment form was much different and from what I could tell would have to do a lot of hacking around with the code to get it to work. So, I decided to look for something else. I came across the <strong><a title="Block-Spam-By-Math" href="http://wordpress.org/extend/plugins/block-spam-by-math/" target="_blank">Block-Spam-By-Math</a></strong> plugin. This one worked with the new theme and I didn&#8217;t have to add any additional code anywhere to make it work! During this time frame where I did not have a functioning Math protection plugin, <strong><a title="Akismet Plugin" href="http://wordpress.org/extend/plugins/akismet/" target="_blank">Akismet</a></strong> caught around 55 spam comments! This was in less than a day and a half. Since adding in the new plugin, Akismet has only seen one new spam comment. This just proves how many spam comments a plugin like this will stop.</p>
<p>At this stage all I&#8217;m really doing is playing around with CSS styles to get the blog to appear how I want. This is where things like <strong><a title="Firebug" href="https://addons.mozilla.org/en-US/firefox/addon/1843/" target="_blank">Firebug</a></strong> for <a title="Firefox web browser" href="http://en-us.www.mozilla.com/en-US/firefox/" target="_blank">Firefox</a> come in real handy by telling me where an element is getting its style from. It will tell you about the element&#8217;s inheritance, which file(s) contain the CSS, and the line numbers within those files. By the way, I found the <a title="CSS Tutorial at W3Schools" href="http://www.w3schools.com/css/default.asp" target="_blank">CSS Tutorials</a> at <a title="W3Schools" href="http://www.w3schools.com/default.asp" target="_blank">W3Schools</a> to be rather helpful in testing out various font-size and line-height combinations which this theme seems to use heavily. I may change its use of fixed pixel sized line-heights in favor of relative values so that they scale properly with changes in font size, we&#8217;ll see. <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Before I close and while there&#8217;s still 30 minutes left in the day, I just wanted to wish my dad and all the other dads out there a <strong>Happy Father&#8217;s Day!!</strong> <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2010/06/20/blog-has-been-upgraded-to-wordpress-v3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modified navigation links to not show Daily Tweets.</title>
		<link>http://blog.markheadrick.com/2010/04/07/modified-navigation-links-to-not-show-daily-tweets/</link>
		<comments>http://blog.markheadrick.com/2010/04/07/modified-navigation-links-to-not-show-daily-tweets/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 23:09:57 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Website Update]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/?p=700</guid>
		<description><![CDATA[I&#8217;ve modified the code in my blog&#8217;s theme to exclude the Daily Tweets category (aka Twitter Digest) from the Previous and Next post navigation links when viewing a single post. This will make it behave more like my blog&#8217;s home &#8230; <a href="http://blog.markheadrick.com/2010/04/07/modified-navigation-links-to-not-show-daily-tweets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve modified the code in my blog&#8217;s theme to exclude the <a title="Daily Tweets" href="http://blog.markheadrick.com/category/daily-tweets/">Daily Tweets</a> category (aka Twitter Digest) from the Previous and Next post navigation links when viewing a single post. This will make it behave more like my blog&#8217;s home page and feed where that category is also excluded via the <a title="Advanced Category Excluder" href="http://wordpress.org/extend/plugins/advanced-category-excluder/" target="_blank">Advanced Category Excluder</a> plug-in. So, to view the posts in that category, you will need to click on the Daily Tweets category on the right-hand side of the blog under the Categories section.</p>
<p>I decided to do it this way rather than using the plug-in to exclude the category from &#8220;single posts&#8221; as that would prevent the ability view the post individually (it causes a 404 error to be generated).</p>
<p>Now, the Daily Tweets will not get in the way of browsing the normal posts on my blog. <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2010/04/07/modified-navigation-links-to-not-show-daily-tweets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog has been upgraded to WordPress v2.9</title>
		<link>http://blog.markheadrick.com/2009/12/19/blog-has-been-upgraded-to-wordpress-v2-9/</link>
		<comments>http://blog.markheadrick.com/2009/12/19/blog-has-been-upgraded-to-wordpress-v2-9/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 12:23:22 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Surpass Hosting]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/?p=611</guid>
		<description><![CDATA[I have updated my blog to WordPress v2.9 which was just released. I did the auto upgrade option again which seems to have worked well. Even so, once again I had to edit the /wp-includes/vars.php file to force $is_apache to &#8230; <a href="http://blog.markheadrick.com/2009/12/19/blog-has-been-upgraded-to-wordpress-v2-9/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have updated my blog to <a title="WordPress v2.9" href="http://wordpress.org/development/2009/12/wordpress-2-9/" target="_blank">WordPress v2.9</a> which was just released. I did the auto upgrade option again which seems to have worked well.  Even so, once again I had to edit the <strong>/wp-includes/vars.php</strong> file to force <strong>$is_apache</strong> to <strong>true</strong> (see below) since the SERVER_SOFTWARE variable comes back as WebServerX instead of Apache.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Server detection</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Whether the server software is Apache or something else
 * @global bool $is_apache
 */</span>
<span style="color: #666666; font-style: italic;">//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;</span>
<span style="color: #000088;">$is_apache</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009933; font-style: italic;">/**
 * Whether the server software is IIS or something else
 * @global bool $is_IIS
 */</span>
<span style="color: #000088;">$is_IIS</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_SOFTWARE'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Microsoft-IIS'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></pre></div></div>

<p>I also had to edit the <strong>/wp-login.php</strong> file and add session_start(); at the beginning for the Register Plus plug-in to work properly as PHP sessions are not automatically started:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">session_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">/**
 * WordPress User Page</span></pre></div></div>

<p>Other than the modifications above, which I have always had to do, the upgrade went smoothly.  <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Of course, I did perform a complete database and file backup before upgrading! <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2009/12/19/blog-has-been-upgraded-to-wordpress-v2-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog has been upgraded to WordPress v2.8.1</title>
		<link>http://blog.markheadrick.com/2009/07/10/blog-has-been-upgraded-to-wordpress-v2-8-1/</link>
		<comments>http://blog.markheadrick.com/2009/07/10/blog-has-been-upgraded-to-wordpress-v2-8-1/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 20:24:56 +0000</pubDate>
		<dc:creator>MarkRH</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Surpass Hosting]]></category>

		<guid isPermaLink="false">http://blog.markheadrick.com/?p=520</guid>
		<description><![CDATA[I have updated my blog to WordPress v2.8.1 which was just released. I did the auto upgrade option again which seems to have worked well. Even so, once again I had to edit the /wp-includes/vars.php file to force $is_apache to &#8230; <a href="http://blog.markheadrick.com/2009/07/10/blog-has-been-upgraded-to-wordpress-v2-8-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have updated my blog to <a title="WordPress v2.8.1" href="http://wordpress.org/development/2009/07/wordpress-2-8-1/" target="_blank">WordPress v2.8.1</a> which was just released. I did the auto upgrade option again which seems to have worked well.  Even so, once again I had to edit the <strong>/wp-includes/vars.php</strong> file to force <strong>$is_apache</strong> to <strong>true</strong> (see below) since the SERVER_SOFTWARE variable comes back as WebServerX instead of Apache.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Server detection</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Whether the server software is Apache or something else
 * @global bool $is_apache
 */</span>
<span style="color: #666666; font-style: italic;">//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;</span>
<span style="color: #000088;">$is_apache</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009933; font-style: italic;">/**
 * Whether the server software is IIS or something else
 * @global bool $is_IIS
 */</span>
<span style="color: #000088;">$is_IIS</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_SOFTWARE'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Microsoft-IIS'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #339933;">:</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span></pre></div></div>

<p>Other than the modification to vars.php which I have always had to do, the upgrade went smoothly.  <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Of course, I did perform a complete database and file backup before upgrading! <img src='http://blog.markheadrick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markheadrick.com/2009/07/10/blog-has-been-upgraded-to-wordpress-v2-8-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
