<?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>Ryan McKern &#187; informational</title>
	<atom:link href="http://ryanmckern.com/category/informational/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanmckern.com</link>
	<description>Loudmouth web engineer from the Boston area; loud music, vitriol, good food.</description>
	<lastBuildDate>Sat, 14 Jan 2012 18:49:43 +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>Updating WordPress with libssh (and what I did when it was broken)</title>
		<link>http://ryanmckern.com/2009/06/updating-wordpress-with-libssh/</link>
		<comments>http://ryanmckern.com/2009/06/updating-wordpress-with-libssh/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 03:29:00 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[site meta]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ryanmckern.com/?p=591</guid>
		<description><![CDATA[Posted in phpsite meta<a href="http://www.minilibra.com/" title="WordPress Expert">wordpress</a>This article was originally about automatic updates over SSH2 not working for me when I upgraded to <a href="http://www.minilibra.com/" title="WordPress Expert">WordPress</a> 2.8. <a href="http://www.minilibra.com/" title="WordPress Expert">WordPress</a> 2.9 is out now, and this problem turned out not to be their fault. After filing a bug report and working through it with the <a href="http://www.minilibra.com/" title="WordPress Expert">WordPress</a> team, a solution was eventually found (see the final [...]]]></description>
			<content:encoded><![CDATA[<p>This article was originally about automatic updates over SSH2 not working for me when I upgraded to WordPress 2.8. WordPress 2.9 is out now, and this problem turned out not to be their fault.</p>

<p>After filing a bug report and working through it with the WordPress team, a solution was eventually found (see the final update to this post). If you're not inclined to skip to the end then here is a spoiler: turn off open_basedir or make the declaration less restrictive.</p>

<p>If you're not experiencing this problem (and Google says you're landing here if you're looking for help setting up SFTP/SSH updating for WordPress), I don't think this write-up will be of much help. But feel free to stick around; I've got <a href="http://ryanmckern.com/culinary/" >snacks</a>!</p>

<h2><span id="more-591"></span></h2>

<p>After upgrading to <a href="http://codex.wordpress.org/Version_2.8/" class="aga aga_13">WordPress 2.8</a> I discovered that this update has broken automatic core and plugin updates for me. I use SSH2/SFTP as I don't <a href="http://orangefort.com/support/sftp.html" class="aga aga_14">trust, like, need, or support FTP</a>, and the SSH log only shows that the PECL module is opening a connection and then closing it, with WordPress returning only the following to to the browser window.</p>

<blockquote>
  <p>Unable to locate WordPress Content directory (wp-content).</p>
</blockquote>

<p>I dug through how WordPress handles upgrades, and tracked this all down to the /wp-admin/includes/class-wp-filesystem-ssh2.php file.</p>

<h4>UPDATE 6/13/2009 @4:40PM EST</h4>

<p>From what I found, the rewrite of the SSH/SFTP2 update function happened because the ssh2.sftp wrapper was introduced. This replaced the older version of the function which copied contents into temp files and pushed the data around. It was a drastic speed increase, but it doesn't bloody work on my system for one reason or another.</p>

<h4>UPDATE 6/13/2009 @7:16PM EST</h4>

<p>I've officially cried "uncle!" and turned to the most wretched hive of scum and villainy in blogging, the <a href="http://wordpress.org/support/topic/280931" class="aga aga_15">WordPress forums</a> (as well as their <a href="https://core.trac.wordpress.org/ticket/10195" class="aga aga_16">bug reporting and ticketing system</a>). I also <a href="http://core.trac.wordpress.org/ticket/8210" class="aga aga_17">identified the patch which</a> introduced the code which caused SSH2 support to go flying off the rails for me.</p>

<h4>UPDATE 6/18/2009 @4:17PM EST</h4>

<p>The WordPress team has marked this bug as belonging to milestone 2.9. There is a slim chance that maybe I'll see some relief in 2.8.1, but more than likely they're going to yet again refactor how SSH2 works for automatic upgrades. If this changes, I will update this post accordingly. For now, I believe I may have to simply let it be broken.</p>

<h4>UPDATE 12/19/2009 @10:30PM EST</h4>

<p>Months later, I worked out what the problem was. Ultimately a conflict caused by use of PHP's <a href="http://www.php.net/manual/en/ini.core.php#ini.open-basedir" class="aga aga_18">open_basedir</a> and <a href="http://www.php.net/manual/en/ini.sect.safe-mode.php" class="aga aga_19">safe_mode</a> kept the SSH2 module from accessing resources it needed. The way the ssh2.sftp wrapper works would bump into overly restrictive basedir declarations. If you are experiencing this problem and you check your <a href="http://httpd.apache.org/docs/2.2/mod/core.html#errorlog" class="aga aga_20">error logs</a> after turning them up to "<a href="http://httpd.apache.org/docs/2.2/mod/core.html#loglevel" class="aga aga_21">debug</a>", you'll probably find out what directory or file is causing this conflict. It's ultimately moot, since things like safe_mode are deprecated in PHP 5.3 and being outright removed in PHP 6.</p>

<p>Oddly enough, updating <a href="http://www.libssh2.org/" class="aga aga_22">libssh2</a> to something more up-to-date than the <a href="http://dag.wieers.com/rpm/packages/libssh2/" class="aga aga_23">outdated RPM</a> provided by <a href="http://dag.wieers.com/" class="aga aga_24">Dag</a> for RedHat Enterprise Linux/CentOS made a HUGE speed difference. Definitely something to look into if SSH updating is slow for you.</p>

<hr />

<p>Other than that, this round of upgrades has been mostly painless, and the hyped speed increases are not just hyperbole. WordPress 2.8 feels only slight under-baked beyond SSH2 hiccups. I confess that I haven't had a chance to play with the redesigned sidebar widget administration yet though, as I haven't even figured out how I want to implement support for sidebar widgets into this theme.</p>

<p><a href="http://www.blogging-secret.com/another-bug-for-wordpress-25-custom-field" class="aga aga_25">The bug that deletes some custom fields</a> if you update posts that have them is still there. No idea how to begin tracking <strong><em>that</em></strong> one down, but I can state authoritatively that it's theme and plugin independent. Why am I linking to some dudes blog, and not the official WordPress bug tracker? because I don't even know where WordPress keeps its bug tracker.</p>

<p>I also had to reset WordPress Blog stats because WordPress was tracking the wrong subdomain for all of my stats. The numbers tallied up with Google Analytics and the AWFFull log grinder, but the URLs were all effed up. I fixed the problem on the WordPress.com backend, and in the process lost months of aggregated history.</p>

<p>The upshot to this loss is that I hope to have a new round of search hit inspired commentary ready to go in a week or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanmckern.com/2009/06/updating-wordpress-with-libssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Admin Notes: Raw Performance Numbers</title>
		<link>http://ryanmckern.com/2009/01/apache-admin-notes-raw-performance-numbers/</link>
		<comments>http://ryanmckern.com/2009/01/apache-admin-notes-raw-performance-numbers/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 21:55:07 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[site meta]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://ryanmckern.com/?p=336</guid>
		<description><![CDATA[Posted in apachelinuxsite metaIn late December I started looking at alternative web servers, having hit a point where I actually asked aloud (though to no one in particular) why I still use Apache for any http or php needs that may arise. I sat down, installed nginx (nginx 0.6.33) from the EPEL (Extra Packages for Enterprise Linux) repositories [...]]]></description>
			<content:encoded><![CDATA[<p>In late December <a href="http://ryanmckern.com/general/280/" >I started looking at alternative web servers</a>, having hit a point where I actually asked aloud (though to no one in particular) why I still use Apache for any http or php needs that may arise.</p>

<p>I sat down, installed <a href="http://nginx.net/" class="aga aga_32">nginx</a> (nginx 0.6.33) from the <a href="https://fedoraproject.org/wiki/EPEL" class="aga aga_33">EPEL (Extra Packages for Enterprise Linux)</a> repositories and <a href="http://www.lighttpd.net/" class="aga aga_34">lighttpd</a> (lighttpd 1.4.20) from the <a href="https://rpmrepo.org/RPMforge" class="aga aga_35">RPMforge</a> repositories (both third party repositories worth writing about in detail at a later date). Apache was already installed (httpd 2.2.3), so a virtualhost was configured to serve data from the same docroot using all three servers, and PHP through fastcgi was configured for lighttpd and nginx<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>.</p>

<p>I then set up a stock WordPress 2.7 blog, some large images, some thumbnails, and created what amount to approximately a 20k index page with nothing cached. Using ApacheBench to fetch 1000 requests, 100 requests at a time, I came up with some simple numbers showing how long it took to return the same page for each web server.</p>

<p>While I openly admit that the benchmarks produced here are arbitrary and superficial, they do give some rough insight (10,000ft overview level insight) as to how much faster nginx and fastcgi are over apache 2.2 and mod_php. lighttpd also performed admirably, and with less hassle involved in set up than nginx, but I suspect that may just be previous familiarity with the configuration.</p>

<p>A table of numbers (soon to be a graph, when I feel like making it) and some thoughts as to what they mean and why we (the web hosting community) still use Apache religiously follows after the jump.</p>

<p><span id="more-336"></span></p>

<table border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
            <th width="40%">
                Metric
            </th>
            <th width="20%">
                Apache
            </th>
            <th width="20%">
                ligHTTPD
            </th>
            <th width="20%">
                nginx
            </th>
        </tr>
        <tr>
            <td>
                <h5>Time taken for tests</h5>
                lower is better
            </td>
            <td>
                45.584 seconds
            </td>
            <td>
                24.199 seconds
            </td>
            <td>
                17.395 seconds
            </td>
        </tr>
        <tr>
            <td>
                <h5>Total transferred</h5>    
                compression was enabled
            </td>
            <td>
                21691000 bytes
            </td>
            <td>
                22059912 bytes
            </td>
            <td>
                21894000 bytes
            </td>
        </tr>
        <tr>
            <td>
                <h5>HTML transferred</h5>
                compression was enabled
            </td>
            <td>
                21464000 bytes
            </td>
            <td>
                21833686 bytes
            </td>
            <td>
                21671000 bytes
            </td>
        </tr>
        <tr>
            <td>
                <h5>Mean Requests per second</h5>    
                higher is better
            </td>
            <td>
                21.94 [#/sec]
            </td>
            <td>
                41.32 [#/sec]
            </td>
            <td>
                57.49 [#/sec]
            </td>
        </tr>
        <tr>
            <td>
                <h5>Mean Time per request</h5>    
                lower is better
            </td>
            <td>
                4558.396 [ms]
            </td>
            <td>
                2419.853 [ms]
            </td>
            <td>
                1739.542 [ms]
            </td>
        </tr>
        <tr>
            <td>
                <h5>Mean Time per request</h5>
                lower is better
            </td>
            <td>
                45.584 [ms]
            </td>
            <td>
                24.199 [ms]
            </td>
            <td>
                17.395 [ms]
            </td>
        </tr>
        <tr>
            <td>
                <h5>Transfer rate</h5>
                higher is better
            </td>
            <td>
                464.69 [Kbytes/sec]
            </td>
            <td>
                890.26 [Kbytes/sec]
            </td>
            <td>
                1229.11 [Kbytes/sec]
            </td>
        </tr>
    </tbody>
</table>

<p>So what does all this mean? Well, the gist of it is that nginx is really, really god damned fast.
Embarrassingly fast. Note that I didn't say that Apache is slow. It's just not nearly as fast as nginx.
However, that being said, nginx is also not nearly as extensible as Apache is. The lack of support for things that are taken for granted nowadays (.htaccess files come to mind) can be a sticking point for use in a shared hosting environment. lighttpd doesn't support most of those "expected" bells and whistles either, and an argument could be made for such things being a waste of cycles…
But the bottom line is that such bells and whistles are <strong><em>expected</em></strong> to work in a shared hosting environment.</p>

<p>As for why the web hosting community at large drops Apache into place whenever we need an http server, I think it boils down to comfort and laziness. It's bundled with most linux distros by default, we know it because it's been around forever, and its behavior is predictable and familiar. It's become the Microsoft Office of http serving, for better or for worse, and it's not going anywhere any time soon. Even the 800lb gorilla behemoth that is Microsoft IIS has failed to dethrone Apache for sheer ubiquity. I think the performance or security conscious are always going to migrate towards something with better speed and less attack vectors, but the typical admin probably just won't care.</p>

<p>And me? For now I'm going to continue using Apache, while I work out if using nginx for any of the sites I host for people would be a problem. If I can get the rewrite rules taken care of, and work out simple site provisioning, I might well make the switch. nginx seems like a no-brainer on single site virtual servers, where resources are scarce, and Apache isn't getting any more svelte these days.</p>

<p>--</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>Credit where credit is due. I couldn't have started to work out the nginx fastcgi configuration without help from <a href="http://blog.codefront.net/2007/06/11/nginx-php-and-a-php-fastcgi-daemon-init-script/" class="aga aga_36">this post</a> on <a href="http://blog.codefront.net/" class="aga aga_37">redemption in a blog</a>. <a href="#fnref:1" rev="footnote">↩</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ryanmckern.com/2009/01/apache-admin-notes-raw-performance-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting control panels</title>
		<link>http://ryanmckern.com/2008/06/hosting-control-panels/</link>
		<comments>http://ryanmckern.com/2008/06/hosting-control-panels/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 20:12:51 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[site meta]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[control panels]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[direct admin]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openpanel]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[vhcs]]></category>

		<guid isPermaLink="false">http://ryanmckern.com/?p=54</guid>
		<description><![CDATA[Posted in applicationssite metaSeriously, I am learning to write code just so I can write a hosting control panel that doesn't make me violently angry when I try to use.]]></description>
			<content:encoded><![CDATA[<p>For about 6 years I've pondered the nature of web hosting control panels.
When I ran a web host, I played with <a href="http://www.cpanel.net/index.html" class="aga aga_38">CPanel</a>, <a href="http://www.parallels.com/plesk/" class="aga aga_39">Plesk</a>, and <a href="http://www.directadmin.com/" class="aga aga_40">DirectAdmin</a>. I've since dabbled in the open source waters of <a href="http://www.webmin.com/" class="aga aga_41">Webmin</a> and <a href="http://www.webmin.com/index6.html" class="aga aga_42">Usermin</a>, and of late I've even poked at <a href="http://www.vhcs.net/new/" class="aga aga_43">VHCS</a> and <a href="http://www.openpanel.com/" class="aga aga_44">OpenPanel</a>. I have, to date, not seen a single control panel that is precisely what I want (with DirectAdmin coming closest, and almost being a winner if not for its tiered reseller model aaaaannnd price tag). The real sticking points come down to the fact that I want:</p>

<ul>
<li><p>The control panel to write human-readable, reasonable configuration files: This is where Webmin falls down on the job. The config files are valid, but <em>god</em> are they awful to read.</p></li>
<li><p>No mention or hint of reseller anything: I just want administrative accounts running the show and hosted accounts with domains linked to them. Maybe some way for the hosted to monkey with the non-essentials of their own accounts. So on the grounds of overkill, pretty much every commercial panel fails my simple needs.</p></li>
<li><p>Email support for something that's not <strong>antiquated</strong>: some panels use <a href="http://www.qmail.org/" class="aga aga_45">qmail</a> (or some version therein, which hasn't had a proper update in years), some use <a href="http://www.sendmail.org/" class="aga aga_46">sendmail</a> (which is older than dirt and half as secure), and some use whatever the flavor of the month is (read: whatever ships on the supported OS distro). Me? I'm a <a href="http://www.postfix.org/" class="aga aga_47">postfix</a> guy. I'm not wedded to it per se, but it's updated, feature packed, works well and its configuration is only modestly arcane (qmail, by the way, fails due to having an arcane configuration file structure that doesn't plug into antivirus or spam very easily).</p>

<p>Regarding IMAP and POP support, I find that these panels often use their own "questionable" clients, or rely on <a href="http://www.courier-mta.org/" class="aga aga_48">courier</a>. There isn't really anything wrong with that, I just like <a href="http://www.dovecot.org/" class="aga aga_49">dovecot</a> more (to be fair, DirectAdmin supports dovecot last I checked).</p>

<p>I don't want to even get started with authorized SMTP support from these packages. <strong>God, the horror</strong>.</p></li>
<li><p>No byzantine dependencies: Don't tell me that I need some god awful fossilized encryption library or ldap to make this system work.</p>

<blockquote>
  <p>"Listen here, Mr. Control Panel, I don't use LDAP, and unless that is what 
  you're using as a backing store for your hosting information, neither should you."</p>
</blockquote></li>
</ul>

<p>To that end, I've begun playing with Ruby and <a href="http://yehudakatz.com/2008/05/12/by-thors-hammer/" class="aga aga_50">Thor</a> to whip up some simple add/delete scripts (with initial success!), and the biggest stumbling block I've encountered so far is just parsing out the accounts that exist.</p>

<p>The Apache configuration file format is… archaic in its own right, being neither XML nor attribute: value pairs. It's readable, but there is a reason that an entire perl package (HTTPD::Config, which may or may not exist anymore) was produced just to scrape httpd.conf files.</p>

<p>I fear that without stepping back a little and engineering a proper solution I'm just going to wind up reimplementing what I encountered when I did overnight support for Reality Check Networks (no link provided, because, well, you know. <em>Those dudes…</em>).</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanmckern.com/2008/06/hosting-control-panels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 16/71 queries in 0.051 seconds using disk: basic
Object Caching 1179/1262 objects using disk: basic

Served from: ryanmckern.com @ 2012-02-09 20:50:43 -->
