<?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>thehenrys.net</title>
	<atom:link href="http://www.thehenrys.net/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.thehenrys.net/wp</link>
	<description>Dan Henry's random musings...</description>
	<lastBuildDate>Tue, 25 Jan 2011 15:09:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>tuning apache for large subversion repos</title>
		<link>http://www.thehenrys.net/wp/?p=67</link>
		<comments>http://www.thehenrys.net/wp/?p=67#comments</comments>
		<pubDate>Tue, 25 Jan 2011 15:09:57 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=67</guid>
		<description><![CDATA[I kept getting very aggravating timeout issues when trying to reintegrate a branch back into the trunk of one of our large subversion repositories. Tuned apache&#8217;s httpd.conf with the following and the problems disappeared. # # Timeout: The number of seconds before receives and sends time out. # Timeout 60000 # # KeepAlive: Whether or [...]]]></description>
			<content:encoded><![CDATA[<p>I kept getting very aggravating timeout issues when trying to reintegrate a branch back into the trunk of one of our large subversion repositories.  Tuned apache&#8217;s httpd.conf with the following and the problems disappeared.</p>
<p>#<br />
# Timeout: The number of seconds before receives and sends time out.<br />
#<br />
Timeout 60000 </p>
<p>#<br />
# KeepAlive: Whether or not to allow persistent connections (more than<br />
# one request per connection).<br />
#<br />
KeepAlive On</p>
<p># MaxKeepAliveRequests: The maximum number of requests to allow<br />
# during a persistent connection. Set to 0 to allow an unlimited amount.<br />
#<br />
MaxKeepAliveRequests 0 </p>
<p>#<br />
# KeepAliveTimeout: Number of seconds to wait for the next request from the<br />
# same client on the same connection.<br />
#<br />
KeepAliveTimeout 60000</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=67</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Useful links&#8230;</title>
		<link>http://www.thehenrys.net/wp/?p=63</link>
		<comments>http://www.thehenrys.net/wp/?p=63#comments</comments>
		<pubDate>Fri, 13 Nov 2009 18:16:35 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=63</guid>
		<description><![CDATA[Examples Using the VMware Virtual Disk Manager]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vmware.com/support/ws55/doc/ws_disk_manager_examples.html" target="_blank">Examples Using the VMware Virtual Disk Manager</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=63</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET consume a php nusoap web service server *or* PHP NuSOAP Document/Literal Web Service Server</title>
		<link>http://www.thehenrys.net/wp/?p=58</link>
		<comments>http://www.thehenrys.net/wp/?p=58#comments</comments>
		<pubDate>Wed, 29 Apr 2009 15:16:20 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=58</guid>
		<description><![CDATA[Ripped blatently from here so that I might not ever lose this information again! PHP NuSOAP Document/Literal Web Service Server If you are using regular Pear SOAP, it doesn&#8217;t work in document/literal. I tried. So I turned to NuSOAP, which unfortunately has very little in the way of documented examples, especially in document/literal. I am [...]]]></description>
			<content:encoded><![CDATA[<p>Ripped blatently from <a href="http://mleiv.com/mt/programming/web_tricks/php_nusoap_documentliteral_web/index.html">here</a> so that I might not ever lose this information again!</p>
<p><strong>PHP NuSOAP Document/Literal Web Service Server</strong></p>
<p>If you are using regular Pear SOAP, it doesn&#8217;t work in document/literal. I tried. So I turned to NuSOAP, which unfortunately has very little in the way of documented examples, especially in document/literal. I am including the server that worked for me (discovered largely through trial and error), as well as a test client. This is designed to mirror Pear SOAP as much as possible (since I was converting from one to the other). Note: document/literal in NuSOAP does not verify data types, so int, string, boolean, etc. are all converted to strings between the client and server. </p>
<p>Server:</p>
<p><code>require_once("nusoap/nusoap.php");</p>
<p>$server = new soap_server;<br />
$server-&gt;configureWSDL('servicename', 'urn:servicename','','document'); </p>
<p>myRegister($server,'DoSomething',<br />
		array('in' =&gt; array('Name' =&gt; 'xsd:string',<br />
					'Age' =&gt; 'xsd:int'),<br />
		'out' =&gt; array('Pass' =&gt; 'xsd:boolean')<br />
		));</p>
<p>//if in safe mode, raw post data not set:<br />
if (!isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = implode("\r\n", file('php://input'));<br />
$server-&gt;service($HTTP_RAW_POST_DATA);</p>
<p>function myRegister(&amp;$server,$methodname,$params)<br />
{<br />
	$server-&gt;register($methodname,$params["in"],$params["out"],<br />
	'urn:servicename', // namespace<br />
	$server-&gt;wsdl-&gt;endpoint.'#'.$methodname, // soapaction<br />
	'document', // style<br />
	'literal', // use<br />
	'N/A' // documentation<br />
	);<br />
}</p>
<p>function DoSomething($Name,$Age)<br />
{<br />
	$result=false;<br />
	if ($Name=="mleiv" &amp;&amp; $Age==35) $result=true;<br />
	return array('Pass'=&gt;$result);<br />
}</code></p>
<p>Client:</p>
<p><code>require_once("nusoap/nusoap.php");</p>
<p>$ns="urn:servicename";<br />
$client = new soapclient('http://localhost/wherever/SOAPServer.php?wsdl','wsdl');<br />
if ($client-&gt;getError())<br />
{<br />
 	print "&lt;h2&gt;Soap Constructor Error:&lt;/h2&gt;&lt;pre&gt;".<br />
                $client-&gt;getError()."&lt;/pre&gt;";<br />
}<br />
$params=array("Name"=&gt;"mleiv","Age"=&gt;35);<br />
$result = $client-&gt;call("DoSomething",array("parameters"=&gt;$params),$ns);<br />
if ($client-&gt;fault) //soap_fault<br />
{<br />
	print "&lt;h2&gt;Soap Fault:&lt;/h2&gt;&lt;pre&gt;(".$client-&gt;fault-&gt;faultcode.")  ".<br />
                $client-&gt;fault-&gt;faultstring."&lt;/pre&gt;";<br />
}<br />
elseif ($client-&gt;getError())<br />
{<br />
	print "&lt;h2&gt;Soap Error:&lt;/h2&gt;&lt;pre&gt;".$client-&gt;getError()."&lt;/pre&gt;";<br />
}<br />
else<br />
{<br />
	print "&lt;h2&gt;Result:&lt;/h2&gt;&lt;pre&gt;".$result["Pass"]."&lt;/pre&gt;";<br />
}<br />
print '&lt;h2&gt;Details:&lt;/h2&gt;&lt;hr /&gt;'.<br />
		'&lt;h3&gt;Request&lt;/h3&gt;&lt;pre&gt;' .<br />
              htmlspecialchars($client-&gt;request, ENT_QUOTES) . '&lt;/pre&gt;'.<br />
		'&lt;h3&gt;Response&lt;/h3&gt;&lt;pre&gt;' .<br />
              htmlspecialchars($client-&gt;response, ENT_QUOTES) . '&lt;/pre&gt;'.<br />
		'&lt;h3&gt;Debug&lt;/h3&gt;&lt;pre&gt;' .<br />
              htmlspecialchars($client-&gt;debug_str, ENT_QUOTES) . '&lt;/pre&gt;';	</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=58</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What the heck is 1.8189894035459E ?</title>
		<link>http://www.thehenrys.net/wp/?p=55</link>
		<comments>http://www.thehenrys.net/wp/?p=55#comments</comments>
		<pubDate>Tue, 17 Mar 2009 19:53:09 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=55</guid>
		<description><![CDATA[I have been pulling what little hair I have out for the past hour trying to figure out a very peculiar thing that was happening to me in php. I was doing some math and a function that I know was supposed to return 0 was returning 1.8189894035459E . If you called the function outside [...]]]></description>
			<content:encoded><![CDATA[<p>I have been pulling what little hair I have out for the past hour trying to figure out a very peculiar thing that was happening to me in php.  I was doing some math and a function that I know was supposed to return 0 was returning 1.8189894035459E .  If you called the function outside of a loop it worked fine, but is you called it in a while loop for instance, it would return this crazy value.  All I had to do was to typecast the result of the integer addition to an (int) and the problem went away.  Hope this might help someone in the future save some hair.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=55</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setup rsync server on CentOS</title>
		<link>http://www.thehenrys.net/wp/?p=54</link>
		<comments>http://www.thehenrys.net/wp/?p=54#comments</comments>
		<pubDate>Wed, 11 Jun 2008 15:22:32 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=54</guid>
		<description><![CDATA[Step-by-step installation and configuration rsync server on CentOS From transamrit.net &#038; http://am3n.profusehost.net/index.php?id=70 Make sure xinetd and rsync is available, if not type # yum -y install rsync xinetd Add xinetd service to system # chkconfig --add xinetd Make sure xinetd running on init 3 and 5 # chkconfig --list xinetd Enable rsync # vi /etc/xinetd.d/rsync [...]]]></description>
			<content:encoded><![CDATA[<p>Step-by-step installation and configuration rsync server on CentOS<br />
From <a href="http://transamrit.net">transamrit.net</a> &#038; <a href="http://am3n.profusehost.net/index.php?id=70">http://am3n.profusehost.net/index.php?id=70</a></p>
<p>Make sure xinetd and rsync is available, if not type<br />
<code># yum -y install rsync xinetd</code></p>
<p>Add xinetd service to system<br />
<code># chkconfig --add xinetd</code></p>
<p>Make sure xinetd running on init 3 and 5<br />
<code># chkconfig --list xinetd</code></p>
<p>Enable rsync<br />
<code># vi /etc/xinetd.d/rsync</code><br />
Change disable = yes into disable = no </p>
<p>Create username and password for rsync client to use<br />
<code># vi /etc/rsyncd.secrets</code><br />
adminname:hispassword </p>
<p>Create configuration and shares for rsync daemon<br />
<code># vi /etc/rsyncd.conf</code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
max connections = 2<br />
log file = /var/log/rsync.log<br />
timeout = 300</p>
<p>[shares]<br />
comment = shared data stored here<br />
path = /home/adminname/shares<br />
read only = false<br />
list = yes<br />
uid = adminname<br />
gid = adminname<br />
auth users = adminname<br />
secrets file = /etc/rsyncd.secrets<br />
hosts allow = 10.10.105.0/24<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Secure /etc/rsyncd.*<br />
<code># chown root.root /etc/rsyncd.*</code><br />
<code># chmod 600 /etc/rsyncd.*</code></p>
<p>Restart xinetd<br />
<code># service xinetd restart</code></p>
<p>Make sure rsync now running<br />
<code># chkconfig --list</code></p>
<p>Perhaps you also want to enable port 873 tcp and udp on your firewall so other can connect to your server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=54</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dump one MySQL database to another MySQL database</title>
		<link>http://www.thehenrys.net/wp/?p=53</link>
		<comments>http://www.thehenrys.net/wp/?p=53#comments</comments>
		<pubDate>Thu, 22 May 2008 05:28:43 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=53</guid>
		<description><![CDATA[mysqldump -u[uname] -p[password] [table] &#124; mysql -u[uname] -p[password] &#8211;host=[ip address] -C [table] I.E.: mysqldump -umy_user_name -pmy_secret_password foo_table &#124; mysql -umy_2nd_user_name -pmy_2nd_secret_password &#8211;host=1.1.1.1 -C foo_table (whole command should be on one line of course.)]]></description>
			<content:encoded><![CDATA[<p>mysqldump -u[uname] -p[password] [table] | mysql -u[uname] -p[password] &#8211;host=[ip address] -C [table]</p>
<p>I.E.: mysqldump -umy_user_name -pmy_secret_password foo_table | mysql -umy_2nd_user_name -pmy_2nd_secret_password &#8211;host=1.1.1.1 -C foo_table</p>
<p>(whole command should be on one line of course.) <img src='http://www.thehenrys.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=53</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP, OpenSSL and ftp_ssl_connect() on Win32, my journey&#8230;</title>
		<link>http://www.thehenrys.net/wp/?p=52</link>
		<comments>http://www.thehenrys.net/wp/?p=52#comments</comments>
		<pubDate>Mon, 19 May 2008 17:46:30 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=52</guid>
		<description><![CDATA[I need to compile php for Windows so that the ftp_ssl_connect function would be available. This is how I did it. All of this is as of today, May 19, 2008. Windows XP Pro SP2. Download &#038; Install (this is a large install > 1GB): » Microsoft Visual C++ 2008 Express Edition » Windows SDK [...]]]></description>
			<content:encoded><![CDATA[<p>I need to compile php for Windows so that the ftp_ssl_connect function would be available.  This is how I did it.  All of this is as of today, May 19, 2008.  Windows XP Pro SP2.</p>
<li>Download &#038; Install (this is a large install > 1GB):<br />
<a href="http://www.microsoft.com/express/download/" target="_blank">» Microsoft Visual C++ 2008 Express Edition</a><br />
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E6E1C3DF-A74F-4207-8586-711EBE331CDC" target="_blank">» Windows SDK for Windows Server 2008 and .NET Framework 3.5</a></li>
<p></p>
<li>Copy C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\WinResrc.h to C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\winres.h</li>
<p></p>
<li>Create the directory C:\work</li>
<p></p>
<li>Download:<br />
<a href="http://us.php.net/get/php-5.2.6.tar.gz/from/a/mirror" target="_blank">» php 5.2.6 Source Code</a> and extract it to the C:\work\ folder.</li>
<p></p>
<li>Download:<br />
<a href="http://files.edin.dk/" target="_blank">» Needed Libraries (zip.zip)</a>.  Edin Kadribašic has a nice zip file with everything in it.  You need to go into subfolder /php/win32 and click on zip.zip. (If this link is down try this one: http://perisama.net/ ).  Create folder C:\work\php_build\ and extract the zip file into it.</li>
<p></p>
<li>Download:<br />
<a href="http://ctindustries.net/libxml/" target="_blank">» Newer libxml2</a>.  The libxml package that is included in the zip file was a little out of date.  Download this one and extract the contents of the zip file on top of C:\work\php_build\ .  Overwrite files as needed.</li>
<p></p>
<li>Download &#038; Install:<br />
<a href="http://www.slproweb.com/products/Win32OpenSSL.html" target="_blank">» Win32 OpenSSL (Win32 OpenSSL v0.9.8g)</a></li>
<p></p>
<li>Patch php source:<br />
As of php 5.2.6, you will need to patch C:\work\php-5.2.6\ext\ftp\ftp.c in your php source directory.  deciacco did some awesome work in producing a working patch.  You can see his site <a href="http://www.deciacco.com/blog/php/php-openssl-and-ftp_ssl_connect-on-win32/" target="_blank">here</a>.  You can download my patched version for php 5.2.6 <a href="http://www.thehenrys.net/wp/wp-content/uploads/2008/05/ftp.c" target="_blank">here</a>.  Just replace the copy of ftp.c in your C:\work\php-5.2.6\ext\ftp\ folder.
</li>
<p></p>
<li>Open:<br />
Start > Program Files > Visual C++ 9.0 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt</li>
<p></p>
<li>Type these commands into the Visual Studio 2008 Command Prompt:<br />
<a href="http://www.thehenrys.net/wp/wp-content/uploads/2008/05/commands.txt" target="_blank">Link To Commands</a><br />
You will see many, many compile warnings.  This is quite normal. <img src='http://www.thehenrys.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</li>
<p>If everything went well, you should now have php.exe in the folder C:\work\Release_TS\ which has ftp_ssl_connect functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=52</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Recursively chmod directories or files only</title>
		<link>http://www.thehenrys.net/wp/?p=49</link>
		<comments>http://www.thehenrys.net/wp/?p=49#comments</comments>
		<pubDate>Wed, 20 Feb 2008 16:53:17 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=49</guid>
		<description><![CDATA[Great post here: http://movabletripe.com/archive/recursively-chmod-directories-only/ # recursively chmod directories only find . -type d -exec chmod 775 {} \; # recursively chmod files only find . -type f -exec chmod 664 {} \;]]></description>
			<content:encoded><![CDATA[<p>Great post here:<br />
<a href="http://movabletripe.com/archive/recursively-chmod-directories-only/" target="_blank">http://movabletripe.com/archive/recursively-chmod-directories-only/</a></p>
<p><code># recursively chmod directories only<br />
find . -type d -exec chmod 775 {} \;</code></p>
<p><code># recursively chmod files only<br />
find . -type f -exec chmod 664 {} \;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting php mail() working on fresh CentOS 5 install</title>
		<link>http://www.thehenrys.net/wp/?p=48</link>
		<comments>http://www.thehenrys.net/wp/?p=48#comments</comments>
		<pubDate>Wed, 06 Feb 2008 14:49:26 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=48</guid>
		<description><![CDATA[All I had to do was comment out the loopback only restriction and php&#8217;s mail() fuction started working great! vi /etc/mail/sendmail.mc look for: DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl change it to this: dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl remake the sendmail.cf file m4 /etc/mail/sendmail.mc &#62; /etc/mail/sendmail.cf restart sendmail: service sendmail restart]]></description>
			<content:encoded><![CDATA[<p>All I had to do was comment out the loopback only restriction and php&#8217;s mail() fuction started working great!  </p>
<p><code>vi /etc/mail/sendmail.mc</code></p>
<p>look for:<br />
<code>DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl</code></p>
<p>change it to this:<br />
<code>dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl</code></p>
<p>remake the sendmail.cf file<br />
<code>m4 /etc/mail/sendmail.mc &gt; /etc/mail/sendmail.cf</code></p>
<p>restart sendmail:<br />
<code>service sendmail restart</code></p>
<p> <img src='http://www.thehenrys.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great tutorial about the BIND dns server</title>
		<link>http://www.thehenrys.net/wp/?p=47</link>
		<comments>http://www.thehenrys.net/wp/?p=47#comments</comments>
		<pubDate>Wed, 06 Feb 2008 14:45:16 +0000</pubDate>
		<dc:creator>dh</dc:creator>
				<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://www.thehenrys.net/wp/?p=47</guid>
		<description><![CDATA[Here is a great tutorial about the Bind dns server: http://www.howtoforge.com/traditional_dns_howto]]></description>
			<content:encoded><![CDATA[<p>Here is a great tutorial about the Bind dns server:</p>
<p><a href="http://www.howtoforge.com/traditional_dns_howto" target="_blank">http://www.howtoforge.com/traditional_dns_howto</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thehenrys.net/wp/?feed=rss2&#038;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
