<?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>Tech Otaku</title>
	<atom:link href="http://www.tech-otaku.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-otaku.com</link>
	<description></description>
	<lastBuildDate>Sun, 13 May 2012 02:58:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Display Post View Count Plugin for WordPress.com Stats</title>
		<link>http://www.tech-otaku.com/blogging/display-post-view-count-plugin-wordpresscom-stats/</link>
		<comments>http://www.tech-otaku.com/blogging/display-post-view-count-plugin-wordpresscom-stats/#comments</comments>
		<pubDate>Tue, 08 May 2012 05:31:16 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1933</guid>
		<description><![CDATA[Some while back I described a method for retrieving and displaying individual post view counts from WordPress.com. Having proved quite popular, I thought I&#8217;d wrap this functionality in a simple plugin. display-post-view-count.zip5.9 KBMay 8, 2012 06:20 ﻿ Prerequisite The plugin requires your site to have WordPress.com Stats activated either as part of the Jetpack plugin ...]]></description>
			<content:encoded><![CDATA[<p>Some while back I described a method for retrieving and displaying individual post view counts from WordPress.com. Having proved quite popular, I thought I&#8217;d wrap this functionality in a simple plugin.</p>
<p><span id="more-1933"></span>
<div class="download_box">
<p class="dl"><span class="link"><a href="http://bit.ly/IRwVR5">display-post-view-count.zip</a></span><span class="filesize">5.9 KB</span><span class="filedate">May 8, 2012 06:20</span></p>
</div>
<p>﻿</p>
<h3 id="1" class="content-heading-text">Prerequisite</h3>
<p>The plugin requires your site to have WordPress.com Stats activated either as part of the <a href="http://wordpress.org/extend/plugins/jetpack/" target="_blank">Jetpack</a> plugin or the previous <a href="http://wordpress.org/extend/plugins/stats/" target="_blank">stand-alone</a> plugin version.</p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<h3 id="2" class="content-heading-text">Installation</h3>
<p>Extract all files from the ZIP file, making sure to keep the file/folder structure intact, and then upload it to the <span class="system-font">/wp-content/plugins/</span> directory. Go to the admin area of your WordPress install and click on the <span class="system-font dark">Plugins</span> menu. Click on <span class="system-font dark">Activate</span> for the <span class="system-font dark">Display Post View Count</span> plugin.</p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<h3 id="3" class="content-heading-text">Settings</h3>
<p><span class="system-font">Display To All</span><br />If set to <span class="system-font">No</span>, view counts are only displayed to logged-in users. If <span class="system-font">Yes</span>, view counts are displayed to visitors as well as logged-in users. The Default is <span class="system-font">No</span>.</p>
<p><span class="system-font">Include Link</span><br />If set to <span class="system-font">Yes</span>, the view count includes a link to the individual post&#8217;s statistics at WordPress.com. The link is only included for Admin users. The Default is <span class="system-font">Yes</span>.</p>
<p><span class="system-font">Display Text</span><br />The text used to display the individual post&#8217;s view count. The variable <span class="system-font">%VIEW_COUNT%</span> is replaced with the post&#8217;s actual view count. The Default is <span class="system-font">%VIEW_COUNT% views</span>.</p>
<p><span class="system-font">Link Hover Text</span><br />The text shown when the mouse hovers over the link to the individual post&#8217;s statistics at WordPress.com. The variable <span class="system-font">%POST_TITLE%</span> is replaced with the post&#8217;s title. The Default is <span class="system-font">Show detailed stats for %POST_TITLE% at WordPress.com</span>.</p>
<p><span class="system-font">Surround post title with single quotes</span><br />If checked, encloses the post&#8217;s title in single quotes to differentiate it from the surrounding text. The Default is <span class="system-font">checked</span>.</p>
<p><span class="system-font">Restore defaults upon plugin deactivation/reactivation</span><br />If checked, settings will return to their default values if the plugin is reactivated. The Default is <span class="system-font">un-checked</span>.</p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<h3 id="4" class="content-heading-text">Usage</h3>
<p>Place the following code where you want the view counts to display:</p>
<pre class="brush: php5;">
&lt;?php echo do_shortcode(&#39;&#91;display-post-view-count&#93;&#39;); ?&gt;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>The <span class="system-font">display-post-view-count</span> shortcode accepts two parameters: <span class="system-font">display</span> and <span class="system-font">link</span> which are synonymous with the <span class="system-font">Display To All</span> and <span class="system-font">Include Link</span> settings respectively. Each parameter can be set to either <span class="system-font">0</span> (No) or <span class="system-font">1</span> (Yes). If used, they overwrite their respective setting&#8217;s value.</p>
<p>As an example the following code displays view counts to everyone, but no link is included:</p>
<pre class="brush: php5;">
&lt;?php echo do_shortcode(&#39;&#91;display-post-view-count display=1 link=0&#93;&#39;); ?&gt;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<h3 id="5" class="content-heading-text">Change Log</h3>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<table>
<tr>
<td>0.9.0</td>
<td>Initial Release</td>
<td>2012-05-08</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/blogging/display-post-view-count-plugin-wordpresscom-stats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing WordPress &#8217;404 Object Not Found&#8217; Errors on a Mac OS X Local Server Environment</title>
		<link>http://www.tech-otaku.com/local-server/fixing-wordpress-404-object-not-found-errors-mac-os-x-local-server-environment/</link>
		<comments>http://www.tech-otaku.com/local-server/fixing-wordpress-404-object-not-found-errors-mac-os-x-local-server-environment/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 01:46:59 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Local Server]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[os-x]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1895</guid>
		<description><![CDATA[Installing WordPress on a local server environment is fairly straight forward. There are numerous guides to be found on the Internet that&#8217;ll walk you through each step. If your local server environment is running on a Mac, the local Apache server may have some difficulty serving WordPress posts and pages resulting in Error 404 Object ...]]></description>
			<content:encoded><![CDATA[<p>Installing WordPress on a local server environment is fairly straight forward. There are <a href="http://www.google.com/search?q=local+install+wordpress&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t&#038;rls=org.mozilla:en-US:official" target="_blank">numerous guides</a> to be found on the Internet that&#8217;ll walk you through each step.</p>
<p>If your local server environment is running on a Mac, the local Apache server may have some difficulty serving WordPress posts and pages resulting in <span class="system-font">Error 404 Object not found!</span> errors. These errors can often be attributed to the use of custom or so-called pretty permalinks.</p>
<p><span id="more-1895"></span>
<p>The default permalink structure in WordPress is <span class="system-font">http://domain.com/?p=123</span>. Any other structure requires an <span class="system-font">.htaccess</span> file  containing <span class="system-font">mod_rewrite</span> directives to re-write the permalink URLs correctly. The kind of directives that are allowed in <span class="system-font">.htaccess</span> files are controlled by the Apache server&#8217;s configuration file: <span class="system-font">httpd.conf</span>.</p>
<p>The configuration file for the Apache server that ships with Mac OS X is <span class="system-font">/private/etc/apache2/httpd.conf</span>. The directory where web pages are stored, known as the document root, is set to <span class="system-font">/Library/WebServer/Documents</span> by default and in the Mac OS X Apache server is configured as follows:</p>
<pre class="brush: apache; first-line: 191; highlight: [214];">
#
# This should be changed to whatever you set DocumentRoot to.
#
&lt;Directory &quot;/Library/WebServer/Documents&quot;&gt;
    #
    # Possible values for the Options directive are &quot;None&quot;, &quot;All&quot;,
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

&lt;/Directory&gt;
</pre>
<p class="post-image-caption">Default document root configuration in the Mac OS X Apache server configuration file</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>On line 214 the <span class="system-font">AllowOverride</span> directive is set to <span class="system-font">None</span>. This instructs Apache to completely ignore <span class="system-font">.htaccess</span> files. Consequently any re-write rules required for pretty permalinks will not be executed resulting in <span class="system-font">Error 404 Object not found!</span> errors.</p>
<p>The fix is simple and there are two choices: set the <span class="system-font">AllowOverride</span> directive to <span class="system-font">FileInfo</span> or <span class="system-font">All</span>.</p>
<p>Setting the <span class="system-font">AllowOverride</span> directive to <span class="system-font">FileInfo</span> allows the use of <span class="system-font">mod_rewrite</span> directives in <span class="system-font">.htaccess</span> files.</p>
<pre class="brush: apache; first-line: 209; highlight: [214];">
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride FileInfo

&lt;/Directory&gt;
</pre>
<p class="post-image-caption">Document root AllowOverride directive set to FileInfo in the Mac OS X Apache server configuration file</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Setting the <span class="system-font">AllowOverride</span> directive to <span class="system-font">All</span> allows the use of all permissible <span class="system-font">.htaccess</span> directives in <span class="system-font">.htaccess</span> files.</p>
<pre class="brush: apache; first-line: 209; highlight: [214];">
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

&lt;/Directory&gt;
</pre>
<p class="post-image-caption">Document root AllowOverride directive set to All in the Mac OS X Apache server configuration file</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>For local server environments provided by XAMPP the document root configuration can be found in <span class="system-font">/Applications/XAMPP/xamppfiles/etc/httpd.conf</span>.</p>
<p>For MAMP it&#8217;s <span class="system-font">/Applications/MAMP/conf/apache/httpd.conf</span>.</p>
<p>When using virtual hosts the <span class="system-font">AllowOverride</span> directive can be set individually for each virtual host. For instructions on configuring virtual hosts see <a href="http://www.tech-otaku.com/local-server/configuring-virtual-hosts-xampp-mac-os-x/" target="_blank">Configuring Virtual Hosts in XAMPP on Mac OS X</a> and <a href="http://www.tech-otaku.com/local-server/configuring-virtual-hosts-mamp-mac-os-x/" target="_blank">Configuring Virtual Hosts in MAMP on Mac OS X.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/local-server/fixing-wordpress-404-object-not-found-errors-mac-os-x-local-server-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Possible Cause of WordPress Jetpack Plugin Pagination Error</title>
		<link>http://www.tech-otaku.com/blogging/possible-cause-wordpress-jetpack-plugin-pagination-error/</link>
		<comments>http://www.tech-otaku.com/blogging/possible-cause-wordpress-jetpack-plugin-pagination-error/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:49:02 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[page-navigation]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1860</guid>
		<description><![CDATA[Back in July 2011 I noticed a problem with the Jetpack plugin and page navigation. In short, with the Jetpack plugin activated page navigation worked only if I was logged-in as admin. When logged-out page urls were being incorrectly re-written and causing 404 Not Found errors. Now, some 9 months after having first raised the ...]]></description>
			<content:encoded><![CDATA[<p>Back in July 2011 I noticed a <a href="http://www.tech-otaku.com/blogging/wordpress-jetpack-plugin-broken-page-navigation/" target="_blank">problem</a> with the Jetpack plugin and page navigation. In short, with the Jetpack plugin activated page navigation worked only if I was logged-in as admin. When logged-out page urls were being incorrectly re-written and causing <span class="system-font">404 Not Found</span> errors.</p>
<p>Now, some 9 months after having first raised the issue over at the WordPress.org forums member Josh Eaton seems to have found a <a href="http://wordpress.org/support/topic/jetpack-plugin-and-broken-page-navigation?replies=16#post-2700028" target="_blank">possible cause</a>.</p>
<p><span id="more-1860"></span>
<p>To have blog posts displayed on the front page, the theme I use requires that <span class="system-font dark">A static page</span> is selected in <span class="system-font dark">Reading Settings</span>:</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/7055491253" title="View 'Reading Settings with Front page displays set to A static page' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm6.staticflickr.com/5335/7055491253_843289ecdf.jpg" alt="Reading Settings with Front page displays set to A static page" width="408" height="157" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Reading Settings with <b>Front page displays</b> set to <b>A static page</b></p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>The theme&#8217;s <span class="system-font">wp-content/themes/infocus-v16-prod/index.php</span> file then chooses the appropriate template based on these settings:</p>
<pre class="brush: php5; highlight: [8,9];">
&lt;?php
get_header();
require(WEBTREATS_INCLUDES . &quot;/var.php&quot;);

$show_on_front = get_option('show_on_front');
$page_on_front = get_option('page_on_front');

if( ($show_on_front == 'page') &amp;&amp; ($page_on_front == $blog_page) ) {
	require(WEBTREATS_INCLUDES . &quot;/template-blog.php&quot;);
}else{
	require(WEBTREATS_INCLUDES . &quot;/featured-&quot; .$homepage_slider. &quot;.php&quot;);
get_footer();
}

?&gt;
</pre>
<p class="post-image-caption">The original inFocus v1.60 wp-content/themes/infocus-v16-prod/index.php file</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Using this configuration I was experiencing issues with page navigation. Josh&#8217;s suggestion was to have <span class="system-font dark">Your latest posts</span> selected in <span class="system-font dark">Reading Settings</span>:  </p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/7055509859" title="View 'Reading Settings with Front page displays set to Your latest posts' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm8.staticflickr.com/7273/7055509859_b2df2e3f98.jpg" alt="Reading Settings with Front page displays set to Your latest posts" width="432" height="166" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Reading Settings with <b>Front page displays</b> set to <b>Your latest posts</b></p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>For my theme I also needed to change <span class="system-font">wp-content/themes/infocus-v16-prod/index.php</span> so that <span class="system-font">/wp-content/themes/infocus-v16-prod/lib/includes/template-blog.php</span> was still being used despite <span class="system-font dark">A static page</span> no longer being selected in <span class="system-font dark">Reading Settings</span>.</p>
<p>Commenting-out the option for use of the other template has no adverse affect on my site as the site&#8217;s configuration renders this alternative redundant.</p>
<pre class="brush: php5; highlight: [9,12];">
&lt;?php
get_header();
require(WEBTREATS_INCLUDES . &quot;/var.php&quot;);

$show_on_front = get_option('show_on_front');
$page_on_front = get_option('page_on_front');

if( ($show_on_front == 'page') &amp;&amp; ($page_on_front == $blog_page) ) {
	require(WEBTREATS_INCLUDES . &quot;/template-blog.php&quot;);
}else{
//	require(WEBTREATS_INCLUDES . &quot;/featured-&quot; .$homepage_slider. &quot;.php&quot;);
	require(WEBTREATS_INCLUDES . &quot;/template-blog.php&quot;);
get_footer();
}

?&gt;
</pre>
<p class="post-image-caption">The amended inFocus v1.60 wp-content/themes/infocus-v16-prod/index.php file</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>While this fix may not get to the root of the issue and admittedly it feels more like a hack than a solution, it certainly allows the Jetpack plugin to play nice with page navigation on this site.</p>
<p><a href="http://www.tech-otaku.com/blogging/wordpress-3x-page-navigation-error-infocus-theme-revisited/" target="_blank">WordPress 3.x Page Navigation Error with inFocus Theme: Revisited</a> may also be of interest as it documents a possibly related issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/blogging/possible-cause-wordpress-jetpack-plugin-pagination-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Brush for the SyntaxHighlighter Evolved WordPress Plugin</title>
		<link>http://www.tech-otaku.com/blogging/apache-brush-syntaxhighlighter-evolved-wordpress-plugin/</link>
		<comments>http://www.tech-otaku.com/blogging/apache-brush-syntaxhighlighter-evolved-wordpress-plugin/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 06:01:01 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1789</guid>
		<description><![CDATA[Having recently switched from SyntaxHighlighter MT to the SyntaxHighlighter Evolved plugin I was unable to get my custom Apache brush I use for .htaccess and *.conf files to work. While searching for an answer I happened upon a better although seemingly unfinished version of an Apache brush, but still couldn&#8217;t get it work. A little ...]]></description>
			<content:encoded><![CDATA[<p>Having recently switched from SyntaxHighlighter MT to the <a href="http://wordpress.org/extend/plugins/syntaxhighlighter/" target="_blank">SyntaxHighlighter Evolved</a> plugin I was unable to get my custom Apache brush I use for <span class="system-font">.htaccess</span> and <span class="system-font">*.conf</span> files to work.</p>
<p>While searching for an answer I happened upon a better although seemingly unfinished version of an Apache brush, but still couldn&#8217;t get it work. A little further digging and I learnt that I needed to <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/adding-a-new-brush-language/" target="_blank">write a plugin</a> to use a custom brush with SyntaxHighlighter Evolved.</p>
<p><span id="more-1789"></span></p>
<div class="download_box">
	<!--<div id='filelist1'><ul id="listyofiles">
<li><a href="http://www.tech-otaku.com/wp-content/downloads/plugins/syntaxhighlighter-evolved-apache/syntaxhighlighter-evolved-apache.zip">syntaxhighlighter-evolved-apache.zip</a><span class="size">7.5 KB</span>
<span class="modified">April 6, 2012 05:54</span>
</li>
</ul>
</div>
--></p>
<p class="dl"><span class="link"><a href="http://bit.ly/Hd0i0D">syntaxhighlighter-evolved-apache.zip</a></span><span class="filesize">7.5 KB</span><span class="filedate">April 6, 2012 05:54</span></p>
</div>
<p>My version of the plugin is based on <a href="https://bitbucket.org/Rileyw/syntaxhighlighter/src/ae47a9cb5785/scripts/shBrushApacheConfig.js" target="_blank">shApacheConfig.js</a> by Riley Wills and while still very much a work in progress, provides adequate though not exhaustive highlighting. Any suggestions or modifications are extremely welcome.</p>
<p>The plugin defines two valid brush names: <span class="system-font">apache</span> and <span class="system-font">conf</span> either of which may be used in a <span class="system-font">&lt;pre&gt;</span> tag or <span class="system-font">shortcode</span> like so:</p>
<pre class="brush: conf; gutter: false;">
&lt;pre class="brush: apache;"&gt;
	.....
&lt;/pre&gt;
</pre>
<p class="post-image-caption">Using a &lt;pre&gt; tag</p>
<p class="line-break">&nbsp;</p>
<pre class="brush: plain; gutter: false;">
&#91;apache&#93;
	.....
&#91;&#47;apache&#93;
</pre>
<p class="post-image-caption">Using a shortcode</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Installation instructions and further notes on usage can be found in the <span class="system-font">readme.txt</span> file included in <span class="system-font">syntaxhighlighter-evolved-apache.zip</span>.</p>
<p>The code snippets below are not necessarily working examples and are intended merely to demonstrate the brush&#8217;s highlighting capabilities.</p>
<pre class="brush: conf; gutter: false;">
# BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
	RewriteEngine On
	RewriteBase /
	RewriteRule ^index\.php$ - [L]
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /index.php [L]
&lt;/IfModule&gt;

# END WordPress
</pre>
<p class="post-image-caption">Example .htaccess file</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<pre class="brush: conf; gutter: false;">
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot &quot;/Applications/XAMPP/xamppfiles&quot;

LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so

&lt;IfDefine JUSTTOMAKEAPXSHAPPY&gt;
	LoadModule php4_module        modules/libphp4.so
	LoadModule php5_module        modules/libphp5.so
&lt;/IfDefine&gt;

&lt;IfModule !mpm_winnt_module&gt;
	&lt;IfModule !mpm_netware_module&gt;
	User nobody
	Group nogroup
	&lt;/IfModule&gt;
&lt;/IfModule&gt;

ServerAdmin you@example.com

ServerName localhost

DocumentRoot &quot;/Applications/XAMPP/xamppfiles/htdocs&quot;

#
# First, we configure the &quot;default&quot; to be a very restrictive set of
# features.
#
&lt;Directory /&gt;
    Options FollowSymLinks
    AllowOverride None
    #XAMPP
    Order deny,allow
    Deny from all
&lt;/Directory&gt;

#
# This should be changed to whatever you set DocumentRoot to.
#
&lt;Directory &quot;/Applications/XAMPP/xamppfiles/htdocs&quot;&gt;
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
&lt;IfModule dir_module&gt;
    DirectoryIndex index.html index.php index.htmls index.htm
&lt;/IfModule&gt;

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
&lt;FilesMatch &quot;^\.ht&quot;&gt;
    Order allow,deny
    Deny from all
&lt;/FilesMatch&gt;

ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

&lt;IfModule log_config_module&gt;
    LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
    LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b&quot; common

    &lt;IfModule logio_module&gt;
      # You need to enable mod_logio.c to use %I and %O
      LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot; %I %O&quot; combinedio
    &lt;/IfModule&gt;

    CustomLog logs/access_log common

&lt;/IfModule&gt;

&lt;IfModule alias_module&gt;
    ScriptAlias /cgi-bin/ &quot;/Applications/XAMPP/xamppfiles/cgi-bin/&quot;
&lt;/IfModule&gt;

&lt;IfModule cgid_module&gt;
    Scriptsock logs/cgisock
&lt;/IfModule&gt;

#
# &quot;/Applications/xampp/xamppfiles/cgi-bin&quot; should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
&lt;Directory &quot;/Applications/XAMPP/xamppfiles/phpmyadmin&quot;&gt;
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

DefaultType text/plain

&lt;IfModule mime_module&gt;
    TypesConfig etc/mime.type
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi .pl .asp
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
&lt;/IfModule&gt;

MIMEMagicFile etc/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
ErrorDocument 500 &quot;The server made a boo boo.&quot;
ErrorDocument 404 /missing.html
ErrorDocument 404 &quot;/cgi-bin/missing_handler.pl&quot;
ErrorDocument 402 http://www.example.com/subscription_info.html

EnableMMAP off
EnableSendfile off

# Server-pool management (MPM specific)
Include /Applications/XAMPP/etc/extra/httpd-mpm.conf

# Multi-language error messages
Include /Applications/XAMPP/etc/extra/httpd-multilang-errordoc.conf

&lt;IfModule ssl_module&gt;
    &lt;IfDefine SSL&gt;
        Include etc/extra/httpd-ssl.conf
    &lt;/IfDefine&gt;
&lt;/IfModule&gt;

#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
&lt;IfModule ssl_module&gt;
	SSLRandomSeed startup builtin
	SSLRandomSeed connect builtin
&lt;/IfModule&gt;

#XAMPP
Include etc/extra/httpd-xampp.conf

#
# Use name-based virtual hosting.
#
NameVirtualHost *

# tech-otaku [AllowOveride All for WordPress installs to stop 404 Page Not Found errors. Source: http://codex.wordpress.org/Using_Permalinks#Using_.22Pretty.22_permalinks]
&lt;VirtualHost *&gt;
	ServerName macbook.to
	DocumentRoot &quot;/Users/steve/Sites/DOMAINS/tech-otaku.com&quot;
	&lt;Directory &quot;/Users/steve/Sites/DOMAINS/tech-otaku.com&quot;&gt;
		Options Indexes FollowSymLinks Includes execCGI
		AllowOverride All
		Order Allow,Deny
		Allow From All
	&lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<p class="post-image-caption">Example .httpd.conf file (XAMPP)</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/blogging/apache-brush-syntaxhighlighter-evolved-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress 3.x Page Navigation Error with inFocus Theme: Revisited</title>
		<link>http://www.tech-otaku.com/blogging/wordpress-3x-page-navigation-error-infocus-theme-revisited/</link>
		<comments>http://www.tech-otaku.com/blogging/wordpress-3x-page-navigation-error-infocus-theme-revisited/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 05:40:38 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[infocus]]></category>
		<category><![CDATA[page-navigation]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1749</guid>
		<description><![CDATA[These instructions are only applicable for versions of inFocus up to and including v1.6 Shortly after the release of WordPress 3 I offered a solution to broken page navigation conceivably caused by upgrading from version 2. Recently, in an attempt to fix a long-standing and seemingly unrelated issue, page navigation reared its head once more. ...]]></description>
			<content:encoded><![CDATA[<div class="fancy_box fancy-box-post">These instructions are only applicable for versions of inFocus up to and including v1.6</div>
<p>Shortly after the release of WordPress 3 I offered a solution to broken page navigation conceivably caused by upgrading from version 2. Recently, in an attempt to fix a long-standing and seemingly unrelated issue, page navigation reared its head once more.</p>
<p><span id="more-1749"></span>
<p>A detailed explanation and solution to the original issue can be found <a href="http://www.tech-otaku.com/blogging/infocus-page-navigation-error-wordpress-30x/" target="_blank">here</a>. In short, the fix was to replace this code block in the file <span class="system-font">wp-content/themes/infocus/lib/includes/template-blog.php</span>:</p>
<pre class="brush: php; first-line: 164;">
&lt;?php
$exclude_blog_cats = preg_replace(&quot;!(\d)+!&quot;,&quot;-${0}$0&quot;, $blog_excludecats);
$query_string = &quot;cat=&quot;.$exclude_blog_cats.&quot;&amp;paged=$paged&quot;;
query_posts($query_string);
$counter=0;
?&gt;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>&#8230; with this, which tested the version of WordPress being used:</p>
<pre class="brush: php; first-line: 164;">
&lt;?php
if ( (int)substr(get_bloginfo ('version'),0, stripos(get_bloginfo ('version'),'.')) &lt; 3 ) { // WordPress 2.x or lower
	$paged = $paged ? $paged : 1;
} else { // WordPress 3.x or higher
	$paged = $page ? $page : 1;
}
$exclude_blog_cats = preg_replace(&quot;!(\d)+!&quot;,&quot;-${0}$0&quot;, $blog_excludecats);
$query_string = &quot;cat=&quot;.$exclude_blog_cats.&quot;&amp;paged=$paged&quot;;
query_posts($query_string);
$counter=0;
?&gt;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>Having used this fix for some 18 months it transpires that it&#8217;s only needed when using WordPress 3.x if blog posts are displayed on the front page i.e. in WordPress admin <i>A static page</i> is selected in Reading Settings > Front page displays. Changing this setting to <i>Your latest posts</i> breaks page navigation yet again.</p>
<p>Heres&#8217;s the revised code which only uses the <span class="system-font">$page</span> variable when using WordPress 3.x and blog posts are displayed on the front page. Otherwise <span class="system-font">$paged</span> is used.</p>
<pre class="brush: php; first-line: 164; highlight: [165, 166, 167, 168, 169, 170, 171];">
&lt;?php
if ( ( (int)substr(get_bloginfo ('version'),0, stripos(get_bloginfo ('version'),'.')) &gt;= 3 ) &amp;&amp; ( $show_on_front == 'page' ) &amp;&amp; ( $page_on_front == $blog_page ) ) {
	// WordPress 3 or higher and blog posts displayed on front page
	$paged = $page ? $page : 1;
} else {
	// WordPress 2.x or lower
	$paged = $paged ? $paged : 1;
}
$exclude_blog_cats = preg_replace(&quot;!(\d)+!&quot;,&quot;-${0}$0&quot;, $blog_excludecats);
$query_string = &quot;cat=&quot;.$exclude_blog_cats.&quot;&amp;paged=$paged&quot;;
query_posts($query_string);
$counter=0;
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/blogging/wordpress-3x-page-navigation-error-infocus-theme-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting MAMP&#8217;s Apache and MySQL Servers at Login</title>
		<link>http://www.tech-otaku.com/local-server/starting-mamps-apache-mysql-servers-login/</link>
		<comments>http://www.tech-otaku.com/local-server/starting-mamps-apache-mysql-servers-login/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 03:53:45 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Local Server]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[os-x]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1680</guid>
		<description><![CDATA[Whether using XAMPP or MAMP to provide a local server environment I prefer to have the respective Apache and MySQL servers start when I login. With XAMPP I use a launch daemon and this works perfectly. With MAMP it&#8217;s even easier as there&#8217;s an option to Start Servers when starting MAMP in MAMP&#8217;s preferences. I ...]]></description>
			<content:encoded><![CDATA[<p>Whether using XAMPP or MAMP to provide a local server environment I prefer to have the respective Apache and MySQL servers start when I login. With XAMPP I use a <a href="http://www.tech-otaku.com/mac-os-x/starting-xampps-apache-server-system-startup-leopard/" target="_blank">launch daemon</a> and this works perfectly. With MAMP it&#8217;s even easier as there&#8217;s an option to <span class="gui-text-font">Start Servers when starting MAMP</span> in MAMP&#8217;s preferences. I only need to add <span class="system-font dark">MAMP.app</span> to my Login Items and MAMP&#8217;s servers will be up and running after logging in.</p>
<p><span id="more-1680"></span>
<p>Well, they will be if using the default MAMP ports for Apache: 8888 and MySQL: 8889. However, I prefer using the standard ports for Apache: 80 and MySQL: 3306 and doing so requires I enter a password when MAMP starts as port 80 is a <i>privileged</i> or <i>well-known</i> port. Not ever having had any success using a launch daemon with MAMP the only alternative appeared to be AppleScript.</p>
<p>Saving this AppleScript as an Application and adding it to the Login Items will work but it has one major problem; the <span class="system-font">PASSWORD</span> and <span class="system-font">USERNAME</span> are stored in plain text.</p>
<pre class="brush: applescript; wrap-lines: false;">
tell application &quot;Finder&quot;
	# Start MAMP's Apache server
	do shell script &quot;/Applications/MAMP/bin/startApache.sh &amp;&quot; password PASSWORD user name USERNAME with administrator privileges

	# Start MAMP's MySQL server
	do shell script &quot;/Applications/MAMP/bin/startMysql.sh&quot;
end tell
</pre>
<p class="post-image-caption">AppleScript to start MAMP&#8217;s Apache and MySQL servers with user name and password stored in plain text</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>To overcome this security issue a new item can be added to the users keychain and made available to the AppleScript using Keychain Scripting. Unfortunately, as of OS X Lion the <span class="system-font dark">Keychain Scripting.app</span> is no longer included. Prior to OS X Lion it could be found in <span class="system-font">/System/Library/ScriptingAdditions/</span>. We&#8217;ll see two alternative methods later, but first we need to create a new item in our keychain.</p>
<p>Open <span class="system-font dark">Keychain Access.app</span> in the <span class="system-font">/Applications/Utilities</span> folder:</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6971955511/" title="View 'Keychain Access showing keychain list with login keychain selected' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm8.staticflickr.com/7190/6971955511_a0c3431d18.jpg" alt="Keychain Access showing keychain list with login keychain selected" width="226" height="270" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Keychain Access showing keychain list with login keychain selected</p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Ensure the login keychain is selected and press <span class="system-font">⌘N</span> to create a new password item:</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6971955877/" title="View 'Adding a new keychain item in Keychain Access' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm8.staticflickr.com/7195/6971955877_8dfb2cf117.jpg" alt="Adding a new keychain item in Keychain Access" width="383" height="355" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Adding a new keychain item in Keychain Access</p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Enter the <span class="gui-text-font">Keychain Item Name</span>. I&#8217;ve used <span class="gui-input-font">MAMP</span>, but it can be anything. Enter the <span class="gui-text-font">Account Name</span> and <span class="gui-text-font">Password</span> you use to login into your computer and click <span class="gui-text-font">Add</span>.</p>
<p>The two alternatives methods I mentioned earlier for accessing the keychain using AppleScript are Red Sweater&#8217;s <a href="http://www.red-sweater.com/blog/2035/usable-keychain-scripting-for-lion" target="_blank">Usable Keychain Scripting</a> and the <span class="system-font">security</span> command in Terminal.</p>
<p>Using Usable Keychain Scripting the following AppleScript will grab the <span class="gui-text-font">Account Name</span> and <span class="gui-text-font">Password</span> for the keychain item named <span class="gui-input-font">MAMP</span> and assign each to a variable:</p>
<pre class="brush: applescript; wrap-lines: false;">
tell application &quot;Finder&quot;

	# get the user name and password using Usable Keychain Scripting
	tell application &quot;Usable Keychain Scripting&quot;

		set theKeyList to every generic item of current keychain whose name is &quot;MAMP&quot;

		repeat with x from 1 to (length of theKeyList)
			set theKey to item x of theKeyList
			set theUserName to the account of theKey
			set thePassword to password of theKey
		end repeat

	end tell

end tell
</pre>
<p class="post-image-caption">AppleScript to obtain user name and password using Usable Keychain Scripting</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>The same can be achieved using the <span class="system-font">security</span> command in Terminal:</p>
<pre class="brush: applescript; wrap-lines: false;">
tell application &quot;Finder&quot;

	# get the user name and password using the security Terminal command
	set theUserName to do shell script (&quot;security  find-generic-password -l \&quot;MAMP\&quot; | grep \&quot;acct\&quot; | cut -c 19-99 | tr -d '\&quot;'&quot;)
	set thePassword to do shell script (&quot;security 2&gt;&amp;1 &gt;/dev/null find-generic-password -gl \&quot;MAMP\&quot; | cut -c 11-99 | tr -d '\&quot;'&quot;)

end tell
</pre>
<p class="post-image-caption">AppleScript to obtain user name and password using the security command in Terminal</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>I prefer using the <span class="system-font">security</span> command so I&#8217;ll include this method in my AppleScript as opposed to Usable Keychain Scripting though the latter will function just as well.</p>
<p>Substituting the plain text <span class="system-font">PASSWORD</span> and <span class="system-font">USERNAME</span> from the original AppleScript for their respective variables: <span class="system-font">thePassword</span> and <span class="system-font">theUserName</span>, we can use the following AppleScript:</p>
<pre class="brush: applescript; wrap-lines: false;">
tell application &quot;Finder&quot;

	# get the user name and password using the security Terminal command
	set theUserName to do shell script (&quot;security  find-generic-password -l \&quot;MAMP\&quot; | grep \&quot;acct\&quot; | cut -c 19-99 | tr -d '\&quot;'&quot;)
	set thePassword to do shell script (&quot;security 2&gt;&amp;1 &gt;/dev/null find-generic-password -gl \&quot;MAMP\&quot; | cut -c 11-99 | tr -d '\&quot;'&quot;)

	# Start MAMP's Apache server
	do shell script &quot;/Applications/MAMP/bin/startApache.sh &amp;&quot; password thePassword user name theUserName with administrator privileges

	# Start MAMP's MySQL server
	do shell script &quot;/Applications/MAMP/bin/startMysql.sh &gt; /dev/null 2&gt;&amp;1&quot;

end tell
</pre>
<p class="post-image-caption">AppleScript to start MAMP&#8217;s Apache and MySQL servers using the security command in Terminal</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Save this AppleScript as an AppleScript application and add it to the user&#8217;s Login Items and MAMP&#8217;s Apache and MySQL servers will be up and running when user login is complete.</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6845610758" title="View 'Start MAMP Servers Applescript application added to Login Items' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm8.staticflickr.com/7066/6845610758_7e350d62fd.jpg" alt="Start MAMP Servers Applescript application added to Login Items" width="460" height="365" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Start MAMP Servers Applescript application added to Login Items</p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Run this AppleScript now and you&#8217;ll be prompted with the following:</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6991842841" title="View 'Authorisation for the security command to access the &#39;MAMP&#39; keychain item' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm8.staticflickr.com/7044/6991842841_630e4c1ce8.jpg" alt="Authorisation for the security command to access the &#39;MAMP&#39; keychain item" width="434" height="184" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Authorisation for the security command to access the &#39;MAMP&#39; keychain item</p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Clicking <span class="gui-text-font">Always Allow</span> will ensure this prompt won&#8217;t appear each time the user logs in. Opening the Access Control panel for the MAMP keychain item in Keychain Access shows the security command added to the list of authorised applications:</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6845723880" title="View 'Access Control panel for the &#39;MAMP&#39; keychain item' on Flickr.com"  target="_blank"></p>
<div class="frame">
			<img src="http://farm8.staticflickr.com/7180/6845723880_a71185eb6f.jpg" alt="Access Control panel for the &#39;MAMP&#39; keychain item" width="500" height="325" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Access Control panel for the &#39;MAMP&#39; keychain item</p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>While this AppleScript will suffice I&#8217;ve included some other functionality in the final version.</p>
<p>This code uses a user-defined function to ensure that MAMP&#8217;s Apache and MySQL servers are only started if no other instances of Apache or MySQL are currently running:</p>
<pre class="brush: applescript; wrap-lines: false; gutter: false;">
tell application &quot;Finder&quot;

	# Check if the Apache or MySQL servers are already running
	set apacheRunning to my ProcessRunning(&quot;httpd&quot;)
	set mysqlRunning to my ProcessRunning(&quot;mysqld&quot;)

end tell

on ProcessRunning(processName)

	set AppleScript's text item delimiters to &quot;\\|&quot;
	set theExpression to processName as string
	set AppleScript's text item delimiters to &quot;&quot;

	set isRunning to every paragraph of (do shell script &quot;ps -acwx -o command | grep -ix &quot; &amp; quoted form of theExpression &amp; &quot; || echo 'false'&quot;)

	if isRunning contains &quot;false&quot; then
		return false
	else
		return true
	end if

end ProcessRunning
</pre>
<p class="post-image-caption">AppleScript to determine if Apache and MySQL are currently running</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>This code starts the MAMP control panel and then hides it after a short delay:</p>
<pre class="brush: applescript; wrap-lines: false; gutter: false;">
tell application &quot;MAMP&quot;
	activate
	delay 3
end tell

tell application &quot;System Events&quot; to set visible of process &quot;MAMP&quot; to false
</pre>
<p class="post-image-caption">AppleScript to open and then hide MAMP.app</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>The final version in its entirety:</p>
<pre class="brush: applescript; wrap-lines: false;">
tell application &quot;Finder&quot;

	# Check if the Apache or MySQL servers are already running
	set apacheRunning to my ProcessRunning(&quot;httpd&quot;)
	set mysqlRunning to my ProcessRunning(&quot;mysqld&quot;)

	# If neither the Apache nor MySQL servers are already running...
	if (not apacheRunning and not mysqlRunning) then

		# get the user name and password using the security Terminal command
		set theUserName to do shell script (&quot;security  find-generic-password -l \&quot;MAMP\&quot; | grep \&quot;acct\&quot; | cut -c 19-99 | tr -d '\&quot;'&quot;)
		set thePassword to do shell script (&quot;security 2&gt;&amp;1 &gt;/dev/null find-generic-password -gl \&quot;MAMP\&quot; | cut -c 11-99 | tr -d '\&quot;'&quot;)

		# Start MAMP's Apache server
		do shell script &quot;/Applications/MAMP/bin/startApache.sh &amp;&quot; password thePassword user name theUserName with administrator privileges

		# Start MAMP's MySQL server
		do shell script &quot;/Applications/MAMP/bin/startMysql.sh &gt; /dev/null 2&gt;&amp;1&quot;

		tell application &quot;MAMP&quot;
			activate
			delay 3
		end tell

		tell application &quot;System Events&quot; to set visible of process &quot;MAMP&quot; to false

	else

		if (apacheRunning and mysqlRunning) then

			set theMessage to &quot;Both Apache and MySQL servers are&quot;

		else if apacheRunning then

			set theMessage to &quot;The Apache server is&quot;

		else if mysqlRunning then

			set theMessage to &quot;The MySQL server is&quot;

		end if

		display alert &quot;Local Server Environment&quot; message theMessage &amp; &quot; already running.&quot; &amp; return &amp; return buttons {&quot;OK&quot;} default button 1 giving up after 50 as critical

	end if

end tell

on ProcessRunning(processName)

	set AppleScript's text item delimiters to &quot;\\|&quot;
	set theExpression to processName as string
	set AppleScript's text item delimiters to &quot;&quot;

	set isRunning to every paragraph of (do shell script &quot;ps -acwx -o command | grep -ix &quot; &amp; quoted form of theExpression &amp; &quot; || echo 'false'&quot;)

	if isRunning contains &quot;false&quot; then
		return false
	else
		return true
	end if

end ProcessRunning
</pre>
<p class="post-image-caption">Final version of AppleScript to start MAMP&#8217;s Apache and MySQL servers at login</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p>Hat Tip: <a href="http://hints.macworld.com/article.php?story=20100421070605258" target="_blank">Start MAMP at login without password request</a> at Mac OS X Hints and <a href="http://macscripter.net/viewtopic.php?id=37996" target="_blank">How can I find out if certain processes (multiple) are running?</a> at MacScripter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/local-server/starting-mamps-apache-mysql-servers-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the MySQL Root User Password in MAMP</title>
		<link>http://www.tech-otaku.com/local-server/changing-mysql-root-user-password-mamp/</link>
		<comments>http://www.tech-otaku.com/local-server/changing-mysql-root-user-password-mamp/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 06:05:18 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Local Server]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[os-x]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1606</guid>
		<description><![CDATA[Having recently changed my local testing server environment from XAMPP to MAMP v2.0.5 I wanted to change the password for the MySQL root user. By default it&#8217;s set to root. Changing the MySQL password for the root user was straightforward enough, but locating and editing the files to reflect the new password was a different ...]]></description>
			<content:encoded><![CDATA[<p>Having recently changed my local testing server environment from XAMPP to MAMP v2.0.5 I wanted to change the password for the MySQL <span class="system-font">root</span> user. By default it&#8217;s set to <span class="system-font">root</span>.</p>
<p>Changing the MySQL password for the <span class="system-font">root</span> user was straightforward enough, but locating and editing the files to reflect the new password was a different story. <a href="http://www.mamp.info/en/documentation/faq.html#q9" target="_blank">Information</a> on MAMP&#8217;s own site appeared incomplete and other documentation I found, while helpful, was for versions of MAMP prior to version 2.</p>
<p><span id="more-1606"></span>
<p>Please note that these instructions are for the free version of MAMP not MAMP Pro.</p>
<p>To change the MySQL password for <span class="system-font">root</span> ensure that MAMP&#8217;s MySQL server is running then open <span class="system-font dark">Terminal</span> and type:</p>
<pre class="brush: plain; gutter: false; wrap-lines: false;">
&nbsp;
/Applications/MAMP/Library/bin/mysqladmin -u root -p password
&nbsp;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>You&#8217;ll be prompted for the current root password:</p>
<pre class="brush: shell; gutter: false; wrap-lines: false;">
&nbsp;
Enter password:CURRENTPASSWORD
&nbsp;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>Enter a new password for root and confirm:</p>
<pre class="brush: shell; gutter: false; wrap-lines: false;">
&nbsp;
New password:NEWPASSWORD
Confirm new password:NEWPASSWORD
&nbsp;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>Next, all the occurrences of the old password <span class="system-font">root</span> need to be changed to the new password <span class="system-font">NEWPASSWORD</span> in the following files. For files marked <span class="system-font dark">*</span> an easy way to locate the old password is to search for the string <span class="system-font">-proot</span> where <span class="system-font">-p</span> is the password option and <span class="system-font">root</span> is the old password.</p>
<p>File: <span class="system-font">/Applications/MAMP/bin/checkMysql.sh</span><span class="system-font dark"> *</span></p>
<pre class="brush: shell; wrap-lines: false; first-line: 1;">
# /bin/sh
/Applications/MAMP/Library/bin/mysqlcheck --all-databases --check --check-upgrade -u root -pNEWPASSWORD --socket=/Applications/MAMP/tmp/mysql/mysql.sock
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>File: <span class="system-font">/Applications/MAMP/bin/quickCheckMysqlUpgrade.sh</span><span class="system-font dark"> *</span></p>
<pre class="brush: shell; wrap-lines: false; first-line: 1;">
# /bin/sh
/Applications/MAMP/Library/bin/mysqlcheck --quick --check-upgrade -u root -pNEWPASSWORD --socket=/Applications/MAMP/tmp/mysql/mysql.sock mysql
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>File: <span class="system-font">/Applications/MAMP/bin/repairMysql.sh</span><span class="system-font dark"> *</span></p>
<pre class="brush: shell; wrap-lines: false; first-line: 1;">
# /bin/sh
/Applications/MAMP/Library/bin/mysqlcheck --all-databases --repair -u root -pNEWPASSWORD --socket=/Applications/MAMP/tmp/mysql/mysql.sock
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>File: <span class="system-font">/Applications/MAMP/bin/stopMysql.sh</span><span class="system-font dark"> *</span></p>
<pre class="brush: shell; wrap-lines: false; first-line: 1;">
# /bin/sh
/Applications/MAMP/Library/bin/mysqladmin -u root -pNEWPASSWORD --socket=/Applications/MAMP/tmp/mysql/mysql.sock shutdown
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>File: <span class="system-font">/Applications/MAMP/bin/upgradeMysql.sh</span><span class="system-font dark"> *</span></p>
<pre class="brush: shell; wrap-lines: false; first-line: 1;">
# /bin/sh
/Applications/MAMP/Library/bin/mysql_upgrade -u root -pNEWPASSWORD --socket=/Applications/MAMP/tmp/mysql/mysql.sock --force
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>File: <span class="system-font">/Applications/MAMP/bin/mamp/index.php</span></p>
<pre class="brush: php5; wrap-lines: false; first-line: 4;">
$port = '3306';
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'NEWPASSWORD');
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>File: <span class="system-font">/Applications/MAMP/bin/phpMyAdmin/config.inc.php</span></p>
<pre class="brush: php5; wrap-lines: false; first-line: 85;">
$cfg['Servers'][$i]['user']             ='root';            // MySQL user
$cfg['Servers'][$i]['password']         ='NEWPASSWORD';     // MySQL password (only needed
                                                            // with 'config' auth_type)
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p>Finally, stop and restart MAMP&#8217;s MySQL server to complete the password change.</p>
<p>Purely for cosmetic purposes you may also want to update MAMP&#8217;s start page to reflect the changed password. The English version of this file is <span class="system-font">/Applications/MAMP/bin/mamp/English/index.php</span>:</p>
<pre class="brush: php5; wrap-lines: false; first-line: 32; highlight: [47, 51, 64, 72];">
						&lt;table class=&quot;mysql&quot;&gt;
							&lt;tr&gt;
								&lt;th&gt;Host&lt;/th&gt;
								&lt;td&gt;localhost&lt;/td&gt;
							&lt;/tr&gt;
							&lt;tr&gt;
								&lt;th&gt;Port&lt;/th&gt;
								&lt;td&gt;3306&lt;/td&gt;
							&lt;/tr&gt;
							&lt;tr&gt;
								&lt;th&gt;User&lt;/th&gt;
								&lt;td&gt;root&lt;/td&gt;
							&lt;/tr&gt;
							&lt;tr&gt;
								&lt;th&gt;Password&lt;/th&gt;
								&lt;td&gt;NEWPASSWORD&lt;/td&gt;
							&lt;/tr&gt;
						&lt;/table&gt;
						&lt;h3&gt;Example:&lt;/h3&gt;
						&lt;pre&gt;$link = mysql_connect('localhost', 'root', 'NEWPASSWORD');&lt;/pre&gt;
						&lt;p&gt;or you can connect using an UNIX Socket:&lt;/p&gt;
						&lt;table class=&quot;mysql&quot;&gt;
							&lt;tr&gt;
								&lt;th&gt;Socket&lt;/th&gt;
								&lt;td&gt;/Applications/MAMP/tmp/mysql/mysql.sock&lt;/td&gt;
							&lt;/tr&gt;
							&lt;tr&gt;
								&lt;th&gt;User&lt;/th&gt;
								&lt;td&gt;root&lt;/td&gt;
							&lt;/tr&gt;
							&lt;tr&gt;
								&lt;th&gt;Password&lt;/th&gt;
								&lt;td&gt;NEWPASSWORD&lt;/td&gt;
							&lt;/tr&gt;
						&lt;/table&gt;
						&lt;h3&gt;Example:&lt;/h3&gt;
						&lt;pre&gt;
						$link = mysql_connect(
						  ':/Applications/MAMP/tmp/mysql/mysql.sock',
						  'root',
						  'NEWPASSWORD'
						);
						&lt;/pre&gt;
</pre>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
<p class="line-break">&nbsp;</p>
<p><!-- This is a line break. --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/local-server/changing-mysql-root-user-password-mamp/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Resolving a Static Hostname to a Dynamic IP Address Using DynDNS Free</title>
		<link>http://www.tech-otaku.com/networking/resolving-static-hostname-dynamic-ip-address-dyndns-free/</link>
		<comments>http://www.tech-otaku.com/networking/resolving-static-hostname-dynamic-ip-address-dyndns-free/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 07:52:34 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ip-address]]></category>
		<category><![CDATA[LAN]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1351</guid>
		<description><![CDATA[There are occasions when we want to make a computer on a home/local area network (LAN) accessible externally on the Internet. For example, remotely connecting to a LAN computer using SSH or remotely accessing a web site residing on a LAN computer. Before seeing what potential difficulties this creates and how to overcome them, let&#8217;s ...]]></description>
			<content:encoded><![CDATA[<p>There are occasions when we want to make a computer on a home/local area network (LAN) accessible externally on the Internet. For example, remotely connecting to a LAN computer using SSH or remotely accessing a web site residing on a LAN computer.</p>
<p><span id="more-1351"></span>
<p>Before seeing what potential difficulties this creates and how to overcome them, let&#8217;s take a look at a typical home network and how it communicates with the outside world.</p>
<p>I use the terms <i>home network</i> and <i>LAN</i> interchangeably and for the purposes of this article they can be considered one and the same.</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6236014570" title="View 'A Home/Local Area Network (LAN)' on Flickr.com" target-"_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6106/6236014570_c1b85c8872_b.jpg" alt="A Home/Local Area Network (LAN)" width="600" height="478" />
		</div>
<p>	</a></p>
<p class="post-image-caption">A Home/Local Area Network (LAN)</p>
</div>
<p class="line-break">&nbsp;</p>
<p>At the network&#8217;s centre is the router. To the right, in the diagram above, are the devices connected wirelessly or wired to the router which make-up the home network.</p>
<p>To identify them on the LAN, the router and each device are assigned a unique dynamic or <a href="http://www.tech-otaku.com/networking/assigning-locally-networked-computer-static-ip-address-mac-os-x/" target="_blank">static</a> IP address, in this case in the range <span class="system-font">192.168.1.1</span> to <span class="system-font">192.168.1.200</span>. These IP addresses are private and are only recognised within the LAN itself. The IP address <span class="system-font">192.168.1.1</span> is usually reserved for the router.</p>
<p>To provide Internet access to devices on the LAN, the router is typically connected to a modem supplied by the ISP. The router is given a second IP address by the ISP to identify it externally on the Internet e.g. <span class="system-font">123.45.67.8</span>. However, unlike its internal private IP address which is static, the router&#8217;s external public IP address is often dynamic.</p>
<p>In combination with a method known as <a href="http://en.wikipedia.org/wiki/Port_forwarding" target="_blank"><i>port forwarding*</i></a> we need only enter the router&#8217;s external public IP address in a browser i.e. <span class="system-font">http://123.45.67.8</span> to remotely access the home network over the Internet.</p>
<p>There are two disadvantages to using the router&#8217;s external public IP address. The first, is that it can be difficult to remember. The second, and more important, is that it is most likely a dynamic IP address and will therefore change over time. Keeping track of a dynamic IP address can be difficult. Here&#8217;s where services such as those provided Dyn come in.
<p>Using their free <a href="http://dyn.com/dns/dyndns-free/" target="_blank">DynDNS Free</a> service allows you to keep track of your router&#8217;s difficult to remember, dynamic public IP address with a more memorable static hostname.</p>
<p>After signing-up for an account at <a href="https://www.dyndns.com/account/entrance/?via=topnav" target="_blank">Dyn</a> head over to the DynDNS Free <a href="https://www.dyndns.com/account/services/hosts/add.html" target="_blank">configuration page</a>.</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6237253892" title="View 'DynDNS Free Configuration Page' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6215/6237253892_0128174db3.jpg" alt="DynDNS Free Configuration Page" width="500" height="451" />
		</div>
<p>	</a></p>
<p class="post-image-caption">DynDNS Free configuration page</p>
</div>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<p><b>1</b>. Enter the hostname you want to use up to a maximum of 24 characters. From the drop-down menu on the right you can choose suffixes other than <span class="system-font">dyndns.info</span>.</p>
<p><b>2</b>. Ensure that for service type <i>Host with IP address</i> is selected.</p>
<p><b>3</b>. The configuration page will show your router&#8217;s current external public IP address. Click the link to use this one or enter another valid IP address.</p>
<p><b>4</b>. Click the <i>Add To Cart</i> button and follow the on-screen instructions to complete the configuration and activate your hostname. Don&#8217;t be put off by <i>Add To Cart</i>. Like its name suggests, DynDNS Free is free.</p>
<p>With the new hostname activated there&#8217;s a second step to the process.</p>
<p>The hostname <span class="system-font">xxxxxx.dyndns.info</span> when entered in a browser will resolve to the router&#8217;s external public IP address as it was when the hostname was originally activated  i.e. <span class="system-font">123.45.67.8</span>. If this is a dynamic IP address, when it changes to say <span class="system-font">123.45.67.890</span> the hostname <span class="system-font">xxxxxx.dyndns.info</span> will still resolve to the original IP address and not the new one.</p>
<p>To overcome this, download one of the <a href="http://dyn.com/support/clients/" target="_blank">DynDNS Updaters</a> and install it on one of the computers on your home network. Add your Dyn account to the DynDNS updater and it will periodically check your router&#8217;s external public IP address. If it detects that the IP address has changed, it sends the new IP address to the hostname in your Dyn account.</p>
<p class="line-break">&nbsp;</p>
<p class="line-break">&nbsp;</p>
<div class="fancy_box fancy-box-post">* NOTE: The process of <a href="http://en.wikipedia.org/wiki/Port_forwarding" target="_blank">port forwarding</a> or port mapping is beyond the scope of this article. I mention it only to highlight that having a hostname resolve to your router&#8217;s external public IP address is not all that&#8217;s required to make a locally networked computer accessible over the Internet.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/networking/resolving-static-hostname-dynamic-ip-address-dyndns-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assigning a Locally Networked Computer a Static IP Address in Mac OS X</title>
		<link>http://www.tech-otaku.com/networking/assigning-locally-networked-computer-static-ip-address-mac-os-x/</link>
		<comments>http://www.tech-otaku.com/networking/assigning-locally-networked-computer-static-ip-address-mac-os-x/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 07:30:07 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[ip-address]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[local-network]]></category>
		<category><![CDATA[os-x]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1282</guid>
		<description><![CDATA[Each computer connected to a local network is assigned a dynamic IP address. On occasion it&#8217;s useful, if not essential, to assign a static IP address instead. As an example, port forwarding requires the destination computer on a local network to have a static IP address. Using OS X Lion 10.7.1, I&#8217;ll describe two ways ...]]></description>
			<content:encoded><![CDATA[<p>Each computer connected to a local network is assigned a dynamic IP address. On occasion it&#8217;s useful, if not essential, to assign a static IP address instead. As an example, <a href="http://en.wikipedia.org/wiki/Port_forwarding" target="_blank">port forwarding</a> requires the destination computer on a local network to have a static IP address.</p>
<p>Using OS X Lion 10.7.1, I&#8217;ll describe two ways of assigning a static IP address to a computer on a local network.</p>
<p><span id="more-1282"></span>
<p class="line-break">&nbsp;</p>
<div class="content-heading-number"></div>
<h3 class="content-heading-text">Using DHCP With a Manual Address</h3>
<p>The first method uses the Network preference pane in System Preferences.</p>
<p>Open <i>System Preferences</i> and click <i>Network</i>.</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6225594853" title="View 'Network preference pane in System Preferences' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6221/6225594853_fa8798a9d8.jpg" alt="Network preference pane in System Preferences" width="500" height="434" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Network preference pane in System Preferences</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>1</b>. Before continuing, you may need to authenticate by clicking the lock icon.</p>
<p><b>2</b>. The current services are listed on the left of the Network preference pane. I have a wireless network so I select the active Wi-Fi service.</p>
<p><b>3</b>. To continue click <i>Advanced…</i></p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6227814851" title="View 'TCP/IP tab showing computer&#39;s dynamically assigned IP address using DHCP' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6036/6227814851_9482366251.jpg" alt="TCP/IP tab showing computer's dynamically assigned IP address using DHCP" width="500" height="389" />
		</div>
<p>	</a></p>
<p class="post-image-caption">TCP/IP tab showing computer&#8217;s dynamically assigned IP address using DHCP</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>4</b>. On the TCP/IP tab the computer is shown as having an IP Address of <span class="system-font">192.168.1.99</span> dynamically assigned using DHCP.</p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6227839999" title="View 'Assigning a static IP address using DHCP with manual address' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6101/6227839999_1508c0256f.jpg" alt="Assigning a static IP address using DHCP with manual address" width="500" height="389" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Assigning a static IP address using DHCP with manual address</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>5</b>. From the drop-down menu select <i>Using DHCP with manual address</i>. This allows a static IP Address to be assigned to the computer. Here, I&#8217;ve entered <span class="system-font">192.168.1.2</span>.</p>
<p><b>6</b>.Click <i>OK</i> to return to the Network preference pane.</p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6227873701" title="View 'Network preference pane before changes are applied' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6222/6227873701_1c049df9dc.jpg" alt="Network preference pane before changes are applied" width="500" height="434" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Network preference pane before changes are applied</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>7</b>. The all important step I sometimes forget. Remember to click <i>Apply</i> to save the changes. The computer now has a static IP address on the local network.</p>
<p class="line-break">&nbsp;</p>
<div class="content-heading-number"></div>
<h3 class="content-heading-text">DHCP Reservations</h3>
<p>The second method uses a router to reserve a static IP address for an individual computer. The method described here uses an Airport Extreme 802.11n wireless router.</p>
<p>First, we need to find the computer&#8217;s unique MAC (Media Access Control) address.</p>
<p>Open <i>System Preferences</i> and click <i>Network</i>.</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228139883" title="View 'Network preference pane in System Preferences' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6237/6228139883_bc19862625.jpg" alt="Network preference pane in System Preferences" width="500" height="434" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Network preference pane in System Preferences</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>1</b>. Select the currently active service listed on the left of the Network preference pane.</p>
<p><b>2</b>. To continue click <i>Advanced…</i></p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228766378" title="View 'Hardware tab showing the computer&#39;s MAC Address' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6236/6228766378_c5a65cbabc.jpg" alt="Hardware tab showing the computer's MAC Address" width="500" height="389" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Hardware tab showing the computer&#8217;s MAC Address</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>3</b>. The Hardware tab shows the computer&#8217;s MAC (Media Access Control) address in the format <span class="system-font">xx:xx:xx:xx:xx:xx</span>. Make a note of it for later.</p>
<p><b>4</b>. To return to the Network preference pane click <i>Cancel</i>.</p>
<p class="line-break">&nbsp;</p>
<p>I&#8217;ll be using AirPort Utility to configure the Airport Extreme.</p>
<p>Open <i>AirPort Utility</i> located in Applications > Utilities.</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228906898" title="View 'Initial screen of AirPort Utility' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6034/6228906898_6525ece2d6.jpg" alt="Initial screen of AirPort Utility" width="500" height="323" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Initial screen of AirPort Utility</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>5</b>. Click on <i>Manual Setup</i> to continue.</p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228907638" title="View 'DHCP tab showing DHCP reservations' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6224/6228907638_9c513632ca.jpg" alt="DHCP tab showing DHCP reservations" width="500" height="358" />
		</div>
<p>	</a></p>
<p class="post-image-caption">DHCP tab showing DHCP reservations</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>6</b>. Click the <i>Internet</i> icon.</p>
<p><b>7</b>. On the DHCP tab click <i>+</i> to add a DHCP reservation.</p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228908590" title="View 'Initial screen of the DHCP Reservation Setup Assistant' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6034/6228908590_a30e881e00.jpg" alt="Initial screen of the DHCP Reservation Setup Assistant" width="400" height="250" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Initial screen of the DHCP Reservation Setup Assistant</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>8</b>. Add a description for the reservation.</p>
<p><b>9</b>. Ensure that <i>MAC Address</i> is selected to reserve the IP address.</p>
<p><b>10</b>. Click <span class="system-font">Continue</span> to go to the next screen of DHCP Reservation Setup Assistant.</p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228393467" title="View 'Final screen of the DHCP Reservation Setup Assistant' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6163/6228393467_f33258ec13.jpg" alt="Final screen of the DHCP Reservation Setup Assistant" width="400" height="250" />
		</div>
<p>	</a></p>
<p class="post-image-caption">Final screen of the DHCP Reservation Setup Assistant</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>11</b>. Enter the computer&#8217;s MAC address obtained earlier in the format <span class="system-font">xx:xx:xx:xx:xx:xx</span>.</p>
<p><b>12</b>. Enter an IP address you want assigned to the computer. Note that it&#8217;s only possible to change the fourth and final series of numbers.</p>
<p><b>13</b>. Click <span class="system-font">Done</span> to return to the DHCP tab.</p>
<p class="line-break">&nbsp;</p>
<div class="post-image-frame">
	<a href="http://www.flickr.com/photos/38071845@N06/6228910220" title="View 'DHCP tab before applying updates' on Flickr.com" target="_blank"></p>
<div class="frame">
			<img src="http://farm7.static.flickr.com/6238/6228910220_4e1d4e8acf.jpg" alt="DHCP tab before applying updates" width="500" height="358" />
		</div>
<p>	</a></p>
<p class="post-image-caption">DHCP tab before applying updates</p>
</div>
<p class="line-break">&nbsp;</p>
<p><b>14</b>. Enter more IP addresses for other computers on the local network if desired. Then Click <span class="system-font">Update</span> to apply the changes and assign the computer(s) a static IP address.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/networking/assigning-locally-networked-computer-static-ip-address-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OS X Lion and Re-opening Full-Screen Applications. Hit or Miss?</title>
		<link>http://www.tech-otaku.com/mac-os-x/os-x-lion-re-opening-full-screen-applications-hit-miss/</link>
		<comments>http://www.tech-otaku.com/mac-os-x/os-x-lion-re-opening-full-screen-applications-hit-miss/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 22:42:12 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[os-x]]></category>

		<guid isPermaLink="false">http://www.tech-otaku.com/?p=1152</guid>
		<description><![CDATA[A much touted feature of OS X Lion is the ability to use applications in full-screen mode. It&#8217;s easy enough to make an already open application full-screen, but I&#8217;ve had limited success re-opening applications full-screen using the initial public 10.7.0 release of Lion. To put an open application into full-screen mode, simply click the arrows ...]]></description>
			<content:encoded><![CDATA[<p>A much touted feature of OS X Lion is the ability to use applications in full-screen mode. It&#8217;s easy enough to make an already open application full-screen, but I&#8217;ve had limited success <i>re-opening</i> applications full-screen using the initial public 10.7.0 release of Lion.</p>
<p><span id="more-1152"></span>
<p>To put an open application into full-screen mode, simply click the arrows in the top-right corner of the application&#8217;s window.</p>
<div class="post-image-frame">
<div class="frame">
		<img src="http://farm7.static.flickr.com/6140/6006955676_cca3dbe2e4.jpg" alt="" width="500" height="86" />
	</div>
</div>
<p class="line-break">&nbsp;</p>
<p>However, re-opening an application in full-screen appears not so straight forward.</p>
<p>My understanding is that if you want an application to re-open in full-screen mode you mustn&#8217;t quit the full-screen application using <span class="system-font">command-Q</span>. Instead, you need to navigate to the Desktop, <span class="system-font">control-click</span> the application icon in the Dock and click Quit. It appears also that you need to do this every time you want the application to re-open in full-screen mode.</p>
<p>However, this seems a little inconsistent. Take Mail for example.</p>
<p>Open Mail in non full-screen mode and open, say, the Activity window (Window > Activity). Now put Mail into full-screen mode and launch Mission Control. You&#8217;ll see that as a full-screen application Mail occupies its own space. Mail&#8217;s Activity window, however, is shown on the Desktop.</p>
<div class="post-image-frame">
<div class="frame">
		<img src="http://farm7.static.flickr.com/6004/5997699257_1047bdf22d.jpg" alt="" width="600" height="375" />
	</div>
</div>
<p class="line-break">&nbsp;</p>
<p>Quit Mail while in full-screen using the method described above and you&#8217;d expect Mail to re-open full-screen. It doesn&#8217;t. Why? I suspect it has something to do with the Mail&#8217;s Activity window.</p>
<p>So, close the Activity window first before putting Mail into full-screen mode. Now quit Mail using its Dock icon. Open Mail and it&#8217;s full-screen.</p>
<p>I&#8217;ve experienced the same problem when Mail&#8217;s Preferences window is open, but not with Mail&#8217;s Photo Browser nor Address Panel windows. The same is true of Safari with either the Preferences or Activity windows open. iTunes however seems to suffer no such problem. It re-opens in full-screen regardless of which windows were open. Odd.</p>
<p>Whether this is expected behaviour or a bug, the way to have a fair chance of applications re-opening in full-screen mode is to close any additional application windows first.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tech-otaku.com/mac-os-x/os-x-lion-re-opening-full-screen-applications-hit-miss/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

