<?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>Zenovation's Blog &#187; Tools</title>
	<atom:link href="http://zenovations.com/blog/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://zenovations.com/blog</link>
	<description>A blog about web design, programming, hosting, and virtualmin hacks</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:01:54 +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>remote debugging PHP for a single virtualhost with PhpStorm and xdebug</title>
		<link>http://zenovations.com/blog/2011/07/remote-debugging-php-for-a-single-virtualhost-with-phpstorm-and-xdebug/</link>
		<comments>http://zenovations.com/blog/2011/07/remote-debugging-php-for-a-single-virtualhost-with-phpstorm-and-xdebug/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 01:16:30 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpstorm]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=231</guid>
		<description><![CDATA[I struggled for several days to set up remote debugging. I wanted to be able to remotely debug a single virtualhost on my CentOS server using my local IDE (PhpStorm) and xdebug. Since this took me quite a while to figure out, I thought I&#8217;d include the steps here for others. Installing Xdebug Over SSH, [...]]]></description>
			<content:encoded><![CDATA[<p>I struggled for several days to set up remote debugging. I wanted to be able to remotely debug a single virtualhost on my CentOS server using my local IDE (<a href="http://www.jetbrains.com/phpstorm/">PhpStorm</a>) and <a href="http://xdebug.org/">xdebug</a>.</p>
<p>Since this took me quite a while to figure out, I thought I&#8217;d include the steps here for others.</p>
<h2>Installing Xdebug</h2>
<p>Over SSH, I ran the following:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code8'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2318"><td class="code" id="p231code8"><pre class="bash" style="font-family:monospace;">$ pecl <span style="color: #c20cb9; font-weight: bold;">install</span> xdebug</pre></td></tr></table></div>

<h2>Configuring Xdebug in php.ini</h2>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code9'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2319"><td class="code" id="p231code9"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #666666; font-style: italic;">; Module Settings ;</span>
<span style="color: #666666; font-style: italic;">;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #000099;">zend_extension</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/usr/lib/php/modules/xdebug.so</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>xdebug<span style="">&#93;</span></span>
xdebug.remote_enable<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
xdebug.remote_port<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">9000</span>
xdebug.idekey<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">PHPSTORM-XDEBUG</span>
xdebug.remote_connect_back<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Date<span style="">&#93;</span></span></pre></td></tr></table></div>

<p>Note the use of zend_extension; as of PHP 5.3, this is the only one that works (extension=&#8230;) will appear to function, but never connect!</p>
<p>Also, I used xdebug.remote_connect_back=1 &#8211; this allows connections from anywhere. But since I&#8217;ve configured my server to load a separate php.ini for each site (sorry, this is outside the scope of this discussion), and the entire site is under development and protected by .htaccess, I didn&#8217;t have to worry about other people debugging remotely.</p>
<p>An alternative to using remote_connect_back is to specify the remote_host to your <a href="http://www.whatsmyip.org/">local ip address</a>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code10'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23110"><td class="code" id="p231code10"><pre class="ini" style="font-family:monospace;">xdebug.remote_host<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">0.0.0.0 </span><span style="color: #666666; font-style: italic;">;your ip address</span>
<span style="color: #666666; font-style: italic;">;xdebug.remote_connect_back=0</span></pre></td></tr></table></div>

<p><strong> Alternative: Loading via .htaccess instead of php.ini</strong></p>
<p>Alternately, I could have dropped a .htaccess file into my root directory for the virtualhost, if the php.ini for each site were too much trouble:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code11'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23111"><td class="code" id="p231code11"><pre class="ini" style="font-family:monospace;">php_value  zend_extension<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/usr/lib/php/modules/xdebug.so</span>
php_flag   xdebug.remote_enable on
php_value  xdebug.remote_port <span style="">9000</span>
php_value  xdebug.idekey PHPSTORM-XDEBUG
php_flag   xdebug.remote_connect_back on</pre></td></tr></table></div>

<h2>Configuring PhpStorm</h2>
<p>I followed <a href="http://blogs.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/">these instructions</a> to the letter. Make sure you set up the &#8220;PHP Remote Debug&#8221; and not the &#8220;PHP Server&#8221; option if you&#8217;re using my list here as a guide (both work, I just chose the remote)</p>
<p>Remember to get those IDEKEY values to match up in the editor and on the server!</p>
<h2>Configure Firewalls</h2>
<p>On CentOS, I use apf, so I configured my firewall by adding port 9000 into the following settings: IG_TCP_PORTS, EG_TCP_PORTS</p>
<p>Then I restarted apf:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code12'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23112"><td class="code" id="p231code12"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apf restart</pre></td></tr></table></div>

<p>At home, I opened a connection in my firewall by adding a redirect for port 9000 to my personal PC.</p>
<h2>Starting it Up</h2>
<p>Remember to reload Apache&#8217;s config!</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code13'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23113"><td class="code" id="p231code13"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>httpd reload</pre></td></tr></table></div>

<p>Make sure PhpStorm is set to break on first line, or you won&#8217;t know if it worked! (you need the debugger to get involved):</p>
<p><a href="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1800_03.png"><img class="alignnone size-full wp-image-234" title="2011-07-09-1800_03" src="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1800_03.png" alt="" width="554" height="259" /></a></p>
<p>&nbsp;</p>
<p>Start the PhpStorm Remote Debug:<br />
<a href="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1752_01.png"><img class="alignnone size-full wp-image-232" title="2011-07-09-1752_01" src="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1752_01.png" alt="" width="400" height="132" /></a></p>
<p>&nbsp;</p>
<p>Make sure to click the &#8220;listen for connections&#8221; icon!</p>
<p><a href="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1755_02.png"><img class="alignnone size-full wp-image-233" title="2011-07-09-1755_02" src="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1755_02.png" alt="" width="502" height="131" /></a></p>
<p>A quick note on semantics here: It is not technically necessary to have the debug server running and &#8220;listen for connections&#8221; clicked. Listen for connections will, in fact, start the debugger when an incoming connection is received. However, for initial testing, having the debugger actually ON was very helpful in being sure PhpStorm wasn&#8217;t failing to start incoming connections.</p>
<p>&nbsp;</p>
<p>Connect to your IP address from the web server to make sure it can talk to your IDE:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code14'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23114"><td class="code" id="p231code14"><pre class="bash" style="font-family:monospace;">$ telnet 0.0.0.0 <span style="color: #000000;">9000</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p>Add <strong>XDEBUG_SESSION_START=PHPSTORM-XDEBUG</strong> in the URL of the site to initiate a connection:</p>
<p><a href="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1804_05.png"><img class="alignnone size-full wp-image-236" title="2011-07-09-1804_05" src="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1804_05.png" alt="" width="396" height="164" /></a></p>
<p>&nbsp;</p>
<p>Witness debugging in all its glory!</p>
<p><a href="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1807_06.png"><img class="alignnone size-full wp-image-237" title="2011-07-09-1807_06" src="http://zenovations.com/blog/wp-content/uploads/2011/07/2011-07-09-1807_06.png" alt="" width="625" height="162" /></a></p>
<p>&nbsp;</p>
<h2>Browser Plugins</h2>
<p>There are browser plugins for <a href="https://chrome.google.com/webstore/detail/eadndfjplgieldjbigjakmdgkmoaaaoc" target="_blank">Chrome </a>and <a href="https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/" target="_blank">Firefox </a>that make remote connections a breeze; you no longer have to type the parms into the URL. I&#8217;ve used both of these with success and highly recommend this simplification.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/07/remote-debugging-php-for-a-single-virtualhost-with-phpstorm-and-xdebug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind Mapping Software: Mindomo</title>
		<link>http://zenovations.com/blog/2009/07/mind-mapping-software-mindomo/</link>
		<comments>http://zenovations.com/blog/2009/07/mind-mapping-software-mindomo/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 15:56:43 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=129</guid>
		<description><![CDATA[Mindomo is a great, free product for mind mapping. You can utilize it online for free to create some great looking and functional maps. There is also a pro version at the great price of $6/month, which provides a desktop version, allowing you to store the files locally and organize with folders and sharing capabilities. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mindomo.com" alt="visit mindomo site" title="visit mindomo site"><img src="http://zenovations.com/blog/wp-content/uploads/2009/07/mindomo_home_logo-300x159.gif" width="300" height="159" class="size-medium wp-image-131" /></a><a href="http://mindomo.com/comparison_chart.htm"></p>
<p>Mindomo</a> is a great, free product for <a href="http://en.wikipedia.org/wiki/Mind_map">mind mapping</a>. You can utilize it online for free to create some great looking and functional maps.</p>
<p>There is also a pro version at the great price of $6/month, which provides a desktop version, allowing you to store the files locally and organize with folders and sharing capabilities.</p>
<p>With the upcoming addition of collaboraiton, and there continual efforts to improve the product, it&#8217;s quickly becoming a great brainstorming and outlining tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2009/07/mind-mapping-software-mindomo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The ZDvorak Keyboard Layout</title>
		<link>http://zenovations.com/blog/2009/02/the-zdvorak-keyboard-layout/</link>
		<comments>http://zenovations.com/blog/2009/02/the-zdvorak-keyboard-layout/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 14:15:18 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[keyboard]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=69</guid>
		<description><![CDATA[After learning dvorak, and trying several programmer variants, I decided to build my own flavor. I did this for several reasons: Regular dvorak doesn&#8217;t improve the symbol locations for programming, and makes some of them even harder to reach. I didn&#8217;t like the position of the U and I characters and read studies that show switching them [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>After learning dvorak, and trying several programmer variants, I decided to build my own flavor.</p>
<p><span id="more-69"></span></p>
<p>I did this for several reasons:</p>
<ul>
<li>Regular dvorak doesn&#8217;t improve the symbol locations for programming, and makes some of them even harder to reach.</li>
<li>I didn&#8217;t like the position of the U and I characters and read <a title="see the DDvorak notes" href="http://www.codeaxe.co.uk/dvorak/Default.aspx">studies</a> that show switching them improves finger travel.</li>
<li>For development, the placement of [], {}, and () were unbearable.</li>
<li>I write novels as well, and none of the developer variants place quote keys and dash in a convenient spot.</li>
</ul>
<p>So, using the <a href="http://www.microsoft.com/globaldev/tools/msklc.mspx">Microsoft Keyboard Layout Creator</a>, here&#8217;s what I grew over a month&#8217;s worth of tweaking (click for a larger view):</p>
<p><a href="http://michaelwulf.com/blog/wp-content/uploads/2009/02/zdvorak1.png"><img class="aligncenter size-medium wp-image-439" title="zdvorak1" src="http://michaelwulf.com/blog/wp-content/uploads/2009/02/zdvorak1-300x140.png" alt="zdvorak1" width="300" height="140" /></a></p>
<p>The highlights:</p>
<ul>
<li>U and I switched from classic dvorak</li>
<li>Number keys moved so most frequent used on strongest fingers</li>
<li>Number keys switched with symbols for easier development, assumes that long numbers would use the numeric keypad anyways</li>
<li>Caps lock key shifts number line, for easy numeric entry</li>
<li>; and : &#8211;used incessantly in programming, easier to reach instead of jammed on the old z key</li>
<li>&#8216; and &#8221; get their own keys (no shift to press for them &#8211; benefits programming and writing)</li>
<li>% and ^ symbol get the hardest to reach keys, but they are hardly used in writing or programming, so great</li>
</ul>
<p>You can <a title="Download ZDvorak Layout" href="/downloads/zdvorak.zip">download this layout</a>, including printable images and the source file (allowing for your own tweaks) as a zip file. Enjoy!</div>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2009/02/the-zdvorak-keyboard-layout/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

