<?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>TBNL &#187; xampp</title>
	<atom:link href="http://www.tibobeijen.nl/blog/tag/xampp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tibobeijen.nl</link>
	<description>...another view on the web and how it's built</description>
	<lastBuildDate>Wed, 06 Jul 2011 19:28:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Installing PHPUnit on XAMPP Lite (Windows)</title>
		<link>http://www.tibobeijen.nl/blog/2009/05/17/installing-phpunit-on-xampp-lite-windows/</link>
		<comments>http://www.tibobeijen.nl/blog/2009/05/17/installing-phpunit-on-xampp-lite-windows/#comments</comments>
		<pubDate>Sun, 17 May 2009 13:39:00 +0000</pubDate>
		<dc:creator>Tibo Beijen</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.tibobeijen.nl/?p=360</guid>
		<description><![CDATA[At my work PHPUnit is &#8216;just there&#8217; but it&#8217;s not on my home machine where I&#8217;m running an out of the box XAMPP Lite setup. So I visited the PHPUnit installation manual and all looked easy: pear channel-discover pear.phpunit.de pear install phpunit/PHPUnit But what I got was a message saying my pear installer was out [...]]]></description>
			<content:encoded><![CDATA[<p>At my work PHPUnit is &#8216;just there&#8217; but it&#8217;s not on my home machine where I&#8217;m running an out of the box <a href="http://www.apachefriends.org/en/xampp-windows.html#646">XAMPP Lite</a> setup. So I visited the <a href="http://www.phpunit.de/manual/current/en/installation.html">PHPUnit installation manual</a> and all looked easy:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">pear channel-discover pear.phpunit.de
pear install phpunit/PHPUnit</pre></div></div>

<p>But what I got was a message saying my pear installer was out of date, 1.7.1 was needed. Running &#8216;pear -V&#8217; showed:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">E:\Xampplite\php&gt;pear -V
PEAR Version: 1.4.5
PHP Version: 5.2.5
Zend Engine Version: 2.2.0
Running on: Windows NT T1720 6.0 build 6000</pre></div></div>

<p>Allright, upgrading PEAR it is. That was not as straightforward as hoped.<br />
<span id="more-360"></span></p>
<h3>go-pear</h3>
<p>I don&#8217;t know much about PEAR so I found a lot of possible solutions ranging from manually installing specific packages to something a bit more straightforward like &#8216;go-pear&#8217;. Better start simple so &#8216;go-pear&#8217; it is. That started fine but ended up in a number of the following messages:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Warning: Cannot use a scalar value as an array in phar://go-pear.phar/PEAR/Comma
nd.php on line 268</pre></div></div>

<p>After finding the right keywords to put into google I came on <a href="http://www.phpwomen.org/wordpress/2006/11/06/bundled-go-pearphar-broken-in-52-windows-releases/">this page on PHPWomen.org</a>. Spot on. After replacing go-pear.phar (rename the old one first, you never know) &#8216;go-pear&#8217; at least stopped showing aforementioned errors but displayed some warnings (Commit Failed) that made me suspicious. And indeed, &#8216;pear -V&#8217; still showed 1.4.5.</p>
<h3>pear upgrade</h3>
<p>Luckily I had quite some google tabs open allready so I proceeded with the next strategy:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">E:\Xampplite\php&gt;pear upgrade pear
downloading PEAR-1.8.1.tgz ...
Starting to download PEAR-1.8.1.tgz (290,382 bytes)
............................................................done: 290,382 bytes
downloading Archive_Tar-1.3.3.tgz ...
Starting to download Archive_Tar-1.3.3.tgz (18,119 bytes)
...done: 18,119 bytes
downloading Console_Getopt-1.2.3.tgz ...
Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes)
...done: 4,011 bytes
upgrade ok: channel://pear.php.net/Archive_Tar-1.3.3
upgrade ok: channel://pear.php.net/Console_Getopt-1.2.3
Could not delete E:\Xampplite\php\pear.bat, cannot rename E:\Xampplite\php\.tmpp
ear.bat
ERROR: commit failed</pre></div></div>

<p>Bummer. I tried renaming pear.bat but then the installer came with the same message for pear-dev.bat so I looked for a &#8216;real&#8217; solution. Once again finding the right keywords (pear upgrade cannot delete windows) Google did the rest and yielded <a href="http://www.pear-forum.org/topic1201.html">a page on pear-forum.org</a>. I was one third on my way to the &#8216;real&#8217; solution that is renaming the following files:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">rename pear.bat _pear.bat
rename peardev.bat _peardev.bat
rename pecl.bat _pecl.bat</pre></div></div>

<p>Followed by:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">_pear upgrade pear</pre></div></div>

<p>Resulting in:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">E:\Xampplite\php&gt;pear -V
PEAR Version: 1.8.1
PHP Version: 5.2.5
Zend Engine Version: 2.2.0
Running on: Windows NT T1720 6.0 build 6000</pre></div></div>

<h3>Victory</h3>
<p>Retrying installing of PHPUnit now worked.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">E:\Xampplite&gt;phpunit --version
PHPUnit 3.3.16 by Sebastian Bergmann.</pre></div></div>

<p>One final thing. It&#8217;s very convenient to add the php directory to environment path setting to allow for executing &#8216;php&#8217; or &#8216;phpunit&#8217; from whatever project directory. Do so by going to (on Vista, XP might differ):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Control Panel -&gt;
System -&gt;
Advanced system settings -&gt;
(In the popup, bottom button) Environment Variables -&gt;
(Lower list) Select path &amp; choose 'edit'</pre></div></div>

<p>Now add the php directory to the end of the line, in this case &#8220;;E:\Xampplite\php&#8221; (without the quotes). A restart might be needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tibobeijen.nl/blog/2009/05/17/installing-phpunit-on-xampp-lite-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

