<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>&#60;?php</title>
	<atom:link href="http://sgehrig.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sgehrig.wordpress.com</link>
	<description>Trying to share my thoughts on PHP and Zend Framework</description>
	<lastBuildDate>Mon, 08 Aug 2011 14:51:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sgehrig.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9981117a75363fcb36d04e6cbb74b196?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>&#60;?php</title>
		<link>http://sgehrig.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sgehrig.wordpress.com/osd.xml" title="&#60;?php" />
	<atom:link rel='hub' href='http://sgehrig.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Reading paged LDAP results with PHP is a show-stopper</title>
		<link>http://sgehrig.wordpress.com/2009/11/06/reading-paged-ldap-results-with-php-is-a-show-stopper/</link>
		<comments>http://sgehrig.wordpress.com/2009/11/06/reading-paged-ldap-results-with-php-is-a-show-stopper/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 14:52:20 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ext/ldap]]></category>
		<category><![CDATA[ldap]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/2009/11/06/reading-paged-ldap-results-with-php-is-a-show-stopper/</guid>
		<description><![CDATA[I was writing the schema introspection code for Zend_Ldap when I came around a problem with Active Directory’s MaxPageSize restriction. By default Active Directory allows only 1000 items to be returned on a single query, a number which is easily exceeded when reading an Active Directory’s classes and especially attributes from the schema tree. OK [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=113&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was writing the schema introspection code for <code>Zend_Ldap</code> when I came around a problem with Active Directory’s <code>MaxPageSize</code> restriction. By default Active Directory allows only 1000 items to be returned on a single query, a number which is easily exceeded when reading an Active Directory’s classes and especially attributes from the schema tree. OK – one option would be to increase the <code>MaxPageSize</code> variable, but as the component should be usable on every Active Directory server I couldn’t go for that.</p>
<p>The second option that seemed possible makes use of the paged result sets that Active Directory returns on a query. This way led me into the world of LDAP server controls and deep into the <code>ext/ldap</code> source code. There is astonishingly little information on the topic of paged result sets and LDAP server controls in respect of PHP and <code>ext/ldap</code>. To be honest I assume that only one person really looked into this area seriously and even came up with a solution: Iñaki Arenaza (<a href="http://iarenaza.blogs.mondragon.edu/" target="_blank">Blog</a>, <a href="http://twitter.com/iarenaza" target="_blank">Twitter</a>, <a href="http://www.facebook.com/profile.php?id=769854628" target="_blank">Facebook</a>, <a href="http://www.linkedin.com/in/iarenaza" target="_blank">LinkedIn</a>). His information provided <a href="http://moodle.org/mod/forum/discuss.php?d=28791" target="_blank">here</a> is the foundation of this article – the discoveries are absolutely not my work, they are all based on what Iñaki Arenaza dug out. I just wanted to bring a little light into this very specific topic (and summarize what I’ve answered on <a href="http://stackoverflow.com/questions/1473075/enumerate-all-users-in-ldap-with-php/1476287#1476287" target="_blank">stackoverflow.com</a>).</p>
<p>To make it short right from the beginning: <strong>it&#8217;s currently not possible to use paged results from an Active Directory with an unpatched PHP (<code>ext/ldap</code>)</strong>.</p>
<p>Let’s take a closer look at what’s happening.</p>
<p>Active Directory uses a server control to accomplish server-side result paging. This control is described in <a href="http://www.ietf.org/rfc/rfc2696.txt">RFC 2696 &#8220;LDAP Control Extension for Simple Paged Results Manipulation&#8221;</a> . LDAP controls, which come in the flavors “server” and “client”, are extensions to the LDAP protocol to provide enhancements – result paging is one example, password policy is another one. Generally <code>ext/ldap</code> offers an access to LDAP control extensions via its <a href="http://fr.php.net/manual/en/function.ldap-set-option.php"><code>ldap_set_option()</code></a> and the<code>LDAP_OPT_SERVER_CONTROLS</code> and <code>LDAP_OPT_CLIENT_CONTROLS</code> option respectively. To setup the paged control we do need the control-oid, which is <code>1.2.840.113556.1.4.319</code>, and we need to know how to encode the control-value (this is described in the <a href="http://www.ietf.org/rfc/rfc2696.txt">RFC</a>). The value is an octet string wrapping the BER-encoded version of the following SEQUENCE (copied from the RFC):</p>
<pre>realSearchControlValue ::= SEQUENCE {
    size    INTEGER (0..maxInt),
                     -- requested page size from client
                     -- result set size estimate from server
    cookie  OCTET STRING
}</pre>
<p>So we can setup the control prior to executing the LDAP desired query:</p>
<pre>$pageSize    = 100;
$pageControl = array(
    // the control-oid
    'oid'        =&gt; '1.2.840.113556.1.4.319',
    // the operation should fail if the server is not able to support this control
    'iscritical' =&gt; true,
    // the required BER-encoded control-value
    'value'      =&gt; sprintf ("%c%c%c%c%c%c%c", 48, 5, 2, 1, $pageSize, 4, 0)
);</pre>
<p>This allows us to send a paged query to the LDAP/AD server. But how do we know if there are more pages to follow and how do we have to send a query to get the next page of our result set?</p>
<p>The server responds with a result set that includes the required paging information &#8211; but PHP lacks a method to retrieve exactly this information from the result set. In fact ext/ldap provides the required function (<code><a href="http://fr.php.net/manual/en/function.ldap-parse-result.php" target="_blank">ldap_parse_result()</a></code>) but it fails to expose the required seventh and last argument <code>serverctrlsp</code> from the C function <code>ldap_parse_result()</code> in the <a href="http://www.ietf.org/rfc/rfc1823.txt" target="_blank">LDAP API</a>, which contains exactly the information we need to requery for consecutive pages. If we had this argument available in our PHP code, using paged controls would be straight forward:</p>
<pre>$l = ldap_connect('somehost.mydomain.com');
$pageSize    = 100;
$pageControl = array(
    'oid'        =&gt; '1.2.840.113556.1.4.319',
    'iscritical' =&gt; true,
    'value'      =&gt; sprintf ("%c%c%c%c%c%c%c", 48, 5, 2, 1, $pageSize, 4, 0)

);
$controls = array($pageControl);

ldap_set_option($l, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_bind($l, 'CN=bind-user,OU=my-users,DC=mydomain,DC=com', 'bind-user-password');

$continue = true;
while ($continue) {
    ldap_set_option($l, LDAP_OPT_SERVER_CONTROLS, $controls);
    $sr = ldap_search($l, 'OU=some-ou,DC=mydomain,DC=com', 'cn=*', array('sAMAccountName'), null, null, null, null);
    // there's the rub
    ldap_parse_result ($l, $sr, $errcode, $matcheddn, $errmsg, $referrals, $serverctrls);
    if (isset($serverctrls)) {
        foreach ($serverctrls as $i) {
            if ($i["oid"] == '1.2.840.113556.1.4.319') {
                    $i["value"]{8}   = chr($pageSize);
                    $i["iscritical"] = true;
                    $controls        = array($i);
                    break;
            }
        }
    }

    $info = ldap_get_entries($l, $sr);
    if ($info["count"] &lt; $pageSize) {
        $continue = false;
    }

    for ($entry = ldap_first_entry($l, $sr); $entry != false; $entry = ldap_next_entry($l, $entry)) {
        $dn = ldap_get_dn($l, $entry);
    }
}</pre>
<p>As you see, the only option to make all this work, is to mess with the <code>ext/ldap</code> source code and compile your own extension. Iñaki Arenaza provides several patches that can be applied to the PHP source to make patching a lot easier. The patches can be found <a href="http://www.eteo.mondragon.edu/descargas/php-ldap/" target="_blank">here</a> (last one for PHP 5.2.10 from June 24<sup>th</sup> 2009) and there is an accompanying <a href="http://iarenaza.blogs.mondragon.edu/2007/07/08/en-que-gasto-mi-tiempo-ultimamente-moodle-ldap-php-y-c/" target="_blank">blog post</a> available. Iñaki Arenaza even opened <a href="http://bugs.php.net/bug.php?id=34492" target="_blank">an issue</a> in the PHP bug tracker on September 13<sup>th</sup> 2005 offering his help – but there has been no reaction from the developer’s side. What a great pity.</p>
<p>So, if you have to use paged result sets in an Active Directory environment from within a PHP application you can choose between:</p>
<ul>
<li>patch your <code>ext/ldap</code> and compile your own extension as described in this article</li>
<li><a href="http://support.microsoft.com/?scid=kb;en-us;315071" target="_blank">raise the MaxPageSize limit</a> in your Active Directory server</li>
<li>use a completely different approach bypassing <code>ext/ldap</code> and make use of the appropriate COM components (ADODB) as described <a href="http://us3.php.net/manual/en/function.ldap-search.php#73636" target="_blank">here</a> (<em>this only works on Windows machines</em>)</li>
</ul>
<p>It could have been so easy, if…, yes if only the PHP developers considered applying the available patch to the <code>ext/ldap</code> source code.</p>
<br />Posted in PHP Tagged: ext/ldap, ldap <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=113&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2009/11/06/reading-paged-ldap-results-with-php-is-a-show-stopper/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
		<item>
		<title>Remove nodes in SimpleXMLElement</title>
		<link>http://sgehrig.wordpress.com/2009/07/16/remove-nodes-in-simplexmlelement/</link>
		<comments>http://sgehrig.wordpress.com/2009/07/16/remove-nodes-in-simplexmlelement/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 21:56:39 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[simplexml]]></category>
		<category><![CDATA[stackoverflow]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/?p=109</guid>
		<description><![CDATA[Matthias Willerich just picked up my proposal to remove XML nodes from a XML tree when using SimpleXML which I wrote some time ago on stackoverflow.com and posted a small how-to on Content with Style. Nice to know that this idea proved helpful. Posted in PHP Tagged: simplexml, stackoverflow, xml<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=109&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.contentwithstyle.co.uk/content/remove-node-in-simplexml">Matthias Willerich</a> just picked up my proposal to remove XML nodes from a XML tree when using <a href="http://de.php.net/manual/en/book.simplexml.php">SimpleXML</a> which I wrote some time ago on <a href="http://stackoverflow.com/questions/262351/remove-a-child-with-a-specific-attribute-in-simplexml-for-php#262556">stackoverflow.com</a> and posted a small how-to on <a href="http://www.contentwithstyle.co.uk/">Content with Style</a>. Nice to know that this idea proved helpful.</p>
<br />Posted in PHP Tagged: simplexml, stackoverflow, xml <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=109&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2009/07/16/remove-nodes-in-simplexmlelement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
		<item>
		<title>Zend_Ldap promoted to standard trunk</title>
		<link>http://sgehrig.wordpress.com/2009/07/10/zend_ldap-promoted-to-standard-trunk/</link>
		<comments>http://sgehrig.wordpress.com/2009/07/10/zend_ldap-promoted-to-standard-trunk/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 07:46:36 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[Zend_Ldap]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/2009/07/10/zend_ldap-promoted-to-standard-trunk/</guid>
		<description><![CDATA[After some last modifications to make the original Zend_Ldap tests pass with the new extended Zend_Ldap classes, the ZF teams has promoted the component to the standard trunk. I assume that we&#8217;ll have a public release of the code with the 1.9 version of Zend Framework. Posted in Zend Framework Tagged: ldap, Zend_Ldap<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=98&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After some last modifications to make the original Zend_Ldap tests pass with the new extended Zend_Ldap classes, the ZF teams has promoted the component to the standard trunk. </p>
<p>I assume that we&#8217;ll have a public release of the code with the 1.9 version of Zend Framework.</p>
<br />Posted in Zend Framework Tagged: ldap, Zend_Ldap <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=98&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2009/07/10/zend_ldap-promoted-to-standard-trunk/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
		<item>
		<title>Extended Zend_Ldap passes penultimate hurdle</title>
		<link>http://sgehrig.wordpress.com/2009/07/09/extended-zend_ldap-passes-penultimate-hurdle/</link>
		<comments>http://sgehrig.wordpress.com/2009/07/09/extended-zend_ldap-passes-penultimate-hurdle/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 10:08:47 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[Zend_Ldap]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/2009/07/09/extended-zend_ldap-passes-penultimate-hurdle/</guid>
		<description><![CDATA[After Ralph Schindler (member of the Zend Technologies Zend Framework team) reviewed my Zend_Ldap extensions and successfully ran all unit tests, the last hurdle the component has to pass is the documentation. Currently the documentation is somewhat rudimentary but I think we’ll get the docs ready until the 1.9-release. It’s been a long way for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=95&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://ralphschindler.com/" target="_blank">Ralph Schindler</a> (member of the Zend Technologies Zend Framework team) reviewed my <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Ldap+-+Extended+support+-+Stefan+Gehrig" target="_blank">Zend_Ldap</a> extensions and <a href="http://twitter.com/ralphschindler/status/2541038566" target="_blank">successfully ran all unit tests</a>, the last hurdle the component has to pass is the documentation. Currently the documentation is somewhat rudimentary but I think we’ll get the docs ready until the 1.9-release.</p>
<p>It’s been a long way for this component but at last I think we can have a <u><font color="#00ff40"><strong>GO</strong></font></u> for moving the component to trunk shortly.</p>
<br />Posted in Zend Framework Tagged: ldap, Zend_Ldap <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=95&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2009/07/09/extended-zend_ldap-passes-penultimate-hurdle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
		<item>
		<title>Screenshots of game sheets-app for Eishockey.net</title>
		<link>http://sgehrig.wordpress.com/2009/07/09/screenshots-of-game-sheets-app-for-eishockey-net/</link>
		<comments>http://sgehrig.wordpress.com/2009/07/09/screenshots-of-game-sheets-app-for-eishockey-net/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 09:36:00 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Eishockey.net]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/2009/07/09/screenshots-of-game-sheets-app-for-eishockey-net/</guid>
		<description><![CDATA[Currently I’m helping out Eishockey.net with a web-application to allow for the presentation and management of game sheets for the regional ice-hockey leagues in North Rhine-Westphalia. The public part (viewing game sheets, showing statistics) will be integrated in a Joomla installation running JoomLeague, which is a league management module for Joomla. The internal part (creating, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=93&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Currently I’m helping out <a href="http://neu.eishockey.net/" target="_blank">Eishockey.net</a> with a web-application to allow for the presentation and management of game sheets for the regional ice-hockey leagues in North Rhine-Westphalia. The public part (viewing game sheets, showing statistics) will be integrated in a <a href="http://www.joomla.org/" target="_blank">Joomla</a> installation running <a href="http://www.joomleague.de/" target="_blank">JoomLeague</a>, which is a league management module for Joomla. The internal part (creating, editing and managing game sheets) is a stand a lone application.</p>
<p>The application is fully build on Zend Framework and uses its MVC component. Authentication is handled by Joomla itself and is provided via a proxy-script.</p>
<p>The underlying database is tightly integrated into the JoomLeague database to use its resources (teams, schedules, players and so on). However the application only reads from those resources and writes to its own tables only. This minimizes the impact an installation has on the core components.</p>
<p>The user interface resembles the UI used on the main page of <a href="http://neu.eishockey.net/" target="_blank">Eishockey.net</a> and uses some AJAX enhancements to improve user experience especially within the management backend, although both back- and frontend also work with Javascript disabled – resulting only in a decrease of comfort and speed (when editing a game sheet).</p>
<p>I put together some screenshots to give some impression about the application that will (hopefully) come online in August this year.</p>
<h1>Screenshots</h1>
<h2>Backend</h2>
<p>List of games:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetoverview.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="List of games" src="http://sgehrig.files.wordpress.com/2009/07/ehnetoverview_thumb.png?w=400&#038;h=580" alt="List of games" width="400" height="580" /></a></p>
<p>Edit game sheet details:<a href="http://sgehrig.files.wordpress.com/2009/07/ehneteditgamesheet.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-edit-gamesheet" src="http://sgehrig.files.wordpress.com/2009/07/ehneteditgamesheet_thumb.png?w=400&#038;h=338" alt="ehnet-edit-gamesheet" width="400" height="338" /></a></p>
<p>Edit roster:<a href="http://sgehrig.files.wordpress.com/2009/07/ehneteditroster.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-edit-roster" src="http://sgehrig.files.wordpress.com/2009/07/ehneteditroster_thumb.png?w=400&#038;h=432" alt="ehnet-edit-roster" width="400" height="432" /></a></p>
<p>Edit goals:<a href="http://sgehrig.files.wordpress.com/2009/07/ehneteditgoals.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-edit-goals" src="http://sgehrig.files.wordpress.com/2009/07/ehneteditgoals_thumb.png?w=400&#038;h=513" alt="ehnet-edit-goals" width="400" height="513" /></a></p>
<p>Edit penalties:<a href="http://sgehrig.files.wordpress.com/2009/07/ehneteditpenalties.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-edit-penalties" src="http://sgehrig.files.wordpress.com/2009/07/ehneteditpenalties_thumb.png?w=400&#038;h=402" alt="ehnet-edit-penalties" width="400" height="402" /></a></p>
<p>Edit goalkeepers:<a href="http://sgehrig.files.wordpress.com/2009/07/ehneteditgoalkeepers.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-edit-goalkeepers" src="http://sgehrig.files.wordpress.com/2009/07/ehneteditgoalkeepers_thumb.png?w=400&#038;h=413" alt="ehnet-edit-goalkeepers" width="400" height="413" /></a></p>
<h2>Frontend</h2>
<p>Show goals scored:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetshowgoals.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-show-goals" src="http://sgehrig.files.wordpress.com/2009/07/ehnetshowgoals_thumb.png?w=400&#038;h=359" alt="ehnet-show-goals" width="400" height="359" /></a></p>
<p>Show penalties given:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetshowpenalties.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-show-penalties" src="http://sgehrig.files.wordpress.com/2009/07/ehnetshowpenalties_thumb.png?w=400&#038;h=359" alt="ehnet-show-penalties" width="400" height="359" /></a></p>
<p>Show goalkeepers’ statistics:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetshowgoalkeepers.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-show-goalkeepers" src="http://sgehrig.files.wordpress.com/2009/07/ehnetshowgoalkeepers_thumb.png?w=400&#038;h=359" alt="ehnet-show-goalkeepers" width="400" height="359" /></a></p>
<p>Show players’ statistics:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetshowroster.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-show-roster" src="http://sgehrig.files.wordpress.com/2009/07/ehnetshowroster_thumb.png?w=400&#038;h=382" alt="ehnet-show-roster" width="400" height="382" /></a></p>
<p>Tooltip shown when hovering over a player:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetshowrostertooltip.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-show-roster-tooltip" src="http://sgehrig.files.wordpress.com/2009/07/ehnetshowrostertooltip_thumb.png?w=400&#038;h=382" alt="ehnet-show-roster-tooltip" width="400" height="382" /></a></p>
<p>Show misc. information about the game:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetshowmisc.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-show-misc" src="http://sgehrig.files.wordpress.com/2009/07/ehnetshowmisc_thumb.png?w=400&#038;h=359" alt="ehnet-show-misc" width="400" height="359" /></a></p>
<h2>Statistics</h2>
<p>Player statistics:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetstatsplayer.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-stats-player" src="http://sgehrig.files.wordpress.com/2009/07/ehnetstatsplayer_thumb.png?w=400&#038;h=274" alt="ehnet-stats-player" width="400" height="274" /></a></p>
<p>Team statistics:<a href="http://sgehrig.files.wordpress.com/2009/07/ehnetstatsteam.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" title="ehnet-stats-team" src="http://sgehrig.files.wordpress.com/2009/07/ehnetstatsteam_thumb.png?w=400&#038;h=536" alt="ehnet-stats-team" width="400" height="536" /></a></p>
<h1>Features</h1>
<p>The list of features includes:</p>
<ul>
<li>editing rosters including setting captains and assistants, setting the position (offense, defense, goalkeeper) and the jersey number</li>
<li>editing scored goals</li>
<li>editing given penalties</li>
<li>editing goalkeepers on ice (goalkeeper replacement) to keep track of which goalkeeper was on ice at which point in time</li>
<li>editing meta data such as referees and attendance</li>
<li>determination of game-winning- or game-tying-goal</li>
<li>determination of game-winning, game-tying and/or game-losing goalkeeper</li>
<li>calculation of player statistics
<ul>
<li>games played</li>
<li>goals, assists, points</li>
<li>powerplay goals, assists, points</li>
<li>shorthanded goals, assists, points</li>
<li>game-winning-goals, game-tying-goals, game-winning-assists, game-tying-assist</li>
<li>penalty minutes</li>
</ul>
</li>
<li>calculation of goalkeeper statistics
<ul>
<li>games played in goal</li>
<li>games won, games lost, games tied</li>
<li>time-on-ice</li>
<li>goals against</li>
<li>goals against average</li>
<li>we currently lack a save percentage as the data gathering for shots on goal will be quite difficult in these lower leagues</li>
</ul>
</li>
</ul>
<p>At this point in time the application is feature complete and only some minor things like “top-20-scorer in the league xy” are missing. It’s up to the guys at <a href="http://neu.eishockey.net/" target="_blank">Eishockey.net</a> to get the thing online now.</p>
<br />Posted in Development, Zend Framework Tagged: Eishockey.net <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=93&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2009/07/09/screenshots-of-game-sheets-app-for-eishockey-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetoverview_thumb.png" medium="image">
			<media:title type="html">List of games</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehneteditgamesheet_thumb.png" medium="image">
			<media:title type="html">ehnet-edit-gamesheet</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehneteditroster_thumb.png" medium="image">
			<media:title type="html">ehnet-edit-roster</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehneteditgoals_thumb.png" medium="image">
			<media:title type="html">ehnet-edit-goals</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehneteditpenalties_thumb.png" medium="image">
			<media:title type="html">ehnet-edit-penalties</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehneteditgoalkeepers_thumb.png" medium="image">
			<media:title type="html">ehnet-edit-goalkeepers</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetshowgoals_thumb.png" medium="image">
			<media:title type="html">ehnet-show-goals</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetshowpenalties_thumb.png" medium="image">
			<media:title type="html">ehnet-show-penalties</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetshowgoalkeepers_thumb.png" medium="image">
			<media:title type="html">ehnet-show-goalkeepers</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetshowroster_thumb.png" medium="image">
			<media:title type="html">ehnet-show-roster</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetshowrostertooltip_thumb.png" medium="image">
			<media:title type="html">ehnet-show-roster-tooltip</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetshowmisc_thumb.png" medium="image">
			<media:title type="html">ehnet-show-misc</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetstatsplayer_thumb.png" medium="image">
			<media:title type="html">ehnet-stats-player</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2009/07/ehnetstatsteam_thumb.png" medium="image">
			<media:title type="html">ehnet-stats-team</media:title>
		</media:content>
	</item>
		<item>
		<title>Update on strcoll() UTF-8 issue</title>
		<link>http://sgehrig.wordpress.com/2008/12/08/update-on-strcoll-utf-8-issue/</link>
		<comments>http://sgehrig.wordpress.com/2008/12/08/update-on-strcoll-utf-8-issue/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 09:45:00 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/?p=59</guid>
		<description><![CDATA[I just stumpled upon a comment in the Zend Framework Issue Tracker about an UTF-8 issue with PHP on Windows (the issue was about some problem within Zend_Ldap)  which pointed to a MSDN page about setlocale and _wsetlocale. It&#8217;s clearly stated there that the CRT function setlocale() does not work with multi-byte charsets on Windows: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=59&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just stumpled upon a comment in the Zend Framework Issue Tracker about an UTF-8 issue with PHP on Windows (the issue was about <a href="http://framework.zend.com/issues/browse/ZF-4495">some problem within Zend_Ldap</a>)  which pointed to a MSDN page about <a href="http://msdn.microsoft.com/en-us/library/x99tb11d.aspx">setlocale and _wsetlocale</a>. It&#8217;s clearly stated there that the CRT function setlocale() does not work with multi-byte charsets on Windows:</p>
<blockquote><p>The set of available languages, country/region codes, and code pages includes all those supported by the Win32 NLS API <strong>except code pages that require more than two bytes per character, such as UTF-7 and UTF-8. If you provide a code page like UTF-7 or UTF-8, setlocale will fail, returning NULL.</strong> The set of language and country/region codes supported by setlocale is listed in Language and Country/Region Strings.</p></blockquote>
<p>That means that setlocale() does not work on Windows when given a locale with an UTF-8 charset, e.g. German_Germany.65001, and therfore you cannot use strcoll() or similar functions for <a href="http://sgehrig.wordpress.com/2008/09/24/on-how-to-sort-an-array-of-utf-8-strings/">locale-aware string operations</a> with these charsets. It simply is not possible due to a Windows CRT limitation.</p>
<br />Posted in PHP Tagged: sorting, utf8 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=59&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2008/12/08/update-on-strcoll-utf-8-issue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use the new Zend_Ldap functionality</title>
		<link>http://sgehrig.wordpress.com/2008/12/07/how-to-use-the-new-zend_ldap-functionality/</link>
		<comments>http://sgehrig.wordpress.com/2008/12/07/how-to-use-the-new-zend_ldap-functionality/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 18:57:40 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[Zend_Ldap]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/?p=50</guid>
		<description><![CDATA[The following post should demonstrate some of the new features that come along with the extended Zend_Ldap component that is now available in the Zend Framework Standard Incubator. The component was originally designed to augment the current Zend_Ldap component with methods to do all those operations on a LDAP server which everybody is used to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=50&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-46" title="Zend Framework Logo (small)" src="http://sgehrig.files.wordpress.com/2008/12/zf1.gif?w=64&#038;h=64" alt="Zend Framework Logo (small)" width="64" height="64" />The following post should demonstrate some of the new features that come along with the <a href="http://framework.zend.com/wiki/display/ZFPROP/Extended+Zend_Ldap+Proposal+-+Stefan+Gehrig">extended Zend_Ldap</a> component that is <a href="http://sgehrig.wordpress.com/2008/12/07/extended-zend_ldap-is-in-standard-incubator/">now available</a> in the <a href="http://framework.zend.com/svn/framework/standard/incubator/">Zend Framework Standard Incubator</a>. The component was originally designed to augment the current Zend_Ldap component with methods to do all those operations on a LDAP server which everybody is used to when dealing with databases: searching, retrieving, updating, adding and deleting items on the directory server. The component has recently been accepted for Standard Incubator development with the notice to explore the possibility of a migration of all new features directly into the existing Zend_Ldap class. This has been achieved and the component can be considered an all out solution for working with LDAP directory servers which naturally means that there is still a lot of room for improvement. The transition from the authentication-only Zend_Ldap to a fully featured data-access component flowed smoothly and backwards-compatibility could be maintained (at least when connecting to OpenLDAP servers as I don&#8217;t have any other LDAP server at hand to run regression tests against). Enough of that blah, let&#8217;s have a look at the new features…</p>
<h2>Connecting to a LDAP server</h2>
<p>There is no change from the old Zend_Ldap – provide the options to connect to the server and call bind().</p>
<pre>$options = array(
    'host'     =&gt; 'localhost',
    'port'     =&gt; 389,
    'username' =&gt; 'uid=php,ou=People,dc=zend,dc=com',
    'password' =&gt; 'password',
    'baseDn'   =&gt; 'dc=zend,dc=com'
);
$ldap=new Zend_Ldap($options);
$ldap-&gt;bind();</pre>
<h2>Retrieving a single entry</h2>
<p>To retrieve a single entry from the server you use the getEntry() method.</p>
<pre>$carl = $ldap-&gt;getEntry('cn=Carl Baker,ou=People,dc=zend,dc=com');
/*
 * $carl is an array containing
 * array(
 *    'dn'          =&gt; 'cn=Carl Baker,ou=People,dc=zend,dc=com',
 *    'cn'          =&gt; array('Carl Baker'),
 *    'givenname'   =&gt; array('Carl'),
 *    'objectclass' =&gt; array('account', 'inetOrgPerson', 'top'),
 *    'sn'          =&gt; array('Baker'),
 *    'title'       =&gt; array('PR Manager'),
 *    'uid'         =&gt; array('cbaker'),
 *    ...);
 */</pre>
<h2>Searching entries</h2>
<p>You can retrieve a list of entries that match a given LDAP filter by using the search() method.</p>
<pre>$items=$ldap()-&gt;search('(objectClass=account)', 'ou=People,dc=zend,dc=com',
    Zend_Ldap::SEARCH_SCOPE_ONE);
// $items is an object of type Zend_Ldap_Collection
$count=count($items); // the returned object implements Countable
foreach ($items as $item) { // the returned object also implements Iterator
    /*
     * $item is an array containing
     * array(
     *    'dn'          =&gt; '...',
     *    'cn'          =&gt; array('...'),
     *    'givenname'   =&gt; array('...'),
     *    'objectclass' =&gt; array('account', 'inetOrgPerson', 'top'),
     *    'sn'          =&gt; array('...'),
     *    'title'       =&gt; array('...'),
     *    'uid'         =&gt; array('...'),
     *    ...);
     */
}
// alternatively you can use searchEntries() to get back an array of entries
$items=$ldap()-&gt;searchEntries('(objectClass=account)', 'ou=People,dc=zend,dc=com',
    Zend_Ldap::SEARCH_SCOPE_ONE);
// $items is an object of type array</pre>
<h2>Searching entries with filter objects</h2>
<p>Instead of using a filter string you can create your filter with the object-oriented interface of Zend_Ldap_Filter.</p>
<pre>$filter=Zend_Ldap_Filter::equals('objectClass', 'account')
    -&gt;addAnd(Zend_Ldap_Filter::greater('salary', 10000));
$items=$ldap()-&gt;search($filter, 'ou=People,dc=zend,dc=com',
    Zend_Ldap::SEARCH_SCOPE_ONE);</pre>
<h2>Manipulating DN string</h2>
<p>DN strings can be parsed into Zend_Ldap_DN objects which allow for easy modifiation of the DN.</p>
<pre>$dnString='cn=Baker\\, Alice,cn=Users+ou=Lab,ou=People,dc=zend,dc=com';
$dn=Zend_Ldap_Dn::fromString($dnString);
unset($dn[2];
$dn[1]=array('cn' =&gt; 'Users', 'ou' =&gt; 'PR');
$dn-&gt;insert(1, array('ou' =&gt; 'Dismissed'));
$dnString=(string)$dn;
// cn=Baker\\, Alice,cn=Users+ou=PR,ou=Dismissed,dc=zend,dc=com</pre>
<h2>Adding new entries</h2>
<p>Zend_Ldap provides an add() method to add entries to the directory.</p>
<pre>$ldap-&gt;add('uid=created,ou=People,dc=zend,dc=com', array(
    'uid'         =&gt; 'created',
    'objectClass' =&gt; 'account'));</pre>
<h2>Updating existing entries</h2>
<p>The update() method can be used to update existing entries in the directory.</p>
<pre>$ldap-&gt;update('cn=Carl Baker,ou=People,dc=zend,dc=com', array(
    'title' =&gt; array('Barkeeper'),
    'uid'   =&gt; 'cabaker');
// it's enough to provide those attributes that will be changed</pre>
<h2>Deleting entries</h2>
<p>Deletions can be done recursively when providing true as the second parameter.</p>
<pre>// this will throw an exception if the given entry has subordinates
$ldap-&gt;delete('cn=Baker\\, Alice,cn=Users+ou=Lab,ou=People,dc=zend,dc=com', false);
// this will delete the complete subtree
$ldap-&gt;delete('ou=Dismissed,dc=zend,dc=com', true);</pre>
<h2>Copying and moving entries and subtrees</h2>
<p>Zend_Ldap provides methods to move and copy entries and subtrees to other locations within the directory tree. The third parameter specifies if the operation will be carried ou recursively.</p>
<pre>// this will throw an exception if the given entry has subordinates
$ldap-&gt;copy('cn=Baker\\, Alice,cn=Users+ou=Lab,ou=People,dc=zend,dc=com',
    'cn=Baker\\, Charlie,ou=Lab,ou=People,dc=zend,dc=com', false);
// the operation will be done recursively
$ldap-&gt;move('ou=Dismissed,dc=zend,dc=com', 'ou=Fired,dc=zend,dc=com', true);</pre>
<p>There is a lot more to be discovered in Zend_Ldap such as checking server capabilities via the RootDSE, browsing the schema using the subSchemaSubentry, LDIF im- and exporting and especially the active-record like interface to LDAP entries Zend_Ldap_Node which we&#8217;ll cover in the next post.</p>
<p>I hope this post has provided some insight into the features of Zend_Ldap and you&#8217;re invited to try and test the new features and give your feedback to further improve the component and get it into production, which means into the standard trunk, as soon as possible. Especially I&#8217;m in search for testers who can verify the working of this component against the different LDAP servers available: e.g. ActiveDirectory, ADAM, Siemens, Novell, Sun, and so on.</p>
<br />Posted in Zend Framework Tagged: ldap, Zend_Ldap <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=50&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2008/12/07/how-to-use-the-new-zend_ldap-functionality/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2008/12/zf1.gif" medium="image">
			<media:title type="html">Zend Framework Logo (small)</media:title>
		</media:content>
	</item>
		<item>
		<title>Extended Zend_Ldap is in Standard Incubator</title>
		<link>http://sgehrig.wordpress.com/2008/12/07/extended-zend_ldap-is-in-standard-incubator/</link>
		<comments>http://sgehrig.wordpress.com/2008/12/07/extended-zend_ldap-is-in-standard-incubator/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 14:50:39 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[Zend_Ldap]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/?p=43</guid>
		<description><![CDATA[After beeing accepted for Standard Incubator development by the Zend Framework team on November, 1st 2008, the extended Zend_Ldap component (formerly known as Zend_Ldap_Ext) has been moved into the Zend Framework Standard Incubator and can be checked out from there. This is what the component is all about (from the proposal page): The existing Zend_Ldap [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=43&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-46" title="Zend Framework Logo (small)" src="http://sgehrig.files.wordpress.com/2008/12/zf1.gif?w=64&#038;h=64" alt="Zend Framework Logo (small)" width="64" height="64" /></p>
<p>After beeing accepted for Standard Incubator development by the Zend Framework team on November, 1st 2008, the <a title="Extended Zend_Ldap Proposal" href="http://framework.zend.com/wiki/display/ZFPROP/Extended+Zend_Ldap+Proposal+-+Stefan+Gehrig">extended Zend_Ldap</a> component (formerly known as Zend_Ldap_Ext) has been moved into the Zend Framework Standard Incubator and can be checked out from <a title="Zend Framework Standard Incubator" href="http://framework.zend.com/svn/framework/standard/incubator/">there</a>.</p>
<p>This is what the component is all about (from the proposal page):</p>
<blockquote><p>The existing Zend_Ldap component currently just responds to authentication use cases in all their varieties. There is no posibility to query a LDAP directory service in a unified and consistent way. The current component also lacks core CRUD (Create, Retrieve, Update and Delete) functionality &#8211; operations that are crucial to for example database abstraction layers.<br />
This proposals tries to resolve these deficiencies in that it provides a simple two-ply object oriented model to connect to, query and perfom CRUD operations on an LDAP server. The first layer is a wrapper around the ext/ldap functions, spiced up with extended functionality such as copying and moving (renaming in a LDAP context) nodes and subtrees.<br />
The second layer (Zend_Ldap_Node) provides an active-record-like interface to LDAP entries and stresses the tree-structure of LDAP data in providing (recursive) tree traversal methods.<br />
To simplify the usage of the unfamiliar LDAP filter syntax this components proposes an object oriented approach to LDAP filter string generation, which can loosely be compared to Zend_Db_Select.<br />
Usefull helper classes for creating and modifying LDAP DNs and converting attribute values complete this component.<br />
Furthermore it is possible to do some LDAP schema browsing and to read and write LDIF files.<br />
It is important to note, that this proposal is a complete replacement for the current Zend_Ldap component and does not break backwards-compatibility.</p></blockquote>
<p>Later today I&#8217;ll try to publish a short tutorial on the usage of the (hopefully) new Zend_Ldap component.</p>
<br />Posted in Zend Framework Tagged: ldap, Zend_Ldap <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=43&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2008/12/07/extended-zend_ldap-is-in-standard-incubator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>

		<media:content url="http://sgehrig.files.wordpress.com/2008/12/zf1.gif" medium="image">
			<media:title type="html">Zend Framework Logo (small)</media:title>
		</media:content>
	</item>
		<item>
		<title>On how to sort an array of UTF-8 strings</title>
		<link>http://sgehrig.wordpress.com/2008/09/24/on-how-to-sort-an-array-of-utf-8-strings/</link>
		<comments>http://sgehrig.wordpress.com/2008/09/24/on-how-to-sort-an-array-of-utf-8-strings/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 10:16:30 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/?p=39</guid>
		<description><![CDATA[This article is based on a question asked by me on stackoverflow.com and illustrates the way I solved the question myself and discovered a PHP bug on Windows. Sorting an array of strings in PHP seems to be a no-brainer at all. There are a lot of sort functions with sort() being the most common [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=39&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><em>This article is based on a <a href="http://stackoverflow.com/questions/120334/how-to-sort-an-array-of-utf-8-strings">question</a> asked by me on <a href="http://stackoverflow.com">stackoverflow.com</a> and illustrates the way I solved the question myself and discovered a <a href="http://bugs.php.net/bug.php?id=46165">PHP bug</a> on Windows.</em></p>
<p>Sorting an array of strings in PHP seems to be a no-brainer at all. There are a lot of sort functions with <tt><a href="http://de.php.net/manual/en/function.sort.php">sort()</a></tt> being the most common one. The problem arises when the strings used in the array are multi-byte encoded, for example UTF-8 encoded. Because PHP comparison functions cannot operate on those strings (they do a byte-per-byte comparison) sorting does not work as expected either. Furthermore language specific sorting properties are not taken into consideration when sorting with <tt>sort()</tt> and the default parameters. In Swedish for example an Ä is sorted at the end of the alphabet while in German Ä normally is equivalent to A (when using the <a href="http://de.wikipedia.org/wiki/DIN_5007">DIN 5007</a> sorting method).</p>
<p>Fortunately PHP provides a function which copes with this problem: <tt><a href="http://de.php.net/manual/en/function.strcoll.php">strcoll()</a></tt>. The function can be used for array sorting by just specifying the function name as the second parameter to <tt><a href="http://de.php.net/manual/en/function.usort.php">usort()</a></tt>. The <tt>sort()</tt> function also has a flag (<tt>SORT_LOCALE_STRING</tt>) which actually seems to do the same as <tt>usort()</tt> together with a <tt>strcoll()</tt> callback.</p>
<p>To summarize we can say, that sorting an array of UTF-8 strings in a language aware manner is more or less simply a question of setting the correct locale. Let&#8217;s look at the following example using German as the reference language and saved with a UTF-8 encoding.</p>
<pre>$array=array('Übergabe', 'Ostfriesland', 'Äpfel', 'Unterführung', 'Apfel', 'Österreich');
$oldLocale=setlocale(LC_COLLATE, "0");
setlocale(LC_COLLATE, 'de_DE.utf8');
usort($array, 'strcoll'); // or equivalent sort($array, SORT_LOCALE_STRING);
setlocale(LC_COLLATE, $oldLocale);</pre>
<p>This will result in an array of <tt>Apfel, Äpfel, Österreich, Ostfriesland, Übergabe, Unterführung</tt> (obviously we&#8217;re using DIN 5007 sorting here).</p>
<p>As sorting now is locale-dependent we have to respect the PHP environment, which means what machine are we running our script on &#8211; Windows or *nix?</p>
<p>First of all, if we have a *nix machine, the used locale must be installed on the system. You can get a list of installed locales by issuing the command <tt>locale -a</tt> on the command line. Be sure to use the correct encoding with the desired locale &#8211; the encoding must match the string encoding.</p>
<p>Things get more complicated on Windows machines as locales are named differently. The default naming scheme is <tt><em>Country_Language.Encoding</em></tt>. Information on locales on Windows can be found on MSDN: <a href="http://msdn.microsoft.com/en-us/library/hzz3tw78.aspx">Language and Country/Region Strings</a>, <a href="http://msdn.microsoft.com/en-us/library/39cwe7zf.aspx">Language Strings</a>, <a href="http://msdn.microsoft.com/en-us/library/cdax410z.aspx">Country/Region Strings</a> and <a href="http://msdn.microsoft.com/en-us/library/2x8et5ee.aspx">Code Pages</a>. Furthermore encodings are not specified like on *nix machines but rather by using code pages. As we&#8217;re using UTF-8 in our example we have to use the UTF-8 Windows code page, which is 65001. Putting all these things together we get to a locale of <tt>German_Germany.65001</tt> for our example. For the sake of completeness the <em>normal</em> code page for Western Europe would be <a href="http://de.wikipedia.org/wiki/Windows-1252#Windows-1252">1252</a>.</p>
<p>This leads us to the following code snippet (UTF-8 encoded strings):</p>
<pre>$array=array('Übergabe', 'Ostfriesland', 'Äpfel', 'Unterführung', 'Apfel', 'Österreich');
$oldLocale=setlocale(LC_COLLATE, "0");
setlocale(LC_COLLATE, 'German_Germany.65001');
usort($array, 'strcoll'); // or equivalent sort($array, SORT_LOCALE_STRING);
setlocale(LC_COLLATE, $oldLocale);</pre>
<p>What the heck???? <tt>Übergabe, Apfel, Ostfriesland, Unterführung, Äpfel, Österreich</tt>?? That obviously doesn&#8217;t work&#8230; What&#8217;s the problem? Let&#8217;s try to use non UTF-8 strings (don&#8217;t forget to recode the file to ANSI, Windows-1252 or ISO-8859-1):</p>
<pre>$array=array('Übergabe', 'Ostfriesland', 'Äpfel', 'Unterführung', 'Apfel', 'Österreich');
$oldLocale=setlocale(LC_COLLATE, "0");
setlocale(LC_COLLATE, 'German_Germany.1252');
usort($array, 'strcoll'); // or equivalent sort($array, SORT_LOCALE_STRING);
setlocale(LC_COLLATE, $oldLocale);</pre>
<p>Now we get <tt>Apfel, Äpfel, Österreich, Ostfriesland, Übergabe, Unterführung</tt>. OK, non-UTF-8 is working correctly. Let&#8217;s dig in deeper. What does strcoll() do with my array? Let&#8217;s trace what&#8217;s going on (thanks to <a href="http://stackoverflow.com/users/1830/huppie">Huppie</a> for <a href="http://stackoverflow.com/questions/120334#120388">the idea of tracing what strcoll() is doing</a>):</p>
<pre>function traceStrColl($a, $b) {
    $outValue=strcoll($a, $b);
    echo "$a $b $outValue\r\n";
    return $outValue;
}

$array=array('Übergabe', 'Ostfriesland', 'Äpfel', 'Unterführung', 'Apfel', 'Österreich');
$oldLocale=setlocale(LC_COLLATE, "0");
setlocale(LC_COLLATE, 'German_Germany.65001');
usort($array, 'traceStrColl');
setlocale(LC_COLLATE, $oldLocale);</pre>
<p>The output is:</p>
<pre>Äpfel Ostfriesland 2147483647
Äpfel Übergabe 2147483647
Äpfel Unterführung 2147483647
Äpfel Apfel 2147483647
Österreich Äpfel 2147483647
Ostfriesland Apfel 2147483647
Ostfriesland Übergabe 2147483647
Unterführung Ostfriesland 2147483647
Apfel Übergabe 2147483647</pre>
<p>As you can see <tt>strcol()</tt> returns <tt>2147483647</tt> on every comparison operation. This is reproducible and emerges only on Windows machines (by the way the PHP version does not seem to matter as I tried the snippet on PHP 5.2.4, 5.2.5 an 5.2.6). Actually this is what I&#8217;d classify as a bug. Therefore I filed a bug report on <a href="http://bugs.php.net">bugs.php.net</a>: <a href="http://bugs.php.net/bug.php?id=46165">Bug #46165 strcoll() does not work with UTF-8 strings on Windows</a></p>
<p><strong>Summary:</strong> Currently it is not possible to sort UTF-8 strings on a WIndows machine simply using PHP-provided functions. A possible solution would be to recode the strings to Windows-1252 or ISO-8859-1 encoding (using <tt><a href="http://de.php.net/manual/en/function.mb-convert-encoding.php">mb_convert_encoding()</a></tt> or <tt><a href="http://de.php.net/manual/en/function.iconv.php">iconv()</a></tt>) and do a sort on the recoded array (provided by <a href="http://stackoverflow.com/users/6899/">ΤΖΩΤΖΙΟΥ</a> on <a href="http://stackoverflow.com/questions/120334#120361">stackoverflow.com</a>).</p>
<br />Posted in PHP Tagged: array, sorting, utf8 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=39&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2008/09/24/on-how-to-sort-an-array-of-utf-8-strings/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
		<item>
		<title>Installed phpUnderControl on our development server</title>
		<link>http://sgehrig.wordpress.com/2008/08/15/installed-phpundercontrol-on-our-development-server/</link>
		<comments>http://sgehrig.wordpress.com/2008/08/15/installed-phpundercontrol-on-our-development-server/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 12:43:54 +0000</pubDate>
		<dc:creator>Stefan Gehrig</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CruiseControl]]></category>
		<category><![CDATA[phpUnderControl]]></category>

		<guid isPermaLink="false">http://sgehrig.wordpress.com/?p=33</guid>
		<description><![CDATA[Just installed phpUnderControl and CruiseControl on our development server. Actually everything went quite smoothly and only the java installation made some problems as it was mentioned nowhere that you need to install the Java SE Development Kit (JDK) and that the Java SE Runtime Environment (JRE) is not sufficient. These are the required software packages: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=33&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just installed <a href="http://www.phpundercontrol.org/">phpUnderControl</a> and <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a> on our development server. Actually everything went quite smoothly and only the java installation made some problems as it was mentioned nowhere that you need to install the Java SE Development Kit (JDK) and that the Java SE Runtime Environment (JRE) is not sufficient.</p>
<p>These are the required software packages:</p>
<ul>
<li><a href="http://java.sun.com/javase/downloads/index.jsp" target="_blank">Java SE Development Kit (JDK) </a></li>
<li><a href="http://cruisecontrol.sourceforge.net/download.html" target="_blank">CruiseControl</a></li>
<li><a href="http://www.phpundercontrol.org/download.html" target="_blank">phpUnderControl</a></li>
</ul>
<p>The only disadvantage of the current installation is, that we have to use SSH tunnels to get to the phpUnderControl dashboard. By a fluke I just stumbled on an article by <a href="http://www.maxhorvath.com">Max Horvath</a> who describes <a href="http://www.maxhorvath.com/2008/08/making-phpundercontrol-cruisecontrol-accessible-via-a-proxy.html">how to setup Apache to access the phpUnderControl pages via a proxy</a> and therefore avoiding the SSH tunnels. I&#8217;ll try this later today.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sgehrig.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sgehrig.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sgehrig.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sgehrig.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sgehrig.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sgehrig.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sgehrig.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sgehrig.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sgehrig.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sgehrig.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sgehrig.wordpress.com&amp;blog=4471606&amp;post=33&amp;subd=sgehrig&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sgehrig.wordpress.com/2008/08/15/installed-phpundercontrol-on-our-development-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1069dd123430336ef206093a29d95bfd?s=96&#38;d=&#38;r=R" medium="image">
			<media:title type="html">sgehrig</media:title>
		</media:content>
	</item>
	</channel>
</rss>
