<?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>Philippe Dellaert</title>
	<atom:link href="http://dellaert.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://dellaert.org</link>
	<description></description>
	<lastBuildDate>Sun, 18 Dec 2011 16:43:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<meta name="generator" content="deStyle 0.9.3" />
		<item>
		<title>Ubuntu 11.10 boot problem</title>
		<link>http://dellaert.org/2011/12/18/ubuntu-11-10-boot-problem/</link>
		<comments>http://dellaert.org/2011/12/18/ubuntu-11-10-boot-problem/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 16:43:14 +0000</pubDate>
		<dc:creator>straks</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[boot problem]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://dellaert.org/?p=239</guid>
		<description><![CDATA[Today i had a network issue on my system, so i tried rebooting my Ubuntu 11.10 server which acts like a router, firewall, DHCP and DNS server for my network. Turns out there was a rather big problem with Ubuntu 11.10 if you upgraded from a previous version. It seems that in Ubuntu 11.10 the [...]]]></description>
			<content:encoded><![CDATA[<p>Today i had a network issue on my system, so i tried rebooting my Ubuntu 11.10 server which acts like a router, firewall, DHCP and DNS server for my network. Turns out there was a rather big problem with Ubuntu 11.10 if you upgraded from a previous version.</p>
<p>It seems that in Ubuntu 11.10 the directory containing running processes information and lock files has changed, or well, it has for certain programs. This results in a system where certain daemons/programs expect to find sockets in /var/run, while they are present in /run, or vice versa.</p>
<p>This might result in a boot problem looking like this:</p>
<p><a href="http://dellaert.org/wp-content/uploads/2011/12/Ubuntu_11.10_boot-issue.png"><img class="alignnone size-medium wp-image-240" title="Ubuntu_11.10_boot-issue" src="http://dellaert.org/wp-content/uploads/2011/12/Ubuntu_11.10_boot-issue-300x73.png" alt="" width="300" height="73" /></a></p>
<p>The first lines are not so important, what is important are the last two. It says:</p>
<p>

<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1ccf10 .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1ccf10" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1ccf10'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1ccf10'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1ccf10'); return false;"></a><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket : connection refused
Waiting for network configuration...</textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div><div class="crayon-num crayon-striped-num">2</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="i ">unable</span><span class="h "> </span><span class="st ">to</span><span class="h "> </span><span class="i ">connect</span><span class="h "> </span><span class="st ">to</span><span class="h "> </span><span class="i ">system</span><span class="h "> </span><span class="i ">bus</span><span class="o ">:</span><span class="h "> </span><span class="i ">Failed</span><span class="h "> </span><span class="st ">to</span><span class="h "> </span><span class="i ">connect</span><span class="h "> </span><span class="st ">to</span><span class="h "> </span><span class="i ">socket</span><span class="h "> </span><span class="o ">/</span><span class="t ">var</span><span class="o ">/</span><span class="i ">run</span><span class="o ">/</span><span class="i ">dbus</span><span class="o ">/</span><span class="i ">system_bus_socket</span><span class="h "> </span><span class="o ">:</span><span class="h "> </span><span class="i ">connection</span><span class="h "> </span><span class="i ">refused</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-2"><span class="i ">Waiting</span><span class="h "> </span><span class="st ">for</span><span class="h "> </span><span class="i ">network</span><span class="h "> </span><span class="i ">configuration</span><span class="sy ">.</span><span class="sy ">.</span><span class="sy ">.</span><span class="h "></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0014 seconds] -->

</p>
<p>After that last one, you might get that it waits for another 60 seconds for network configuration, but it will get stuck in boot after that.</p>
<p>Luckily i had my 3G enabled phone close, so i could do some searching, which gave me a link to a <a href="https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/811441" target="_blank">bug report</a> and a forum post with a <a href="http://ubuntuforums.org/showpost.php?p=11340883&amp;postcount=3" target="_blank">fix</a>. In short, few simple steps can help you out here:</p>
<ol>
<li>reboot into recovery mode</li>
<li>start a root shell</li>
<li>mount the filesystem as read/write:<br />


<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1ccfc4 .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1ccfc4" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1ccfc4'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1ccfc4'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1ccfc4'); return false;"></a><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">mount -o remount,rw /</textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="i ">mount</span><span class="h "> </span><span class="o ">-</span><span class="i ">o</span><span class="h "> </span><span class="i ">remount</span><span class="sy ">,</span><span class="i ">rw</span><span class="h "> </span><span class="o ">/</span><span class="h "></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0004 seconds] -->

</li>
<li>move everything from /var/run into /run:<br />


<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1cd044 .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1cd044" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1cd044'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1cd044'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1cd044'); return false;"></a><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">mv /var/run/* /run/</textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="i ">mv</span><span class="h "> </span><span class="o ">/</span><span class="t ">var</span><span class="o ">/</span><span class="i ">run</span><span class="o ">/</span><span class="o ">*</span><span class="h "> </span><span class="o ">/</span><span class="i ">run</span><span class="o ">/</span><span class="h "></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0004 seconds] -->

</li>
<li>move /var/lock into /run:<br />


<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1cd0dd .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1cd0dd" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1cd0dd'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1cd0dd'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1cd0dd'); return false;"></a><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">mv /var/lock /run/</textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="i ">mv</span><span class="h "> </span><span class="o ">/</span><span class="t ">var</span><span class="o ">/</span><span class="i ">lock</span><span class="h "> </span><span class="o ">/</span><span class="i ">run</span><span class="o ">/</span><span class="h "></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0004 seconds] -->

</li>
<li>create symlinks from /var/run to /run and /var/run/lock to /var/lock:<br />


<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1cd165 .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1cd165" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1cd165'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1cd165'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1cd165'); return false;"></a><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">ln -s /run /var/run
ln -s /run/lock /var/lock</textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div><div class="crayon-num crayon-striped-num">2</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="i ">ln</span><span class="h "> </span><span class="o ">-</span><span class="i ">s</span><span class="h "> </span><span class="o ">/</span><span class="i ">run</span><span class="h "> </span><span class="o ">/</span><span class="t ">var</span><span class="o ">/</span><span class="i ">run</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-2"><span class="i ">ln</span><span class="h "> </span><span class="o ">-</span><span class="i ">s</span><span class="h "> </span><span class="o ">/</span><span class="i ">run</span><span class="o ">/</span><span class="i ">lock</span><span class="h "> </span><span class="o ">/</span><span class="t ">var</span><span class="o ">/</span><span class="i ">lock</span><span class="h "></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0008 seconds] -->

</li>
<li>reboot</li>
</ol>
<p>Worked like charm here. Hope this helps.</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing_top"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F18%2Fubuntu-11-10-boot-problem%2F&amp;layout=standard&amp;show_faces=false&amp;width=51px&amp;height=24px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:51px; height:24px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing_top"><a href="http://twitter.com/share?url=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F18%2Fubuntu-11-10-boot-problem%2F&amp;text=Ubuntu+11.10+boot+problem" target="_blank" class="mr_social_sharing_popup_link"><img src="http://dellaert.org/wp-content/plugins/social-sharing-toolkit/images/buttons/twitter.png" alt="Share on Twitter" title="Share on Twitter"/></a></span><span class="mr_social_sharing_top"><g:plusone size="medium" count="false" href="http://dellaert.org/2011/12/18/ubuntu-11-10-boot-problem/"></g:plusone></span><span class="mr_social_sharing_top"><script type="IN/Share" data-url="http://dellaert.org/2011/12/18/ubuntu-11-10-boot-problem/"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://dellaert.org/2011/12/18/ubuntu-11-10-boot-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving my VMware vCenter 4.1 and VMware Update Manager database</title>
		<link>http://dellaert.org/2011/12/12/moving-my-vmware-vcenter-4-1-and-vmware-update-manager-database/</link>
		<comments>http://dellaert.org/2011/12/12/moving-my-vmware-vcenter-4-1-and-vmware-update-manager-database/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 19:58:35 +0000</pubDate>
		<dc:creator>straks</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://dellaert.org/?p=228</guid>
		<description><![CDATA[I have already explained that i have a local vSphere setup running as a test environment. Of course i use vCenter for that, not much use to have a cluster running and not using vCenter ;). As this setup is a small environment, i chose to use the MSSQL Server 2005 Express which is bundled [...]]]></description>
			<content:encoded><![CDATA[<p>I have already explained that i have a local vSphere setup running as a test environment. Of course i use vCenter for that, not much use to have a cluster running and not using vCenter ;).</p>
<p>As this setup is a small environment, i chose to use the MSSQL Server 2005 Express which is bundled with the vCenter 4.1 U1 installer. But with the release of vSphere 5, vCenter no longer supports MSSQL Server 2005 Express.</p>
<p>The solution? Install MSSQL Server 2008 R2 which i have a license for because of my Microsoft Action Pack Subscription and move the database of vCenter 4.1 and Update Manager to this new DB server.</p>
<p>So in one of my Windows Server 2008 Enterprise VM&#8217;s i installed the SQL server and set it up to contain the databases for VMware Update Manager and VMware vCenter.</p>
<h3>First up: Update manager!</h3>
<p>Moving the database to the new server was rather easy. Steps i took:</p>
<ol>
<li>Allowed mixed authentication</li>
<li>created a user with sysadmin rights, just for the ease of it</li>
<li>Made a database called VIM_UMDB</li>
<li>Set the compatibility to 90 (MSSQL 2005)</li>
<li>Stopped Update Manager</li>
<li>Took a backup of it&#8217;s database</li>
<li>Restored it to the VIM_UMDB on the new server (overwrite everything)</li>
</ol>
<p>After this step something went wrong, it took a while before i figured out the problem was with the Database connector. It seems so logical now, but it took me a while to figure it out. So a little guide after you moved the DB:</p>
<ol>
<li>Install the MSSQL 2008 R2 Native Client, this also installs a 32bit driver. You can download it from <a href="http://www.microsoft.com/download/en/details.aspx?id=16978" target="_blank">here</a> (search for Native Client)</li>
<li>Open odbcad32.exe (C:\Windows\SysWOW64\odbcad32.exe) , <span style="text-decoration: underline;">not</span> the regular ODBC configruation. This is where i went wrong, you need to open the 32 bit version to add a 32 bit connector.</li>
<li>Add a new connector with the SQL Server Native Client 10.0 driver and name it something you can remember</li>
</ol>
<p>Now the only thing we need is to change the configuration of the Update Manager so it knows to use the new database connector.</p>
<ol>
<li>Just open C:\Program Files (x86)\VMware\Infrastructure\Update Manager\vci-integrity.xml</li>
<li>Find the &lt;database&gt; tag</li>
<li>In the &lt;dbtype&gt; tag, fill in: SQL Server Native Client 10.0</li>
<li>In the &lt;dsn&gt; tag, fill in the name of the DB connector you created.</li>
<li>Save the file</li>
<li>Restart the Update Manager</li>
</ol>
<p>To be sure, connect to your vCenter server with the client, and see if you get an error about the Update Manager. If not, check if you can scan a host or something. If everything works, great, you successfully moved your Update Manager database!</p>
<h3>Next: vCenter Database</h3>
<p>This should be a bit easier cause VMware has a <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=7960893" target="_blank">Knowledge Base article</a> about it (and <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1028601" target="_blank">another one</a>). And my experience with the Update Manager database did help. Basically the first 10 steps (1-7 and 1-3) are the same, except you just create a normal DSN (so don&#8217;t use the 32 bit odbcad32.exe). Next steps:</p>
<ol>
<li>Uninstall vCenter&#8230; Yes, indeed, uninstall it.</li>
<li>Reboot your vCenter server</li>
<li>Reinstall vCenter</li>
<li>During the install select the newly created database connection.</li>
<li>Don&#8217;t forget to recreate the statistics rollup job in SQL server (<a href="http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&amp;externalId=1004382">KB Article</a>)</li>
</ol>
<div>After you reinstalled vCenter, you will have to reconnect the Update Manager to it. You can do this by using the VMwareUpdateManagerUtility in the C:\Program Files (x86)\VMware\Infrastructure\Update Manager folder.</div>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing_top"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F12%2Fmoving-my-vmware-vcenter-4-1-and-vmware-update-manager-database%2F&amp;layout=standard&amp;show_faces=false&amp;width=51px&amp;height=24px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:51px; height:24px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing_top"><a href="http://twitter.com/share?url=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F12%2Fmoving-my-vmware-vcenter-4-1-and-vmware-update-manager-database%2F&amp;text=Moving+my+VMware+vCenter+4.1+and+VMware+Update+Manager+database" target="_blank" class="mr_social_sharing_popup_link"><img src="http://dellaert.org/wp-content/plugins/social-sharing-toolkit/images/buttons/twitter.png" alt="Share on Twitter" title="Share on Twitter"/></a></span><span class="mr_social_sharing_top"><g:plusone size="medium" count="false" href="http://dellaert.org/2011/12/12/moving-my-vmware-vcenter-4-1-and-vmware-update-manager-database/"></g:plusone></span><span class="mr_social_sharing_top"><script type="IN/Share" data-url="http://dellaert.org/2011/12/12/moving-my-vmware-vcenter-4-1-and-vmware-update-manager-database/"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://dellaert.org/2011/12/12/moving-my-vmware-vcenter-4-1-and-vmware-update-manager-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.2 DateTime diff() issue</title>
		<link>http://dellaert.org/2011/12/04/php-5-3-2-datetime-diff-issue/</link>
		<comments>http://dellaert.org/2011/12/04/php-5-3-2-datetime-diff-issue/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 12:52:39 +0000</pubDate>
		<dc:creator>straks</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dellaert.org/?p=85</guid>
		<description><![CDATA[It seems that PHP 5.3.2 ( 5.3.2-1ubuntu4.10 ) has a small issue when using the DateTime diff() method. Got this code: PHP < ?php $mode = 'D'; $back = 1; $start = new \DateTime(); $start->setTime(0, 0); $start->sub(new \DateInterval('P'.$back.$mode)); $end = new \DateTime(); $end->setTime(0, 0); if( $back > 0 ) { $end->sub(new \DateInterval('P'.($back-1).$mode)); } else { $end->add(new \DateInterval('P1'.$mode)); [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that PHP 5.3.2 ( 5.3.2-1ubuntu4.10 ) has a small issue when using the <a href="http://www.php.net/manual/en/datetime.diff.php" target="_blank">DateTime diff() method</a>.</p>
<p>Got this code:<br />


<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1cf946 .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1cf946" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1cf946'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1cf946'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1cf946'); return false;"></a><span class="crayon-language">PHP</span><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">< ?php
$mode = 'D';
$back = 1;
$start = new \DateTime();
$start->setTime(0, 0);
$start->sub(new \DateInterval('P'.$back.$mode));
$end = new \DateTime();
$end->setTime(0, 0);
if( $back > 0 ) {
	$end->sub(new \DateInterval('P'.($back-1).$mode));
} else {
	$end->add(new \DateInterval('P1'.$mode));
}

echo $start->format('Y-m-d H:i:s') . "\n";
echo $end->format('Y-m-d H:i:s') . "\n";
$dt = $start->diff($end);
echo $start->format('Y-m-d H:i:s') . "\n";
echo $end->format('Y-m-d H:i:s') . "\n";
$differenceDays = $dt->format('%a');
echo $differenceDays."\n";
?></textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div><div class="crayon-num crayon-striped-num">2</div><div class="crayon-num">3</div><div class="crayon-num crayon-striped-num">4</div><div class="crayon-num">5</div><div class="crayon-num crayon-striped-num">6</div><div class="crayon-num">7</div><div class="crayon-num crayon-striped-num">8</div><div class="crayon-num">9</div><div class="crayon-num crayon-striped-num">10</div><div class="crayon-num">11</div><div class="crayon-num crayon-striped-num">12</div><div class="crayon-num">13</div><div class="crayon-num crayon-striped-num">14</div><div class="crayon-num">15</div><div class="crayon-num crayon-striped-num">16</div><div class="crayon-num">17</div><div class="crayon-num crayon-striped-num">18</div><div class="crayon-num">19</div><div class="crayon-num crayon-striped-num">20</div><div class="crayon-num">21</div><div class="crayon-num crayon-striped-num">22</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="o ">&lt;</span><span class="h "> </span><span class="sy ">?</span><span class="cn ">php</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-2"><span class="v ">$mode</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="s ">'D'</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-3"><span class="v ">$back</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="h "></span>1<span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-4"><span class="v ">$start</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="r ">new</span><span class="h "> </span><span class="sy ">\</span><span class="e ">DateTime</span><span class="sy ">(</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-5"><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">setTime</span><span class="sy ">(</span><span class="h "></span>0<span class="sy ">,</span><span class="h "> </span><span class="h "></span>0<span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-6"><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">sub</span><span class="sy ">(</span><span class="r ">new</span><span class="h "> </span><span class="sy ">\</span><span class="e ">DateInterval</span><span class="sy ">(</span><span class="s ">'P'</span><span class="sy ">.</span><span class="v ">$back</span><span class="sy ">.</span><span class="v ">$mode</span><span class="sy ">)</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-7"><span class="v ">$end</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="r ">new</span><span class="h "> </span><span class="sy ">\</span><span class="e ">DateTime</span><span class="sy ">(</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-8"><span class="v ">$end</span><span class="o ">-&gt;</span><span class="e ">setTime</span><span class="sy ">(</span><span class="h "></span>0<span class="sy ">,</span><span class="h "> </span><span class="h "></span>0<span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-9"><span class="st ">if</span><span class="sy ">(</span><span class="h "> </span><span class="v ">$back</span><span class="h "> </span><span class="o ">&gt;</span><span class="h "> </span><span class="h "></span>0<span class="h "> </span><span class="sy ">)</span><span class="h "> </span><span class="sy ">{</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-10"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$end</span><span class="o ">-&gt;</span><span class="e ">sub</span><span class="sy ">(</span><span class="r ">new</span><span class="h "> </span><span class="sy ">\</span><span class="e ">DateInterval</span><span class="sy ">(</span><span class="s ">'P'</span><span class="sy ">.</span><span class="sy ">(</span><span class="v ">$back</span><span class="o ">-</span><span class="h "></span>1<span class="sy ">)</span><span class="sy ">.</span><span class="v ">$mode</span><span class="sy ">)</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-11"><span class="sy ">}</span><span class="h "> </span><span class="st ">else</span><span class="h "> </span><span class="sy ">{</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-12"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$end</span><span class="o ">-&gt;</span><span class="e ">add</span><span class="sy ">(</span><span class="r ">new</span><span class="h "> </span><span class="sy ">\</span><span class="e ">DateInterval</span><span class="sy ">(</span><span class="s ">'P1'</span><span class="sy ">.</span><span class="v ">$mode</span><span class="sy ">)</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-13"><span class="sy ">}</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-14"><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-15"><span class="k">echo</span><span class="h "> </span><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">format</span><span class="sy ">(</span><span class="s ">'Y-m-d H:i:s'</span><span class="sy ">)</span><span class="h "> </span><span class="sy ">.</span><span class="h "> </span><span class="s ">"\n"</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-16"><span class="k">echo</span><span class="h "> </span><span class="v ">$end</span><span class="o ">-&gt;</span><span class="e ">format</span><span class="sy ">(</span><span class="s ">'Y-m-d H:i:s'</span><span class="sy ">)</span><span class="h "> </span><span class="sy ">.</span><span class="h "> </span><span class="s ">"\n"</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-17"><span class="v ">$dt</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">diff</span><span class="sy ">(</span><span class="v ">$end</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-18"><span class="k">echo</span><span class="h "> </span><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">format</span><span class="sy ">(</span><span class="s ">'Y-m-d H:i:s'</span><span class="sy ">)</span><span class="h "> </span><span class="sy ">.</span><span class="h "> </span><span class="s ">"\n"</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-19"><span class="k">echo</span><span class="h "> </span><span class="v ">$end</span><span class="o ">-&gt;</span><span class="e ">format</span><span class="sy ">(</span><span class="s ">'Y-m-d H:i:s'</span><span class="sy ">)</span><span class="h "> </span><span class="sy ">.</span><span class="h "> </span><span class="s ">"\n"</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-20"><span class="v ">$differenceDays</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="v ">$dt</span><span class="o ">-&gt;</span><span class="e ">format</span><span class="sy ">(</span><span class="s ">'%a'</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-21"><span class="k">echo</span><span class="h "> </span><span class="v ">$differenceDays</span><span class="sy ">.</span><span class="s ">"\n"</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-22"><span class="k">?&gt;</span><span class="f"></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0075 seconds] -->

</p>
<p>This code results in:</p>
<pre>2011-12-03 00:00:00
2011-12-04 00:00:00
2011-12-02 00:00:00
2011-12-04 00:00:00
2</pre>
<p>It seems the diff statement changes the starting date to a date before. This is kind of an issue, i need that difference in a project between days, weeks, months and even years. And the issue get&#8217;s worse if you use weeks (the difference becomes 14 days instead of 7) in the interval or months (61 instead of 30 or 31). So i decided to use a quickfix to calculate the difference, cause this was not working&#8230;</p>
<p>The workaround needed to change depending on the mode variable (day, week, month or year). For day and week it could just be 1 and 7 days, but the amount of days in a month and years changes per month and per year (leap years). So i came up with:</p>
<p>

<!-- Crayon Syntax Highlighter v1.6.3 -->
<style type="text/css">#crayon-4f4568d1cf9c5 .crayon-plain { font-size: 12px !important; line-height: 16px !important;}</style>
		<div id="crayon-4f4568d1cf9c5" class="crayon-syntax crayon-theme-classic" crayon-os="pc" settings=" scroll-mouseover" style=" margin-top: 12px; margin-bottom: 12px; float: none; clear: both;">
		
			<div class="crayon-toolbar" settings=" mouseover overlay hide delay">
			<div class="crayon-tools"><a href="#" class="crayon-nums-button crayon-button" title="Toggle Line Numbers" onclick="toggle_nums('crayon-4f4568d1cf9c5'); return false;"></a><a href="#" class="crayon-copy-button crayon-button" title="Copy Plain Code" onclick="copy_plain('crayon-4f4568d1cf9c5'); return false;"></a><a href="#" class="crayon-popup-button crayon-button" title="Open Code in Window" onclick="return false;"></a><a href="#" class="crayon-plain-button crayon-button" title="Toggle Plain Code" onclick="toggle_plain('crayon-4f4568d1cf9c5'); return false;"></a><span class="crayon-language">PHP</span><a href="#" class="crayon-nums-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-copy-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-popup-button crayon-button crayon-pressed crayon-invisible"></a><a href="#" class="crayon-plain-button crayon-button crayon-pressed crayon-invisible"></a></div>
			</div><div><textarea class="crayon-plain" settings="dblclick" readonly  wrap="off" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">< ?php
switch($mode) {
	case "day":
		$differenceDays = 1;
		break;
	case "week":
		$differenceDays = 7;
		break;
	case "month":
		$differenceDays = date('t',$start->getTimestamp());
		break;
	case "year":
		$differenceDays = 365;
		if( date('L',mktime(0,0,0,1,1,$start->format('Y'))) == 1 ) {
			$differenceDays++;
		}
	break;
}
?></textarea></div><div class="crayon-info"></div>
			<div class="crayon-main" style="">
				<table class="crayon-table" cellpadding="0" cellspacing="0">
					<tr class="crayon-row">
				<td class="crayon-nums " settings="show">
					<div class="crayon-nums-content"><div class="crayon-num">1</div><div class="crayon-num crayon-striped-num">2</div><div class="crayon-num">3</div><div class="crayon-num crayon-striped-num">4</div><div class="crayon-num">5</div><div class="crayon-num crayon-striped-num">6</div><div class="crayon-num">7</div><div class="crayon-num crayon-striped-num">8</div><div class="crayon-num">9</div><div class="crayon-num crayon-striped-num">10</div><div class="crayon-num">11</div><div class="crayon-num crayon-striped-num">12</div><div class="crayon-num">13</div><div class="crayon-num crayon-striped-num">14</div><div class="crayon-num">15</div><div class="crayon-num crayon-striped-num">16</div><div class="crayon-num">17</div><div class="crayon-num crayon-striped-num">18</div><div class="crayon-num">19</div></div>
				</td>
						<td class="crayon-code"><div class="crayon-pre"><div class="crayon-line" id="line-1"><span class="o ">&lt;</span><span class="h "> </span><span class="sy ">?</span><span class="cn ">php</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-2"><span class="st ">switch</span><span class="sy ">(</span><span class="v ">$mode</span><span class="sy ">)</span><span class="h "> </span><span class="sy ">{</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-3"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">case</span><span class="h "> </span><span class="s ">"day"</span><span class="o ">:</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-4"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$differenceDays</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="h "></span>1<span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-5"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">break</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-6"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">case</span><span class="h "> </span><span class="s ">"week"</span><span class="o ">:</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-7"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$differenceDays</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="h "></span>7<span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-8"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">break</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-9"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">case</span><span class="h "> </span><span class="s ">"month"</span><span class="o ">:</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-10"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$differenceDays</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="e ">date</span><span class="sy ">(</span><span class="s ">'t'</span><span class="sy ">,</span><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">getTimestamp</span><span class="sy ">(</span><span class="sy ">)</span><span class="sy ">)</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-11"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">break</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-12"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">case</span><span class="h "> </span><span class="s ">"year"</span><span class="o ">:</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-13"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$differenceDays</span><span class="h "> </span><span class="o ">=</span><span class="h "> </span><span class="h "></span>3<span class="h "></span>6<span class="h "></span>5<span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-14"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">if</span><span class="sy ">(</span><span class="h "> </span><span class="e ">date</span><span class="sy ">(</span><span class="s ">'L'</span><span class="sy ">,</span><span class="e ">mktime</span><span class="sy ">(</span><span class="h "></span>0<span class="sy ">,</span><span class="h "></span>0<span class="sy ">,</span><span class="h "></span>0<span class="sy ">,</span><span class="h "></span>1<span class="sy ">,</span><span class="h "></span>1<span class="sy ">,</span><span class="v ">$start</span><span class="o ">-&gt;</span><span class="e ">format</span><span class="sy ">(</span><span class="s ">'Y'</span><span class="sy ">)</span><span class="sy ">)</span><span class="sy ">)</span><span class="h "> </span><span class="o ">==</span><span class="h "> </span><span class="h "></span>1<span class="h "> </span><span class="sy ">)</span><span class="h "> </span><span class="sy ">{</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-15"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="v ">$differenceDays</span><span class="o ">++</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-16"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="sy ">}</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-17"><span class="h ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="st ">break</span><span class="sy ">;</span><span class="h "></span><span class="h "></span></div><div class="crayon-line crayon-striped-line" id="line-18"><span class="sy ">}</span><span class="h "></span><span class="h "></span></div><div class="crayon-line" id="line-19"><span class="k">?&gt;</span><span class="f"></span></div></div></td>
					</tr>
				</table>
			</div>
		</div>
<!-- [Parse Time: 0.0000 seconds] [Format Time: 0.0047 seconds] -->

</p>
<p>I decided to use the mktime function, because the getTimestamp() gave some issues concerning timezones (i think ;))</p>
<h3> Update</h3>
<p><a href="http://www.linkedin.com/in/dries" target="_blank">Dries Verachtert</a> pointed me to a <a href="http://www.php.net/manual/en/datetime.sub.php#101175" target="_blank">comment</a> on the page of the <a href="http://www.php.net/manual/en/datetime.sub.php" target="_blank">DateTime sub method</a>. The short of it:</p>
<blockquote><p>If you use diff() after sub(), the effects of the sub() will be repeated on the date object.<br />
It doesn&#8217;t matter if the object is the one diffed or doing the diffing (i.e. which object you call diff() from).<br />
Note that using add() instead of sub() does NOT have the same effect.<br />
This is particularly undesirable &#8212; in this example you make a datetime, use sub() to make it a relative time in the past, and then date-&gt;diff() to confirm the difference. But the diff() inadvertendly makes the difference 2x.</p></blockquote>
<p>Strange issue, but i can tell you it&#8217;s fixed in 5.3.3, as i have running that on an internal test server, and the code does a perfect job on that.</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing_top"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F04%2Fphp-5-3-2-datetime-diff-issue%2F&amp;layout=standard&amp;show_faces=false&amp;width=51px&amp;height=24px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:51px; height:24px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing_top"><a href="http://twitter.com/share?url=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F04%2Fphp-5-3-2-datetime-diff-issue%2F&amp;text=PHP+5.3.2+DateTime+diff%28%29+issue" target="_blank" class="mr_social_sharing_popup_link"><img src="http://dellaert.org/wp-content/plugins/social-sharing-toolkit/images/buttons/twitter.png" alt="Share on Twitter" title="Share on Twitter"/></a></span><span class="mr_social_sharing_top"><g:plusone size="medium" count="false" href="http://dellaert.org/2011/12/04/php-5-3-2-datetime-diff-issue/"></g:plusone></span><span class="mr_social_sharing_top"><script type="IN/Share" data-url="http://dellaert.org/2011/12/04/php-5-3-2-datetime-diff-issue/"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://dellaert.org/2011/12/04/php-5-3-2-datetime-diff-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a new VPS</title>
		<link>http://dellaert.org/2011/12/03/setting-up-a-new-vps/</link>
		<comments>http://dellaert.org/2011/12/03/setting-up-a-new-vps/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 14:43:12 +0000</pubDate>
		<dc:creator>straks</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://dellaert.org/?p=38</guid>
		<description><![CDATA[Today i decided to get a new VPS from Shift to the cloud, a new project from Stone Internet Services (@stoneis). Stone IS has been a choice for webhosting and domain registration for me and my clients for years, and i have always been happy with their service. In the past i have always counted on ULYSSIS for my [...]]]></description>
			<content:encoded><![CDATA[<p>Today i decided to get a new VPS from <a title="shift to the cloud" href="http://www.shifttothecloud.com/en" target="_blank">Shift to the cloud</a>, a new project from <a title="Stone Internet Services" href="http://www.stone-is.com" target="_blank">Stone Internet Services</a> (<a href="http://twitter.com/stoneis">@stoneis</a>). Stone IS has been a choice for webhosting and domain registration for me and my clients for years, and i have always been happy with their service.</p>
<p>In the past i have always counted on <a title="ULYSSIS" href="http://ulyssis.org" target="_blank">ULYSSIS</a> for my personal hosting, as i have been vice-president of this organisation and have a free account because of that. But lately, i realized that, although their service is incredible for an organization of volunteers, it is not as open and free as having an own server at your disposal.</p>
<p>Ordering the server was rather easy, i only had an issue with the payment system, but i hope it was just a fluke and not something others experience. At least the service desk helped me out pretty quick. I opened an issue last night and it was fixed by the time i woke up this morning, on a Saturday.</p>
<p>After i got the base VM (Ubuntu 10.04 LTS) running i started to configure it by installing some base packages like apache, openssl, php5, suphp, &#8230; After a while i noticed it didn&#8217;t have the promised IPv6 address, so i opened another support ticket, and it took them about 15 minutes to fix it. If that&#8217;s an indication of response time for the Best Effort SLA, i am impressed.</p>
<p>When the IPv6 address was enabled, i did get into trouble with Apache. Everytime i wanted to start it, it crashed with the following error:</p>
<pre style="padding-left: 30px;">[Sat Dec 03 12:48:52 2011] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)</pre>
<p>Whenever i disabled SSL, it worked fine. After a few google searches, i came to the conclusion that the automatically generated SSL certificates became invalid with the change of network interfaces/addresses. I fixed that quickly by creating a new certificate, and my own Certificate Authority . If you need some info on how to do that, you can find a <a title="Your own CA and Self-signed certificate" href="http://www.tc.umn.edu/~brams006/selfsign.html" target="_blank">good tutorial on the website of Paul Bramscher</a>.</p>
<p>And now that this blog is moved to the server, we&#8217;ll see how it goes. Next step will be to move my <a title="Symfony2" href="http://symfony.com/" target="_blank">Symfony2</a> project from my development environment (VM on a personal vSphere setup on two local servers) to this server, so i can more easily access it from anywhere.</p>
<p>Other plans include setting up a monitoring system (Nagios) to monitor my internal network and some servers and environments of my smaller clients (who do not have the resources to implement it locally). This kind of monitoring system is already running on my local vSphere farm, but that means it uses my personal internet connection, which is just a commercial connection (once or twice a month it goes down in the middle of the night for 10-15 minutes).</p>

				<!-- Social Sharing Toolkit v2.0.4 | http://www.marijnrongen.com/wordpress-plugins/social_sharing_toolkit/ -->
				<div class="mr_social_sharing_wrapper"><span class="mr_social_sharing_top"><iframe src="https://www.facebook.com/plugins/like.php?locale=en_US&amp;href=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F03%2Fsetting-up-a-new-vps%2F&amp;layout=standard&amp;show_faces=false&amp;width=51px&amp;height=24px" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:51px; height:24px;" allowTransparency="true"></iframe></span><span class="mr_social_sharing_top"><a href="http://twitter.com/share?url=http%3A%2F%2Fdellaert.org%2F2011%2F12%2F03%2Fsetting-up-a-new-vps%2F&amp;text=Setting+up+a+new+VPS" target="_blank" class="mr_social_sharing_popup_link"><img src="http://dellaert.org/wp-content/plugins/social-sharing-toolkit/images/buttons/twitter.png" alt="Share on Twitter" title="Share on Twitter"/></a></span><span class="mr_social_sharing_top"><g:plusone size="medium" count="false" href="http://dellaert.org/2011/12/03/setting-up-a-new-vps/"></g:plusone></span><span class="mr_social_sharing_top"><script type="IN/Share" data-url="http://dellaert.org/2011/12/03/setting-up-a-new-vps/"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://dellaert.org/2011/12/03/setting-up-a-new-vps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

