<?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>superfancy &#187; Coding</title>
	<atom:link href="http://superfancy.net/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://superfancy.net</link>
	<description>version .02: slowly getting there</description>
	<lastBuildDate>Thu, 13 May 2010 05:22:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash Media Server</title>
		<link>http://superfancy.net/coding/flash-media-server/</link>
		<comments>http://superfancy.net/coding/flash-media-server/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 05:27:26 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash media server]]></category>
		<category><![CDATA[influxis]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=214</guid>
		<description><![CDATA[I originally published this earlier this year on a blog related to my day job that I decided to retire. I’m republishing it here for the sake of posterity&#8230;
So here in WA State we have a new law going into effect on 6/12 that&#8217;s called the Distressed Properties Law. It will profoundly change how REALTORS&#174; [...]]]></description>
			<content:encoded><![CDATA[<p><em>I originally published this earlier this year on a blog related to my day <a href="http://www.warealtor.org">job</a> that I decided to retire. I’m republishing it here for the sake of posterity&#8230;</em></p>
<p>So here in WA State we have a new law going into effect on 6/12 that&#8217;s called the Distressed Properties Law. It will profoundly change how REALTORS&reg; deal with foreclosures. To put it lightly, it has been a big deal for us getting our membership educated on the finer details and protocols called for in this new law.</p>
<p>At Washington REALTORS&reg;, our Communications and IT departments are one and the same. I&#8217;m usually involved in bringing certain aspects of our PR campaigns to the web. The Distressed Properties campaign has been no different.</p>
<p><span id="more-214"></span></p>
<p>For those of you who attended the Tech Directors Conference in March, particularly those who took part in the Podcasting breakout group, may remember me mentioning the <a href="http://www.adobe.com/products/flashmediastreaming/" title="Adobe's Flash Media Server Page">Flash Media Server</a> (FMS) hosting we use for our streaming media. There are a handful of companies out there that specialize in Flash Media hosting&#8230; we use a company called <a href="http://www.influxis.com" title="Influxis Home">Influxis</a>.</p>
<p>So getting back to the Distressed Properties campaign, we produced an hour long DVD for Broker&#8217;s to share with agents. We kind of decided as an afterthought that I should prepare a streaming version of the DVD in six chapters for viewing on <a href="http://www.warealtor.org" title="WA REALTORS&reg; Home">warealtor.org</a>. So I went ahead and did this last week and officially published it last Thursday (5/29). We have a pretty stripped down account with Influxis that allows for a modest 40 concurrent streams. </p>
<p>So fast forward to Monday morning&#8230; we start getting calls from members that they are having issues watching the video. I naively open up my FMS Admin Console and immediately notice our total connections are pegged at 40! We did not anticipate the tremendous response at all! So I was immediately on the phone with Influxis upgrading our account to handle the huge demand. After a quick reboot of my Virtual Host, we were able to host 100 simultaneous streams. Quick and painless for the most part. </p>
<p>But demand kept increasing throughout the day yesterday and overnight so I upgraded again this morning to allow for 200 simultaneous streams! Thankfully working with FMS is pretty easy and Influxis makes upgrading your service a snap as well. It really saved us (me!) a lot of stress.</p>
<p>I realized if we had attempted to host the video locally on our web server it would&#8217;ve been toast! There&#8217;s just no way it would be able to keep up with demand&#8230; we use a Windows 2K3 Server which has no business streaming content! That&#8217;s the beauty of using FMS&#8230; it&#8217;s built specifically to stream Flash files. Not that you can&#8217;t host streaming Flash on a generic Linux or Windows server; it can be done but you run the risk of staring down the barrel of a serious crash. Take my word for it.</p>
<p>So next time your association needs to use streaming media, definitely take a look a Flash Media Server. It could save the day and save you a lot of headaches.</p>
<p>You can also buy the FMS software and run it locally if you are so inclined. </p>
<p><em><strong>Do you have any experiences with Flash Media Server?</strong></em></p>
<p>Resources:<br />
<a href="http://www.adobe.com/products/flashmediastreaming/">Adobe&#8217;s Flash Media Server Page</a><br />
<a href="http://www.influxis.com">Influxis Flash Media Hosting</a><br />
<a href="http://flowplayer.org">Flowplayer: Flash Video Player for the Web</a></p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/flash-media-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Add-ons: Web Developer Toolbar</title>
		<link>http://superfancy.net/coding/firefox-add-ons-web-developer-toolbar/</link>
		<comments>http://superfancy.net/coding/firefox-add-ons-web-developer-toolbar/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 05:25:30 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web developer toolbar]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=211</guid>
		<description><![CDATA[I originally published this earlier this year on a blog related to my day job that I decided to retire. I&#8217;m republishing it here for the sake of posterity&#8230;
I must say I spend the vast majority of my day in Firefox which is probably the case for many web developer types out there. It is [...]]]></description>
			<content:encoded><![CDATA[<p><em>I originally published this earlier this year on a blog related to my day <a href="http://www.warealtor.org">job</a> that I decided to retire. I&#8217;m republishing it here for the sake of posterity&#8230;</em></p>
<p>I must say I spend the vast majority of my day in Firefox which is probably the case for many web developer types out there. It is the <em>de facto</em> browser for development for a myriad of reasons&#8230; adherence to <a title="W3C" href="http://www.w3.org/" target="_blank">W3C</a> standards (for the most part) being the biggest. But I think what gets me most excited about <a title="FireFox Home" href="http://www.mozilla.com/en-US/firefox/" target="_blank">Firefox</a> is the mind boggling array of add-ons available to developers. The foremost of which, in my opinion, is <a title="Web Developer Toolbar" href="http://chrispederick.com/work/web-developer/" target="_blank">Chris Pedrick&#8217;s Web Developer Toolbar</a>.</p>
<p>This add-on has so many amazing features that I will only introduce you to a few that I use regularly&#8230; ones that can save you huge amounts of time in debugging and help make your development cycle more efficient in general.</p>
<p><span id="more-211"></span>So yeah, I could gush all day about how much I love <a title="FireFox Home" href="http://www.mozilla.com/en-US/firefox/" target="_blank">Firefox</a> but many of you are likely aware of the power FF packs under it&#8217;s hood. Discovering the Web Developer Toolbar a couple of years ago was akin to a spiritual awakening for me&#8230; majorly geeky I know.</p>
<p>If you&#8217;re a standards practicing developer using <acronym title="Cascading Style Sheets">CSS</acronym> to control the presentation of your projects, Web Developer has some amazing features for you. The one that gets my vote for slickest is <strong>Edit CSS&#8230;</strong> which allows you to edit the CSS on your page, or any web page for that matter, in REAL TIME! <img style="padding: 10px;" title="Edit CSS" src="http://realtortech.org/wp-content/uploads/2008/05/edit_css.jpg" alt="Edit Css" width="500" height="349" /></p>
<p>I can&#8217;t tell you how many times I&#8217;ve used this to demo different hex colors or font family&#8217;s in a layout. But the fun doesn&#8217;t stop there. You can edit whole sections of your layout and see the changes right there without having to edit your style sheet and uploading the changes. Pretty sweet!</p>
<p>A lot of times when I&#8217;m randomly surfing and I come across a page that piques my CSS curiosity I&#8217;ll often use the <strong>View CSS</strong> feature to peruse the page&#8217;s style sheet(s). This is great to check out what sorts of techniques other folks are using in their CSS&#8230; essentially it can be a nice educational tool.</p>
<p>Lets move on and look at Web Developer&#8217;s image features&#8230;</p>
<p>Taking a look at the image menu, you can see what&#8217;s at your fingertips. The feature I use most is <strong>View Image Information</strong>. It&#8217;ll display every single image on a given web page and inform you of its properties&#8230; including height, width, file size and any alt properties. <img style="padding: 10px 10px 10px 0;" title="Image Information" src="http://realtortech.org/wp-content/uploads/2008/05/image_info.jpg" alt="Image Information" width="500" height="385" /></p>
<p>Again not only is this useful on your own projects but seeing how other sites are sliced and diced with images is a great learning tool. One other image feature worth mentioning is <strong>Replace Images With Alt Attributes</strong>. This&#8217;ll allow you to toggle on and off all image content in your page to check, for example, how things shape up in a non-visual web browser&#8230; like one a sight-impaired user may use to view your page.</p>
<p>Another very powerful Web Developer Toolbar feature within the <em>Information</em> menu is <strong>Display Element Information</strong>. This is what sold me when I first started using Web Developer. <img style="padding: 10px 0 10px 10px;" title="Display Element Info" src="http://realtortech.org/wp-content/uploads/2008/05/display_element_info.jpg" alt="Display Element Info" width="500" height="340" /></p>
<p>Essentially you can think of it as a <acronym title="Document Object Model">DOM</acronym> inspector sort of deal that traverses the DOM for each individual block level element on your page and displays the relationships with its parent and sibling elements. If you look above the tab bar in the photo you&#8217;ll see a the box that displays the cascade beginning at HTML and traversing all the way down to your selected element. In addition, a dialogue box (the yellow box in the photo) will appear and tell just about anything you&#8217;d want to know about any element in your page. Way cool!</p>
<p>Remember the <strong>Edit CSS</strong> feature I told you about? Well a complementary feature also exists for HTML, appropriately called <strong>Edit HTML</strong> which is accessible under the <em>Miscellaneous</em> menu. <img style="padding: 10px 10px 10px 0;" title="Edit HTML" src="http://realtortech.org/wp-content/uploads/2008/05/edit_html.jpg" alt="Edit HTML" width="500" height="347" /></p>
<p>This also lets you edit your HTML in real time and preview changes without messing with your text editor and ftp client. It&#8217;s kind of similar to the &#8220;Try-It-Yourself Demos&#8221; over at <a title="W3 Schools" href="http://www.w3schools.com" target="_blank">W3Schools</a>. So if you&#8217;ve used that before you&#8217;ll be right at home with <strong>Edit HTML</strong> in Web Developer.</p>
<p>Finally I&#8217;d like to touch on the window resizing features in Web Developer. Clicking on <em>Resize</em>, you&#8217;ll be presented with options to resize your browser window to an exact width and height. A fresh install of Web Developer will come with the option to resize to 800&#215;600&#8230; the old school web design resolution standard. I added 1024&#215;768 as that is the resolution I design for these days. <img style="padding: 10px 10px 10px 0;" title="Resize Browser Window" src="http://realtortech.org/wp-content/uploads/2008/05/resize.jpg" alt="Resize Browser Window" width="500" height="385" /></p>
<p>This feature is so simple yet so powerful that I can&#8217;t believe this isn&#8217;t a standard feature on all web browsers. Anyway you can easily create any resize dimensions you want by clicking <strong>Edit Resize Dimensions&#8230;</strong> and going through the set-up. You could also theoretically set up the browser window to roughly mimic the size of a mobile device, like an iPhone or Blackberry. The resize feature in conjunction with the <strong>Display CSS By Media Type</strong> feature (allowing you to view your Mobile Style sheet) can really help when optimizing for mobile devices. The iPhone / iPod Touch however are changing things for the better as the Safari browser on those devices completely ignores Mobile style sheets and basically displays as a mini version of a desktop browser. Designing for mobile devices is really tricky&#8230; in fact sometimes a plain (x)HTML document is the most effective way to go.</p>
<p>Well this only scratches the surface of what the <a title="Web Developer Toolbar" href="http://chrispederick.com/work/web-developer/" target="_blank">Web Developer Toolbar</a> is capable of. I&#8217;m continually finding new uses for it so I think the best thing to do, like most things, is to just experiment. I&#8217;ve found it to be a huge productivity enhancer and it plays a large part in the development of every project I do.</p>
<p>Web Developer is available for Firefox on both Mac and Windows. You won&#8217;t be disappointed!</p>
<p><strong>Download Resources:</strong></p>
<p><a title="Mozilla Web Developer Download" href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer page at Mozilla.org</a></p>
<p><a title="Chris Pedrick's Web Developer Download" href="http://chrispederick.com/work/web-developer/" target="_blank">Chris Pedrick&#8217;s Web Developer page</a></p>
<p>This post is first in a series dedicated to Firefox Add-ons. Hope you enjoyed this first installment.</p>
<p><strong>How do you use the Web Developer Toolbar?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/firefox-add-ons-web-developer-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Image Editing With Picnik!</title>
		<link>http://superfancy.net/coding/easy-image-editing-with-picnik/</link>
		<comments>http://superfancy.net/coding/easy-image-editing-with-picnik/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 05:17:22 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[image editing]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[picnik]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=202</guid>
		<description><![CDATA[I originally published this earlier this year on a blog related to my day job that I decided to retire. I&#8217;m republishing it here for the sake of posterity&#8230;
So I don&#8217;t know about you but I do a lot of image editing and optimization in my everyday web development tasks. Typically, in times past, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p><em>I originally published this earlier this year on a blog related to my day <a href="http://www.warealtor.org">job</a> that I decided to retire. I&#8217;m republishing it here for the sake of posterity&#8230;</em></p>
<p>So I don&#8217;t know about you but I do a lot of image editing and optimization in my everyday web development tasks. Typically, in times past, I&#8217;ve used Adobe <a title="Fireworks CS3" href="http://www.adobe.com/fireworks" target="_blank">Fireworks CS3</a> and Adobe <a title="Photoshop CS3" href="http://www.adobe.com/photoshop" target="_blank">Photoshop CS3</a> for these activities. I&#8217;m still a heavy Fireworks user (I just love the CS3 update) but sometimes I want to do some quick and dirty editing without having to deal with the overhead of a desktop app (Photoshop I&#8217;m looking at you!). Enter <a title="picnik.com" href="http://picnik.com" target="_blank">Picnik</a>.</p>
<p><span id="more-202"></span></p>
<p>So what is <a title="picnik.com" href="http://picnik.com" target="_blank">Picnik</a>?</p>
<p>Well it&#8217;s an online photo editor with easy to use but powerful editing tools, all from a user-friendly interface in your web browser. All you have to do to get started is upload an image.</p>
<p>I first found out about <a title="picnik.com" href="http://picnik.com" target="_blank">Picnik</a> about this time last year.  Bitnik, the company behind Picnik, is a small operation based in Seattle run by a few ex-Microsoft employees. In the short time they&#8217;ve been around Picnik has gone through some pretty awesome changes. When I first started using it, it was pretty basic and still in beta. You could resize, crop, adjust color balance, apply a select few filter effects, apply a border, and a few other useful things.</p>
<p>Throughout 2007 they kept enhancing <a title="picnik.com" href="http://picnik.com" target="_blank">Picnik</a> to the point that it was beginning to rival some of the most major features of Photoshop. All while remaining user-friendly and easily accessible for even a neophyte. Here&#8217;s a screenshot:</p>
<p><img src="http://www.fileden.com/files/2007/2/5/738890/picnik_ss1.png" alt="Picnik Screenshot" width="500" height="380" /></p>
<p>As you can see I used it to (partially) create the header image for <a title="realtortech.org" href="http://realtortech.org">realtortech.org</a>.</p>
<p>Some techniques in <a title="picnik.com" href="http://picnik.com" target="_blank">Picnik</a> are just a whole lot more straightforward than Photoshop. For example if you want to create nifty rounded corners on an image all you have to do is select &#8220;Rounded Edges&#8221; from the Frames menu:</p>
<p><img src="http://www.fileden.com/files/2007/2/5/738890/picnik_round.png" alt="Picnik Round" width="500" height="382" /></p>
<p>Pretty darn easy and a far cry from the annoyance of accomplishing the same technique in Photoshop.</p>
<p>Probably the coolest thing about <a title="picnik.com" href="http://picnik.com">Picnik</a> though is it&#8217;s <a title="FF Extension" href="http://www.picnik.com/info/tools" target="_blank">extension for Firefox</a> (and now <a title="IE Extension" href="http://www.picnik.com/info/tools" target="_blank">Internet Explorer</a>). This allows you to right-click on any image you find on the web and load it in the Picnik app for editing!</p>
<p>There are so many things you can do and this really only scratches the surface of Picnik&#8217;s functionality.</p>
<p>Many of Picnik&#8217;s features are available for free but to use some of the extended features you need to sign up for a premium account, which I would highly recommend. It&#8217;s cheap too&#8230;only $24.95 a year.</p>
<p>Overall, <a title="picnik.com" href="http://picnik.com" target="_blank">Picnik</a> is a great workflow enhancer and can save a lot of time when you need to do basic to moderately advanced image manipulations.</p>
<p>What are your favorite alternative image editing tools?</p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/easy-image-editing-with-picnik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing mod_mcpage</title>
		<link>http://superfancy.net/coding/introducing-mod_mcpage/</link>
		<comments>http://superfancy.net/coding/introducing-mod_mcpage/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 19:31:38 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Daily Koz]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=180</guid>
		<description><![CDATA[My buddy Jeremy Bingham, CTO for Daily Kos, just released a new caching patch called mod_mcpage for lighttpd. He can describe it better than me&#8230; read his post about it on Daily Koz.
]]></description>
			<content:encoded><![CDATA[<p>My buddy <a href="http://time.to.pullthepl.ug/">Jeremy Bingham</a>, CTO for <a href="http://www.dailykos.com/">Daily Kos</a>, just released a new caching patch called mod_mcpage for <a href="http://www.lighttpd.net/">lighttpd</a>. He can describe it better than me&#8230; read his <a href="http://www.dailykos.com/story/2008/9/29/13317/3981/898/614381">post</a> about it on <a href="http://www.dailykos.com/">Daily Koz</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/introducing-mod_mcpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple customization of Wordpress Sidebar Login Plugin</title>
		<link>http://superfancy.net/coding/simple-customization-wordpress-sidebar-login-plugin/</link>
		<comments>http://superfancy.net/coding/simple-customization-wordpress-sidebar-login-plugin/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 23:49:08 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Codex]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Sidebar Login]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=128</guid>
		<description><![CDATA[I came across this great Wordpress plugin yesterday called Sidebar Login. Like the name says, it lets you place a login form in your WordPress sidebar so you can bypass the typical WP login screen. I thought the plugin would be a nice addition to a site I&#8217;m finishing up at work. Here&#8217;s what it [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this great <a href="http://wordpress.org">Wordpress</a> plugin yesterday called <a href="http://wordpress.org/extend/plugins/sidebar-login/">Sidebar Login</a>. Like the name says, it lets you place a login form in your WordPress sidebar so you can bypass the typical WP login screen. I thought the plugin would be a nice addition to a site I&#8217;m finishing up at work. Here&#8217;s what it looks like on my site:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/09/picture-1.png" alt="" title="Default Login Screen" width="269" height="263" class="alignnone size-full wp-image-129" /><br />
<span id="more-128"></span><br />
It pretty much works as advertised. Like most WP plugins it&#8217;s easy to install and activate. To bring it up in your sidebar, you use the nifty template tag:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php sidebarlogin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Simple enough. Though it does have one quirk I&#8217;d like to point out. When you login with Sidebar Login, it has a pleasant &#8220;welcome&#8221; greeting, followed by your Username. Like so:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/09/picture-2.png" alt="" title="Greeting" width="266" height="149" class="alignnone size-full wp-image-130" /></p>
<p>Kinda silly, huh? I think a better behavior for this would be to to use your &#8220;Display Name&#8221; so it&#8217;s a bit more personalized. So instead of in my case displaying &#8220;Admin,&#8221; it&#8217;ll display &#8220;Stevie,&#8221; which I have setup in the WP Dashboard:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/09/picture-3.png" alt="" title="Display Name" width="370" height="58" class="alignnone size-full wp-image-131" /></p>
<p>All it takes is a little consultation with the WordPress Codex to produce this helpful document, <a href="http://codex.wordpress.org/Function_Reference/get_userdata">Function Reference/get userdata</a> to find the info we need. </p>
<p>In the code to the plugin, on or around Line 26 there you&#8217;ll find this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$before_widget</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Welcome &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$user_info</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_login</span>  <span style="color: #339933;">.</span><span style="color: #000088;">$after_title</span><span style="color: #339933;">;</span></pre></div></div>

<p>What we need to do is change <code>$user_info->user_login</code> to use <code>$user_info->display_name</code>. Here is the complete revised line:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$before_widget</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$before_title</span> <span style="color: #339933;">.</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Welcome &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$user_info</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span>  <span style="color: #339933;">.</span><span style="color: #000088;">$after_title</span><span style="color: #339933;">;</span></pre></div></div>

<p>Enacting this change will now display your &#8220;Display Name&#8221; after you login. Problem solved:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/09/picture-4.png" alt="" title="Greeting" width="265" height="147" class="alignnone size-full wp-image-132" /></p>
<p>The documentation for this plugin is not very complete so I did a <a href="http://www.google.com">Google</a> search to see if others had this quandary. Much to my surprise I didn&#8217;t find anything so I thought I&#8217;d share what worked for me.</p>
<p>Thanks to the documentation at the WP Codex and reading through some PHP code, it was a quick solution. Take a look at the <a href="http://codex.wordpress.org/Function_Reference/get_userdata">document</a> at <a href="http://codex.wordpress.org/Main_Page">WP Codex</a> to further experiment with your greeting.</p>
<p>Also thanks to <a href="http://blue-anvil.com/about">Mike Jolley</a> and his excellent <a href="http://blue-anvil.com/archives/wordpress-sidebar-login-2-optimised-for-wordpress-26">Sidebar Login</a> plugin!</p>
<p><strong>Update 4/20/2009:</strong><br />
Sidebar Login has been updated so it now uses &#8220;Display Name&#8221; by default.</p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/simple-customization-wordpress-sidebar-login-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SQL Buddy: A MySQL admin utility</title>
		<link>http://superfancy.net/coding/sql-buddy-mysql-admin-utility/</link>
		<comments>http://superfancy.net/coding/sql-buddy-mysql-admin-utility/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 05:31:41 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=111</guid>
		<description><![CDATA[While browsing through my RSS feeds last week I came across a post over at WebResourcesDepot about this really slick MySQL admin utility called SQL Buddy. It&#8217;s written in PHP and Ajaxed to the max! And it&#8217;s free! Needless to say I downloaded and tested it out immediately.


SQL Buddy runs in a web browser just [...]]]></description>
			<content:encoded><![CDATA[<p>While browsing through my RSS feeds last week I came across a <a href="http://www.webresourcesdepot.com/ajaxed-mysql-admin-sql-buddy/">post</a> over at <a href="http://www.webresourcesdepot.com/">WebResourcesDepot</a> about this really slick MySQL admin utility called <a href="http://sqlbuddy.com/">SQL Buddy</a>. It&#8217;s written in PHP and Ajaxed to the max! And it&#8217;s free! Needless to say I downloaded and tested it out immediately.</p>
<p><span id="more-111"></span></p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-11.png" alt="SQL Buddy Screenshot" title="SQL Buddy Screenshot" width="500" height="375" class="alignnone size-full wp-image-112" /></p>
<p><a href="http://sqlbuddy.com/">SQL Buddy</a> runs in a web browser just like any other PHP app which is pretty cool. All you have to do is download the files, upload them to your webserver, and you&#8217;re off and running with pretty much zero configuration. And it&#8217;s even compatible with your browsers back and forward buttons!</p>
<p>It&#8217;s capable of just about everything that <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQL Administrator</a> can do. I&#8217;ve been enjoying its ease-of-use. Definitely a pleasant way to take care of everyday MySQL admin tasks. It&#8217;s certainly not as powerful as something like <a href="http://mysql.navicat.com/mac_detail.html">Navicat</a> but admirably does a handful of things well. Take it for a test drive.</p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/sql-buddy-mysql-admin-utility/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>MySQL Administrator on Mac OSX Leopard: A Few Tips and Tricks</title>
		<link>http://superfancy.net/coding/mysql-administrator-on-mac-osx-leopard-tips-and-tricks/</link>
		<comments>http://superfancy.net/coding/mysql-administrator-on-mac-osx-leopard-tips-and-tricks/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 05:52:44 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=80</guid>
		<description><![CDATA[I mentioned in my previous article I&#8217;d show a couple of MySQL Administrator tricks so here goes. Many programmers like to use Terminal to do all MySQL administration tasks. It&#8217;s a great skill to have and one that can be picked up pretty easily and quickly when you get comfortable working with MySQL. I prefer [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned in my previous <a href="http://www.steviebenge.com/coding/php-mysql-apache-in-mac-osx-leopard/">article</a> I&#8217;d show a couple of MySQL Administrator tricks so here goes. Many programmers like to use Terminal to do all MySQL administration tasks. It&#8217;s a great skill to have and one that can be picked up pretty easily and quickly when you get comfortable working with MySQL. I prefer to do everything visually so I can actually see what I&#8217;m doing. There&#8217;s no right or wrong way but a lot of advanced tasks require work in the Terminal. However GUI tools are perfect for everyday administration tasks.</p>
<p><span id="more-80"></span></p>
<h2>Getting started in MySQL Administrator</h2>
<p>I presume if you followed my previous article you downloaded the <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQL GUI Tools</a>, if not go ahead and download and install them. When you first open MySQL Administrator you&#8217;ll get a login screen:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/mysqladminlogin.png" alt="MySQL Admin Login" title="MySQL Admin Login" width="418" height="288" class="alignnone size-full wp-image-81" /></p>
<p>Where the button says &#8220;Skip&#8221; above it&#8217;ll say &#8220;Connect&#8221; for you&#8230; for some reason while taking screen shots it changed to &#8220;Skip.&#8221; Weird&#8230;</p>
<p>Working on the assumption that this is a fresh install of MySQL, you have not created a password for the &#8220;root&#8221; user. This is not a problem as you can easily do this after logging in to MySQL Adminstrator. Let&#8217;s not forget to tell MySQL Admininstrator where <code>mysql.sock</code> is located&#8230; expand &#8220;More Options&#8221; and put <code>/var/mysql/mysql.sock</code> in the box next to &#8220;Connect Using Socket.&#8221; So now the login screen should look like this:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/mysqladmin2.png" alt="MySQL Admin Screen" title="MySQL Admin Screen" width="415" height="371" class="alignnone size-full wp-image-82" /></p>
<p>Go ahead and hit &#8220;Connect&#8221; and you&#8217;re in:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/mysqladmininfo.png" alt="MySQL Admin Info" title="MySQL Admin Info" width="500" height="473" class="alignnone size-full wp-image-85" /></p>
<p>If you take a look at the icon&#8217;s up top you can begin to get an idea of what you can do with MySQL Administrator. You can run backups, monitor MySQL connections, view logs, create new databases and users, and a host of other things. Lets start off by assigning a password to &#8220;root&#8221; user. A little disclaimer&#8230; keep in mind that this is MySQL&#8217;s superuser of sorts and some people do not assign &#8220;root&#8221; a password. So with that out of the way, click on &#8220;Accounts&#8221; and highlight &#8220;root.&#8221; As you&#8217;ll see all you have to do is type a password in the box, then confirm it in the next box, then click &#8220;Save Changes:&#8221; </p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-41.png" alt="" title="MySQL Admin Accounts" width="500" height="395" class="alignnone size-full wp-image-87" /></p>
<h2>Adding a new MySQL user</h2>
<p>Since we&#8217;re already in the &#8220;Accounts&#8221; tab, lets go ahead and create a new MySQL user. All you need to do is press the &#8220;Add New User&#8221; button which is the first button in the bottom left corner:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-21.png" alt="Add New User" title="Add New User" width="334" height="117" class="alignnone size-full wp-image-88" /></p>
<p>So just type in the Login Information and press &#8220;Save Changes:&#8221;</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-1.png" alt="Login Info" title="Login Info" width="500" height="126" class="alignnone size-full wp-image-90" /></p>
<h2>Creating a new database</h2>
<p>So let&#8217;s move on and create a new database. Click on &#8220;Catalogs&#8221; and then the &#8220;Add&#8221; (aka +) symbol in the bottom left corner:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-31.png" alt="Add New Database" title="Add New Database" width="500" height="491" class="alignnone size-full wp-image-91" /></p>
<p>Name your new Schema (aka database) and press &#8220;Ok.&#8221; This creates an empty database ready for your next web application! I have a local installation of <a href="http://wordpress.org">WordPress</a> on my MacBook Pro so here is what that &#8220;Schema&#8221; looks like:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-42.png" alt="" title="Wordpress DB" width="499" height="396" class="alignnone size-full wp-image-92" /></p>
<p>So cool! Now we need to go back and assign privileges to the user we created in the previous step so the database can be accessed in an app.</p>
<h2>Assigning privileges to a user</h2>
<p>So go back to the &#8220;Accounts&#8221; panel, expand the user you previously created, and click on &#8220;Schema Privileges.&#8221; Directly underneath the User are a list of &#8220;hosts.&#8221; Since we&#8217;re just working locally, we&#8217;ll assign privileges to &#8220;localhost.&#8221; But feel free to add privileges to the other &#8220;hosts&#8221; for this user. This is probably the most confusing task you&#8217;ll do with MySQL Administrator so pay close attention. Highlight &#8220;localhost&#8221; and the &#8220;schema&#8221; you want to add user privileges to:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-5.png" alt="Schema Privileges" title="Schema Privileges" width="500" height="397" class="alignnone size-full wp-image-96" /></p>
<p>Now you need to select all (shift + click) the privileges you want to grant under &#8220;Available Privileges.&#8221; I just went ahead and gave myself all available privileges:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-61.png" alt="Available Privileges" title="Available Privileges" width="499" height="395" class="alignnone size-full wp-image-97" /></p>
<p>Next you&#8217;ll need to click the &#8220;Grant&#8221; button which is the one that has the &#8220;less than&#8221; character <code>&lt;</code>. Now the privileges you assigned will be in the &#8220;Assigned Privileges&#8221; column:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-71.png" alt="Assigned Privileges" title="Assigned Privileges" width="500" height="394" class="alignnone size-full wp-image-99" /></p>
<p>This was a head scratcher for me when I first started using MySQL Administrator. If you ever run into any difficulties just hover over the area you have questions about and usually a tool tip will appear. Now your database is ready to tag team with PHP in your web app of choice!</p>
<p>Well this should get you off and running with MySQL Administrator. I really only scratched the surface of things that can be done. Just click around and check stuff out&#8230; that&#8217;s pretty much how I learned. Have fun&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/mysql-administrator-on-mac-osx-leopard-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Setting up PHP, MySQL, and Apache in Mac OSX Leopard</title>
		<link>http://superfancy.net/coding/php-mysql-apache-in-mac-osx-leopard/</link>
		<comments>http://superfancy.net/coding/php-mysql-apache-in-mac-osx-leopard/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 05:23:22 +0000</pubDate>
		<dc:creator>Stevie</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.steviebenge.com/?p=33</guid>
		<description><![CDATA[One of the best features for web developers in Mac OSX Leopard is the inclusion of PHP and Apache. By default both are inactive and require you to get them ready for business. I will outline how to do this as well as get MySQL up and running so you can have a local development [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best features for web developers in <a href="http://www.apple.com/macosx/">Mac OSX Leopard</a> is the inclusion of <a href="http://www.php.net/">PHP</a> and <a href="http://www.apache.org/">Apache</a>. By default both are inactive and require you to get them ready for business. I will outline how to do this as well as get <a href="http://www.mysql.com/">MySQL</a> up and running so you can have a local development setup right on your Mac!</p>
<p>It&#8217;s all pretty easy to do but requires a little attention to detail in parts. So lets get started.</p>
<p><span id="more-33"></span><br />
Most of the files we&#8217;ll be working with are actually hidden from Finder. If you use a text editor like <a href="http://www.panic.com/coda/">Coda</a>, <a href="http://www.barebones.com/">BBedit</a>, <a href="http://www.barebones.com/products/textwrangler/">Text Wrangler</a>, or <a href="http://macromates.com/">TextMate</a> you can choose to have hidden files &#8220;shown&#8221; so you can find them in your file structure. I personally use Coda so all that you have to do is click on the &#8220;View&#8221; menu and choose Show Invisible Files, as illustrated below:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-2.png" alt="Coda: Show invisible Files" title="Coda: Show invisible Files" width="500" height="371" class="size-full wp-image-34" /></p>
<p>You can also run this simple Terminal command to &#8220;show&#8221; all hidden folders in Finder:</p>
<p><code>defaults write com.apple.finder AppleShowAllFiles TRUE</code></p>
<p>Then restart Finder by typing the following:</p>
<p><code>killall Finder</code></p>
<p>You should now be able to see all hidden files. </p>
<h2>PHP</h2>
<p>To enable PHP browse to Apache&#8217;s <code>http.conf</code> file located in <code>/etc/apache2/httpd.conf</code></p>
<p>Find this line:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#LoadModule php5_module libexec/apache2/libphp5.so</pre></div></div>

<p>All you need to do is uncomment the line by removing the hash <code>#</code> symbol.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LoadModule php5_module libexec/apache2/libphp5.so</pre></div></div>

<p>Now save <code>http.conf</code>. Don&#8217;t be alarmed if it asks for your system password&#8230; this is normal.</p>
<p>PHP 5.2.6 is the version shipped with Leopard. All the most popular extensions are already activated so you should be good to go. However if you need some of PHP&#8217;s extended features you may want to consider rebuilding PHP from source code as I&#8217;ve read the version that ships with Leopard has been problematic for some. I&#8217;ve never had any problems myself but it&#8217;s something to look out for. All relevant PHP settings are in the <code>php.ini</code> file. I won&#8217;t be covering any tweaks to that file in this article but you should be aware that it exists. By default, Leopard has an empty configuration file but provides a file which can be used as a template. From a new terminal window, type:</p>
<p><code>sudo cp /etc/php.ini.default /etc/php.ini</code></p>
<p>This creates your <code>php.ini</code> file, which is located in <code>/etc/php.ini</code> for your future reference.</p>
<p>You&#8217;ve now enabled PHP so lets move on to Apache.</p>
<h2>Apache</h2>
<p>Our friends at Apple were kind enough to ship a very modern version of Apache 2.2.6 for our development work. Kudos! To start up Apache click on the &#8220;Sharing&#8221; preference pane in System Preferences and enable &#8220;Web Sharing&#8221; like so:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-3.png" alt="Enable Web Sharing" title="Web Sharing" width="500" height="317" class="size-full wp-image-40" /></p>
<p>You can also use the following command the start Apache from Terminal:</p>
<p><code>sudo apachectl start</code></p>
<p>You&#8217;ll be prompted for your system password. Type it in and press enter.</p>
<p>If you need to restart Apache, this will do the trick:</p>
<p><code>sudo apachectl restart</code></p>
<p>Keep in mind any editing you do to the <code>http.conf</code> or to the <code>php.ini</code> will require a restart of Apache. You can use the above command or simply restart &#8220;Web Sharing&#8221; in System Preferences&#8230; it&#8217;s up to you.</p>
<h2>Testing PHP</h2>
<p>So now hopefully if everything has gone according to plan, we&#8217;ll see some fruits of our labor. Go back to the &#8220;Sharing&#8221; Preference Pane in System Preferences and click on the URL/ IP Address below &#8220;Your computer&#8217;s website.&#8221; If all goes well you&#8217;ll see a page that says &#8220;Test Page for Apache Installation.&#8221; You can also type <a href="http://localhost/">http://localhost/</a> in your browser which will take you to the same place. </p>
<p>Now in your text editor create a PHP file and type the following code:</p>
<p><code>&lt;?php phpinfo(); ?&gt;</code></p>
<p>Save it in <code>/Library/WebServer/Documents/</code> (start from the top level directory of your hard drive, not the Library directory in your home directory) with the name <code>test.php</code>.<br />
Now type <a href="http://localhost/test.php">http://localhost/test.php</a> in your browser and you should see something like this:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-4.png" alt="PHP Info" title="PHP Info" width="500" height="329" class="size-full wp-image-46" /></p>
<p>Great success!</p>
<h2>Setting up a personal website and virtual hosting</h2>
<p>If you&#8217;re the curious type and tried to click on &#8220;Your personal website&#8221; in the Web Sharing panel you may have noticed that you were greeted with a &#8220;Forbidden&#8221; message. So lets go ahead and set it up so you can serve up files from your &#8220;Sites&#8221; folder. Open up your text editor and create a file named after your &#8220;Home&#8221; folder. In my case it would be <code>StevieBenge.conf</code>. This file will live in <code>/etc/apache2/users/</code>. You&#8217;ll need to replace <code>StevieBenge</code> with the name of your &#8220;Home&#8221; directory. I&#8217;ve heard reports that this file is created automatically on new installs of Leopard but I had to create mine manually. Add the following code to the <code>.conf</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;directory &quot;/Users/StevieBenge/Sites/*/&quot;&gt;
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
&lt;/directory&gt;</pre></div></div>

<p>Like above, replace <code>StevieBenge</code> with the name of your “Home” directory. Save the file. This will allow Apache to serve files out of your &#8220;Sites&#8221; folder. Sweet! You&#8217;ll also need to restart Apache for this to take effect.</p>
<p>Moving right along, lets set up Apache for virtual hosts. Virtual hosts are essential if you want to serve multiple websites from your &#8220;Sites&#8221; folder. You can choose pretty much any &#8220;domain&#8221; name you want or mirror any production sites you have hosted on a live server. I like to name all of my local development sites with the extension <code>.dev</code> to keep easy track of things. Getting virtual hosts to work in Leopard was a huge stumbling block for me because of a lot of misinformation I read around the internet. I was was really happy to finally get this working. And as you&#8217;ll see it&#8217;s pretty straightforward.</p>
<p>So to get started, browse to <code>/etc/hosts</code> and add the following to the end of the file:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># Local aliases
127.0.0.1 steviebenge.dev</pre></div></div>

<p>Remember to change <code>steviebenge.dev</code> to the name of a site in your &#8220;Sites&#8221; folder. <code>127.0.0.1</code> is an IP Address that tells your Mac that your site is hosted locally. The site will only be accessible on your Mac. Now we&#8217;ll need to reopen the<code>.conf</code> file we created earlier in <code>/etc/apache2/users/</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;directory &quot;/Users/StevieBenge/Sites/*/&quot;&gt;
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
&lt;/directory&gt;
&nbsp;
NameVirtualHost *:80
&nbsp;
&lt;virtualhost *:80&gt;
    DocumentRoot /Users/StevieBenge/Sites/steviebenge.dev
    ServerName steviebenge.dev
&lt;/virtualhost&gt;</pre></div></div>

<p>Again make sure to change the directory structure above to reflect your &#8220;Home&#8221; folder and the folder within your &#8220;Sites&#8221; folder you want to serve files out of. Restart Apache for the changes to take effect. So to test it out and make sure everything&#8217;s working properly, go ahead and move the <code>test.php</code> created earlier into your new directory in your &#8220;Sites&#8221; folder. If it&#8217;s successful you&#8217;ll again see:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-4.png" alt="PHP Info" title="PHP Info" width="500" height="329" class="size-full wp-image-46" /></p>
<p>Too add more virtual hosts run through the above steps again. Simple as that!</p>
<h2>MySQL</h2>
<p>Now here is where the fun begins. It&#8217;s odd that Apple didn&#8217;t include MySQL with Leopard as it&#8217;s pretty much synonymous with PHP. Anyway, you have a couple options for installing MySQL on Leopard. You can roll your own and compile and install from source code or use MySQL&#8217;s package installer for Leopard. I won&#8217;t discuss how to compile MySQL here but I did find an excellent tutorial on how to do this over at Dan Benjamin&#8217;s <a href="http://hivelogic.com/articles/2007/11/installing-mysql-on-mac-os-x">Hivelogic</a> site. I came pretty close to giving this a shot but I opted for the MySQL package installer. Dan brings up many salient points on why it&#8217;s beneficial to compile your own install in his tutorial, so I&#8217;d highly recommend checking it out. </p>
<p>So head over to the <a href="http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg">MySQL</a> downloads page and grab a copy of the Mac OS X 10.5 (x86) installer (currently 5.0.67). You can also optionally download the <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQL GUI Tools</a>, which I would recommend as that is how I prefer to administrate MySQL. The Mac Installer is labeled MAC OSX 10.4 (Universal binaries) but, in my experience, it will work without issue on Leopard.</p>
<p>Install MySQL and the GUI Tools. There&#8217;s also a Preference Pane that you can install that allows MySQL to be stopped and started from System Preferences. Go ahead and install that as well.</p>
<p>After you install the MySQL Preference Pane, find it in System Preferences and start MySQL like so:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-6.png" alt="MySQL Preference Pane" title="MySQL Preference Pane" width="500" height="218" class="size-full wp-image-63" /></p>
<p>If you prefer starting MySQL from Terminal, you can do so with this command:</p>
<p><code>sudo /usr/local/mysql/support-files/mysql.server start</code></p>
<p>And you can use this command to stop MySQL:</p>
<p><code>sudo /usr/local/mysql/support-files/mysql.server stop</code></p>
<p>Now we&#8217;ll need to put the <code>mysql.sock</code> in the proper directory so MySQL can communicate with PHP.</p>
<h2>Getting MySQL and PHP to communicate</h2>
<p>The default location of <code>mysql.sock</code> is in the <code>/tmp/mysql.sock</code> directory. We&#8217;ll need to change this to <code>/var/mysql/mysql.sock</code> as this is where PHP will look for it.<br />
So first off, create a <code>my.conf</code> (or in this case <code>my.cnf</code>) file in your text editor and save it as <code>my.cnf</code> in the <code>/etc</code> folder with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[client]
socket = /var/mysql/mysql.sock
&nbsp;
[mysqld]
socket = /var/mysql/mysql.sock</pre></div></div>

<p>Next move <code>mysql.sock</code> to it&#8217;s new directory by typing the following code in a Terminal window:</p>
<p><code>sudo mkdir /var/mysql</code><br />
<code>sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock</code></p>
<p>Believe it or not, that&#8217;s pretty much it. One thing to keep in mind is the MySQL GUI Tools will still look for the <code>mysql.sock</code> in the old location so when you log in to MySQL Administrator enter <code>/var/mysql/mysql.sock</code> in the &#8220;Connect Using Socket&#8221; box under More Options:</p>
<p><img src="http://www.steviebenge.com/wp-content/uploads/2008/08/picture-7.png" alt="MySQL Administrator" title="MySQL Administrator" width="419" height="354" class="size-full wp-image-65" /></p>
<p>Now you&#8217;re ready to create your first MySQL Database. The MySQL Administrator makes this really easy, which I will cover in a future article. You can also administer your MySQL databases from Terminal. As I stated earlier, I prefer the GUI Tools but learning how to do things from Terminal is a useful skill to have. It&#8217;s totally up to you.</p>
<h2>Bonus Information</h2>
<p>I&#8217;ve read that you can also deal with the <code>mysql.sock</code> issue by editing the <code>mysql.default_socket =</code> line in your <code>php.ini</code> file to reflect the location of <code>mysql.sock</code>. I chose not to do this, but it may work for others</p>
<p>You may want to to change <code>php.ini</code> to report all PHP errors while you are in development. This can be done locating the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">error_reporting = E_ALL &amp; ~E_NOTICE</pre></div></div>

<p>And changing it to:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">error_reporting = E_ALL</pre></div></div>

<p>This is fine in your local development setup but of course not advised for a production server.</p>
<p>At the beginning of this article I illustrated how to &#8220;show&#8221; hidden files in Finder. Here&#8217;s that Terminal command again:</p>
<p><code>defaults write com.apple.finder AppleShowAllFiles TRUE</code><br />
<code>killall Finder</code></p>
<p>You can also &#8220;hide&#8221; those same hidden files with this command:</p>
<p><code>defaults write com.apple.finder AppleShowAllFiles FALSE</code><br />
<code>killall Finder</code></p>
<p>Another great resource for an all-in-one development setup is <a href="http://www.mamp.info/en/index.php">MAMP</a>. Using MAMP negates the need to do any of the above tweaking as it has its own versions of Apache, PHP, and MySQL. It&#8217;s perfect for those that want to get up and running quickly with a minimum of fuss.</p>
<h2>Conclusion</h2>
<p>Well this should get you started with PHP, MySQL, and Apache in Mac OSX Leopard. My inspiration for writing this article was to combine a lot of the information I read from other sites while getting my MacBook Pro set up. Many of the articles I came across were written around the time Leopard was released last Fall so some of the information was a bit out of date. Not that any of the above methods are terribly original on my part, but I&#8217;d like to credit some of the sources that helped me:</p>
<p><a href="http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/">procata.com</a>: This was the best resource I found and well worth checking out as it shows you how to install the <a href="http://pear.php.net/">PEAR</a> extension. Has some great tips that I didn&#8217;t cover here.</p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html">Installing MySQL on Mac OS X</a>: MySQL&#8217;s own how-to guide.</p>
<p><a href="http://adactio.com/journal/1395">adactio.com</a>: Jeremy Keith&#8217;s guide.</p>
<p><a href="http://foundationphp.com/tutorials/php_leopard.php">foundationphp.com</a>: Excellent screen shots with this PHP and Apache tutorial.</p>
<p>Thanks for reading and check back as I&#8217;ll be writing more articles about working with PHP, MySQL, and Apache. Feel free to keep the discussion going in the Comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://superfancy.net/coding/php-mysql-apache-in-mac-osx-leopard/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
	</channel>
</rss>
