<?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</title>
	<atom:link href="http://zenovations.com/blog/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.1</generator>
		<item>
		<title>Dealing with CSS unit conversions in jQuery (px to em to percentages)</title>
		<link>http://zenovations.com/blog/2012/01/dealing-with-css-unit-conversions-in-jquery-px-to-em-to-percentages/</link>
		<comments>http://zenovations.com/blog/2012/01/dealing-with-css-unit-conversions-in-jquery-px-to-em-to-percentages/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 14:59:01 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=267</guid>
		<description><![CDATA[I spent some time working on a plugin to convert px to em and percentages for the upcoming Wordspot site. The problem lies in the fact that measurements are based on the element they are attached to. Thus, to convert any CSS property (i.e. &#8220;5em&#8221; or &#8220;20%&#8221;) to pixels, one must determine what the relative [...]]]></description>
			<content:encoded><![CDATA[<p>I spent some time working on a plugin to convert px to em and percentages for the upcoming <a href="http://www.wordspot.org">Wordspot</a> site. </p>
<p>The problem lies in the fact that measurements are based on the element they are attached to. Thus, to convert any CSS property (i.e. &#8220;5em&#8221; or &#8220;20%&#8221;) to pixels, one must determine what the relative height of a single line of text is in pixels.</p>
<p>This tool creates an invisible child element, measures a single line of text, and uses that for measurements.</p>
<p>Thus, to convert 90% (or any measurement, for that matter) to pixels, you could do 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('p267code3'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2673"><td class="code" id="p267code3"><pre class="javascript" style="font-family:monospace;">   <span style="color: #003366; font-weight: bold;">var</span> borderRadiusPixels <span style="color: #339933;">=</span> $.<span style="color: #660066;">UnitConverter</span>.<span style="color: #660066;">px</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mydiv'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'border-top-left-radius'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><a href="/blog/misc/jquery.unitconverter.js.txt" title="UnitConverter source code">Here&#8217;s the source</a>.</p>
<p>For more advanced operations, you can do things like this:</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('p267code4'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2674"><td class="code" id="p267code4"><pre class="javascript" style="font-family:monospace;">   <span style="color: #006600; font-style: italic;">// create a new unit conversion</span>
   <span style="color: #003366; font-weight: bold;">var</span> measurement <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> $.<span style="color: #660066;">UnitConverter</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mydiv'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// load a value to be examined</span>
   measurement.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mydiv'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'border-left-width'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// add 10% to the height</span>
   measurement.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'10%'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// convert the measurement to various output types</span>
   <span style="color: #003366; font-weight: bold;">var</span> pxs <span style="color: #339933;">=</span> measurement.<span style="color: #660066;">px</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> ems <span style="color: #339933;">=</span> measurement.<span style="color: #660066;">convert</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'em'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> pct <span style="color: #339933;">=</span> measurement.<span style="color: #660066;">convert</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'%'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">// determine what the measurement would be in another element (i.e. with a different line height)</span>
   <span style="color: #003366; font-weight: bold;">var</span> clonePxs <span style="color: #339933;">=</span> measurement.<span style="color: #660066;">clone</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#nudderElement'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">px</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Hopefully this will give you a good head start on conquering similar issues, without having to invent any wheels!</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2012/01/dealing-with-css-unit-conversions-in-jquery-px-to-em-to-percentages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular expressions tester for your regex fiddling</title>
		<link>http://zenovations.com/blog/2012/01/regular-expressions-tester-for-your-regex-fiddling/</link>
		<comments>http://zenovations.com/blog/2012/01/regular-expressions-tester-for-your-regex-fiddling/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 20:48:43 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=265</guid>
		<description><![CDATA[I was teaching a good friend a bit about regular expressions and wrote up a regular expression tester. It was a blast to write and simple to implement. It&#8217;s all in one HTML page so you can download it and fiddle away. Hope it helps someone else as well: http://www.zenovations.com/blog/misc/regex.html]]></description>
			<content:encoded><![CDATA[<p>I was teaching a good friend a bit about regular expressions and wrote up a regular expression tester. It was a blast to write and simple to implement. It&#8217;s all in one HTML page so you can download it and fiddle away. Hope it helps someone else as well:</p>
<p>http://www.zenovations.com/blog/misc/regex.html</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2012/01/regular-expressions-tester-for-your-regex-fiddling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drawing a quote box with css</title>
		<link>http://zenovations.com/blog/2011/11/drawing-a-quote-box-with-css/</link>
		<comments>http://zenovations.com/blog/2011/11/drawing-a-quote-box-with-css/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 20:08:33 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=263</guid>
		<description><![CDATA[I recently searched El Goog for a way to drawing a quote box with only css and came across several ideas. Nicholas Gallagher had the simplest, and most compatible approach found during my quick surf, in his article titled &#8220;Pure CSS speech bubbles.&#8221; Essentially, his quote box, or speech bubble, came down to the following simple [...]]]></description>
			<content:encoded><![CDATA[<p>I recently searched El Goog for a way to drawing a quote box with only css and came across several ideas. Nicholas Gallagher had the simplest, and most compatible approach found during my quick surf, in his article titled &#8220;<a href="http://nicolasgallagher.com/pure-css-speech-bubbles/demo/">Pure CSS speech bubbles</a>.&#8221;</p>
<p>Essentially, his quote box, or speech bubble, came down to the following simple CSS code (there is no HTML or JS involved) and even works in IE; nice!</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('p263code6'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2636"><td class="code" id="p263code6"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.triangle-border</span>.<span style="color: #000000; font-weight: bold;">left</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
.triangle-<span style="color: #000000; font-weight: bold;">border</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#5A8F00</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333333</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1em</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3em</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/11/drawing-a-quote-box-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>creating response headers</title>
		<link>http://zenovations.com/blog/2011/10/creating-response-headers/</link>
		<comments>http://zenovations.com/blog/2011/10/creating-response-headers/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:04:41 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[response headers]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=259</guid>
		<description><![CDATA[PHPWeby has a great article on how to create response headers for various means, such as 503, file download dialog, apache authentication, and so on. http://phpweby.com/tutorials/php/35 &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p>PHPWeby has a great article on how to create response headers for various means, such as 503, file download dialog, apache authentication, and so on.</p>
<p><a href="http://phpweby.com/tutorials/php/35">http://phpweby.com/tutorials/php/35</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/10/creating-response-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great JavaScript Regular Expressions reference</title>
		<link>http://zenovations.com/blog/2011/07/great-javascript-regular-expressions-reference/</link>
		<comments>http://zenovations.com/blog/2011/07/great-javascript-regular-expressions-reference/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 23:35:57 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=230</guid>
		<description><![CDATA[Covers all sorts of great JavaScript regular expressions details, like look ahead/behind assertions and ?: operator (for grouping without storing match). http://www.javascriptkit.com/javatutors/redev2.shtml]]></description>
			<content:encoded><![CDATA[<p>Covers all sorts of great JavaScript regular expressions details, like look ahead/behind assertions and ?: operator (for grouping without storing match).</p>
<p>http://www.javascriptkit.com/javatutors/redev2.shtml</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/07/great-javascript-regular-expressions-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XmlSchema best practices</title>
		<link>http://zenovations.com/blog/2011/07/xmlschema-best-practices/</link>
		<comments>http://zenovations.com/blog/2011/07/xmlschema-best-practices/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 19:16:39 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xmlschema]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=255</guid>
		<description><![CDATA[Very nice article on best practices for structuring XmlSchema files:  http://www.xfront.com/ZeroOneOrManyNamespaces.html]]></description>
			<content:encoded><![CDATA[<p>Very nice article on best practices for structuring XmlSchema files:  <a href="http://www.xfront.com/ZeroOneOrManyNamespaces.html">http://www.xfront.com/ZeroOneOrManyNamespaces.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/07/xmlschema-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best support request subject evarr</title>
		<link>http://zenovations.com/blog/2011/07/best-support-request-subject-evarr/</link>
		<comments>http://zenovations.com/blog/2011/07/best-support-request-subject-evarr/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 14:25:26 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=248</guid>
		<description><![CDATA[Okay, it manages to still be searchable, informative, and yet is this funny: So eclipse and xdebug walk into a bar, and then my apache server dies]]></description>
			<content:encoded><![CDATA[<p>Okay, it manages to still be searchable, informative, and yet is this funny:</p>
<p><a href="http://stackoverflow.com/questions/4509245/so-eclipse-and-xdebug-walk-into-a-bar-and-then-my-apache-server-dies">So eclipse and xdebug walk into a bar, and then my apache server dies</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/07/best-support-request-subject-evarr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Bash Scripting Guide</title>
		<link>http://zenovations.com/blog/2011/07/advanced-bash-scripting-guide/</link>
		<comments>http://zenovations.com/blog/2011/07/advanced-bash-scripting-guide/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 06:36:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=253</guid>
		<description><![CDATA[This guide really is a complete resource for understanding bash syntax; very easy to get around and understand. http://tldp.org/LDP/abs/html/index.html]]></description>
			<content:encoded><![CDATA[<p>This guide really is a complete resource for understanding bash syntax; very easy to get around and understand.</p>
<p><a href="http://tldp.org/LDP/abs/html/index.html">http://tldp.org/LDP/abs/html/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/07/advanced-bash-scripting-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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('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;">$ 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('p231code15'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23115"><td class="code" id="p231code15"><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('p231code16'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23116"><td class="code" id="p231code16"><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('p231code17'); return false;">View Code</a> INI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23117"><td class="code" id="p231code17"><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('p231code18'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23118"><td class="code" id="p231code18"><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('p231code19'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23119"><td class="code" id="p231code19"><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('p231code20'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23120"><td class="code" id="p231code20"><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>Flash cards for jQuery certification</title>
		<link>http://zenovations.com/blog/2011/04/flash-cards-for-jquery-certification/</link>
		<comments>http://zenovations.com/blog/2011/04/flash-cards-for-jquery-certification/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 14:59:49 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=227</guid>
		<description><![CDATA[I&#8217;ve been studying up for a jQuery certification.  I created a set of almost a thousand flash cards to prepare. I&#8217;ll be adding more for the jQuery UI in the near future. This is a great site as once registered, you can check any number of the flash cards sets, then say &#8220;study 50&#8243; or [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been studying up for a jQuery certification.  I created a <a href="http://www.flashcardexchange.com/user/view/731163">set of almost a thousand flash cards</a> to prepare. I&#8217;ll be adding more for the jQuery UI in the near future.</p>
<p>This is a great site as once registered, you can check any number of the flash cards sets, then say &#8220;study 50&#8243; or &#8220;study 100&#8243; and it will give you a random cross section of the sets to study for the day. It tracks correct/incorrect and provides charting, as well as some other nice tools (keyboard navigation&#8211;yay!)</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2011/04/flash-cards-for-jquery-certification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

