<?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>Matthias Kerstner » Softwaredeveloper &#124; kerstner.at</title>
	<atom:link href="http://www.kerstner.at/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kerstner.at</link>
	<description>Matthias Kerstner » Softwareentwickler</description>
	<lastBuildDate>Wed, 09 May 2012 11:41:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Custom Zend_Form view script</title>
		<link>http://www.kerstner.at/en/2012/04/custom-zend-form-view-script/</link>
		<comments>http://www.kerstner.at/en/2012/04/custom-zend-form-view-script/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 09:48:59 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[view script]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend_form]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1289</guid>
		<description><![CDATA[Sometimes Zend&#8217;s built-in form decorators are not flexible enough to achieve customized views. Luckily, Zend provides means to specify custom view scripts. The following example demonstrates how to set and handle such a script. First and foremost, in your default &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/04/custom-zend-form-view-script/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes Zend&#8217;s built-in form decorators are not flexible enough to achieve customized views. Luckily, Zend provides means to specify custom view scripts. The following example demonstrates how to set and handle such a script.</p>
<p>First and foremost, in your default (action) view script simply output the form as usual:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;formContainer&quot;&gt;
  &lt;?php echo $this-&gt;form ?&gt;
&lt;/div&gt;
</pre>
<p>Then, in your derived <strong>Zend_Form</strong> class set your custom view script that takes care of rendering the form the way you need it:</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Custom Zend_Form view script example.
 * @author matthias.kerstner
 */
class Custom_Form extends Zend_Form {

    public function init() {
        $this-&gt;setDecorators(array(array(
                'viewScript',
                array(
                    'viewScript' =&gt; '_customForm.phtml',
                    array('formId' =&gt; 'CustomForm', 'formClass' =&gt; 'customForm')
            ))));
</pre>
<p>Finally, the custom Zend_Form view script looks like the following. Note that it uses additional parameters that you can specify in <strong>Custom_Form</strong>. </p>
<pre class="brush: xml; title: ; notranslate">
&lt;?php
$params = $this-&gt;element-&gt;getDecorator('ViewScript')-&gt;getOptions();
$formId = $params[0]['formId'];
$formClass = (isset($params[0]['formClass'])) ? $params[0]['formClass'] : '';
?&gt;

&lt;form id=&quot;&lt;?php echo $formId ?&gt;&quot;
      class=&quot;&lt;?php echo $formClass ?&gt;&quot;
      method=&quot;&lt;?php echo $this-&gt;element-&gt;getMethod() ?&gt;&quot;
      action=&quot;&lt;?php echo $this-&gt;element-&gt;getAction() ?&gt;&quot;
      enctype=&quot;&lt;?php echo $this-&gt;element-&gt;getEnctype() ?&gt;&quot;&gt;

    &lt;?php
    echo $this-&gt;element-&gt;my_element_1;
    echo $this-&gt;element-&gt;my_element_2;

    echo $this-&gt;element-&gt;submit;
    ?&gt;

&lt;/form&gt;
</pre>
<p>Don&#8217;t forget to call parent::init(); in any of your derived classes. Using custom view scripts gives you the full power to design your form view, but remember that in contrast to using built-in decorators you need to echo your elements manually in your view script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/custom-zend-form-view-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control Zend&#8217;s layout rendering and Content-Type specifications</title>
		<link>http://www.kerstner.at/en/2012/04/control-zends-layout-rendering-and-content-type-specification/</link>
		<comments>http://www.kerstner.at/en/2012/04/control-zends-layout-rendering-and-content-type-specification/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 10:44:48 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[content-type]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[view]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1369</guid>
		<description><![CDATA[In case you need to return content types other than the one set by server (Apache, etc.) or Zend itself use the following lines to quickly control Zend&#8217;s layout rendering and Content-Type specification. This is crucial for instance if your &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/04/control-zends-layout-rendering-and-content-type-specification/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In case you need to return content types other than the one set by server (Apache, etc.) or Zend itself use the following lines to quickly control Zend&#8217;s <strong>layout rendering</strong> and <strong>Content-Type specification</strong>. </p>
<p>This is crucial for instance if your controller is required to return JSON or XML as part of a service request.</p>
<pre class="brush: php; title: ; notranslate">
// in your controller
// 1. disable layout rendering
$this-&gt;_helper-&gt;layout-&gt;disableLayout();
$this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender();

// 2. customize Content-Type
$this-&gt;getResponse()-&gt;setHeader('Content-Type', 'application/json; charset=utf-8');

// 3. echo' content as usual, e.g. JSON
echo json_encode(array('foo' =&gt; 'bar'));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/control-zends-layout-rendering-and-content-type-specification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magnifying the Universe</title>
		<link>http://www.kerstner.at/en/2012/04/magnifying-the-universe/</link>
		<comments>http://www.kerstner.at/en/2012/04/magnifying-the-universe/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 05:58:37 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[universe]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1364</guid>
		<description><![CDATA[Something not programming related but pretty neat indeed. All credits go to Number Sleuth. Copyright 2012. Magnifying the Universe by Number Sleuth.]]></description>
			<content:encoded><![CDATA[<p>Something not programming related but pretty neat indeed. All credits go to <a target="_blank" href="http://www.numbersleuth.org">Number Sleuth</a>.</p>
<p><iframe width="500" height="323" scrolling="no" src="http://www.numbersleuth.org/universe/magnify/" frameborder="0" allowfullscreen></iframe><br />Copyright 2012.  <a href="http://www.numbersleuth.org/universe/">Magnifying the Universe</a>  by <a href="http://www.numbersleuth.org">Number Sleuth</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/magnifying-the-universe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Mail Plugin abstraction class</title>
		<link>http://www.kerstner.at/en/2012/04/zend-mail-plugin-abstraction-class/</link>
		<comments>http://www.kerstner.at/en/2012/04/zend-mail-plugin-abstraction-class/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 19:57:16 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[abstract]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend_mail]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1325</guid>
		<description><![CDATA[From time to time it is handy to be able quickly set special options when sending mails using Zend_Mail, such as automatically adding footer text or toggling between HTML and plaintext mails. In order to satisfy these needs I wrote &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/04/zend-mail-plugin-abstraction-class/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>From time to time it is handy to be able quickly set special options when sending mails using <strong>Zend_Mail</strong>, such as automatically adding footer text or toggling between HTML and plaintext mails. In order to satisfy these needs I wrote the following simple abstraction class as a wrapper around Zend_Mail.</p>
<pre class="brush: php; title: ; notranslate">
/**
 * An abstraction class for Zend_Mail.
 * @author matthias.kerstner
 */
class Custom_Plugin_Mailer {

    /**
     * Assembles $mail but does not send it.
     * @param array $to
     * @param string $subject
     * @param string $body
     * @param array? $from
     * @param bool? $html
     * @param bool? $appendSignature
     * @param bool? $archive
     * @param string? $encoding
     * @param Zend_Locale? $locale
     * @return bool|Zend_Mail
     */
    public static function assemble($to, $subject, $body, $from = null, $html = false, $appendSignature = true, $archive = true, $encoding = 'UTF-8', $locale = null) {
        return self::send($to, $subject, $body, $from, $html, $appendSignature, $archive, $encoding, false, $locale);
    }

    /**
     * Sends mail.
     * @param array $to [0=email, 1=name]
     * @param string $subject
     * @param string $body
     * @param array? $from [0=email, 1=name]
     * @param bool? $html
     * @param bool? $appendSignature
     * @param bool? $archive
     * @param string? $encoding
     * @param bool? $sendDirectly
     * @param Zend_Locale? $locale
     * @param array? $toBCC [0=email, 1=name]
     * @return bool|Zend_Mail true on success, false on error, Zend_Mail
     *         if $sendDirectly is false
     */
    public static function send($to, $subject, $body, $from = null, $html = false, $appendSignature = true, $archive = true, $encoding = 'UTF-8', $sendDirectly = true, $locale = null, $toBCC = null) {
        $config = Zend_Registry::get('Zend_Config');
        $translate = Zend_Registry::get('Zend_Translate');
        $_locale = $locale instanceof Zend_Locale ? $locale : Zend_Registry::get('Zend_Locale');
        $mail = new Zend_Mail($encoding);

        if (APPLICATION_ENV !== 'production') { // DEBUG MODE
            $mail-&gt;setFrom($config-&gt;email-&gt;noreply-&gt;email, $config-&gt;email-&gt;noreply-&gt;sender);
            $mail-&gt;addTo($config-&gt;email-&gt;debug-&gt;email, $config-&gt;email-&gt;debug-&gt;sender);
        } else { // PRODUCTION MODE
            if ($from === null) {
                $mail-&gt;setFrom($config-&gt;email-&gt;noreply-&gt;email, $config-&gt;email-&gt;noreply-&gt;sender);
            } else {
                if (is_array($from) &amp;&amp; count($from) == 2) {
                    $mail-&gt;setFrom($from[0], $from[1]);
                } else {
                    throw new Exception('Failed to send email');
                }
            }

            if (is_array($to) &amp;&amp; count($to) == 2) {
                $mail-&gt;addTo($to[0], $to[1]);
            } else {
                throw new Exception('Failed to send email');
            }
        }

        $mail-&gt;setSubject($subject);

        if ($appendSignature) {
            $br = $html ? &quot;&lt;br&gt;&quot; : &quot;\n&quot;;
            $body .= $br . $br
                    . $translate-&gt;_('DEFAULT.MAIL.SIGNATURE', $_locale);
        }

        if ($html) {
            $mail-&gt;setBodyHtml($body);
        } else {
            $mail-&gt;setBodyText($body);
        }

        if ($archive) {
            $mail-&gt;addBcc($config-&gt;email-&gt;archive-&gt;email, $config-&gt;email-&gt;archive-&gt;sender);
        }

        // BCC
        if (is_array($toBCC) &amp;&amp; count($toBCC) == 2) {
            $mailBCC = new Zend_Mail($encoding);
            $mailBCC-&gt;setFrom($config-&gt;email-&gt;noreply-&gt;email, $config-&gt;email-&gt;noreply-&gt;sender);
            $mailBCC-&gt;addTo($toBCC[0], $toBCC[1]);
            $mailBCC-&gt;setSubject(&quot;BCC: &quot; . $subject);
            if ($html) {
                $mailBCC-&gt;setBodyHtml(&quot;BCC:&lt;br /&gt;&quot; . $body);
            } else {
                $mailBCC-&gt;setBodyText(&quot;BCC:\n&quot; . $body);
            }
            $mailBCC-&gt;send();
        }

        if (!$sendDirectly) {
            return $mail;
        }

        try {
            if (!$mail-&gt;send()) {
                throw new Exception('Failed to send mail to &quot;'
                        . $to[0] . '&quot; with subject &quot;' . $subject . '&quot;');
            }
        } catch (Exception $e) {
            return false;
        }

        return true;
    }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/zend-mail-plugin-abstraction-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate courier-imap e-mails to Outlook</title>
		<link>http://www.kerstner.at/en/2012/04/migrate-courier-imap-e-mails-to-outlook/</link>
		<comments>http://www.kerstner.at/en/2012/04/migrate-courier-imap-e-mails-to-outlook/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 06:48:40 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1320</guid>
		<description><![CDATA[Courier-imap stores e-mails in plaintext. This is quite convenient for migrating them to other locations. The default mail storage is located in /var/spool/mail. Recently, I had to migrate a certain amout of these mailboxes to Microsoft Outlook. Unfortunately, Outlook is &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/04/migrate-courier-imap-e-mails-to-outlook/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Courier-imap</strong> stores e-mails in plaintext. This is quite convenient for migrating them to other locations. The default mail storage is located in <strong>/var/spool/mail</strong>. </p>
<p>Recently, I had to migrate a certain amout of these mailboxes to Microsoft Outlook. Unfortunately, Outlook is not capable of importing plaintext emails by drag-and-drop or via its import/migration assistent. As opposed to Outlook, <strong>Windows Live Mail</strong> is able to handle the import of emails by just dropping them in the respective folder. But, this only works if the e-mail files have an <strong>.eml</strong> ending (which is rather poor design, but ok&#8230;). </p>
<p>So, in order to import them in Windows Live Mail you need to add the .eml extension to all emails. Fortunately, with the onboard tool offered by most *nix systems you can easily achieve this:</p>
<pre class="brush: plain; title: ; notranslate">
find . -type f -exec mv '{}' '{}'.jpg \;
</pre>
<p>As always, <strong>find</strong> recursively iterates over all files and folders and using the <strong>-f</strong> flag matches all files, and applies the <strong>mv</strong> command on them, thus adding .eml to them.</p>
<p>Now that we have e-mails that also Windows&#8217;s apps are able to handle we can just drag-and-drop them in Windows Live Mail. That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/migrate-courier-imap-e-mails-to-outlook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Process Apache Environment Variables using PHP</title>
		<link>http://www.kerstner.at/en/2012/04/process-apache-environment-variables-using-php/</link>
		<comments>http://www.kerstner.at/en/2012/04/process-apache-environment-variables-using-php/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 16:53:43 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[getenv]]></category>
		<category><![CDATA[mod_env]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1331</guid>
		<description><![CDATA[Especially when in comes to switching between different working environments such as development, staging and production Apache&#8217;s enviroment variables represent a vital solution. But be advised that they do not work out of the box, as certain preconditions must be &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/04/process-apache-environment-variables-using-php/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Especially when in comes to switching between different working environments such as development, staging and production Apache&#8217;s enviroment variables represent a vital solution. But be advised that they do not work out of the box, as certain preconditions must be met. </p>
<p>First of all, you need to enable <strong><a href="http://httpd.apache.org/docs/2.2/env.html" title="mod_env" target="_blank">mod_env</a></strong> for your Apache setup. Secondly, if you are running PHP not as Apache module but rather using FastCGI you need to follow the steps provided <a href="http://stackoverflow.com/questions/2008123/how-to-use-getenv-in-php-and-setenv-in-a-htaccess-with-a-compiled-php-cgi-on" title="here" target="_blank">here</a>.</p>
<p>Once enabled, you can easily set your enviroment variables in your httpd.conf or .htaccess file directly:</p>
<pre class="brush: plain; title: ; notranslate">
SetEnv APPLICATION_ENV development
</pre>
<p>In order to get previously set environment variables from within PHP simply use the following function:</p>
<pre class="brush: php; title: ; notranslate">
getenv()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/process-apache-environment-variables-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Language selection in WordPress using qTranslate plugin</title>
		<link>http://www.kerstner.at/en/2012/04/language-selection-in-wordpress-using-qtranslate-plugin/</link>
		<comments>http://www.kerstner.at/en/2012/04/language-selection-in-wordpress-using-qtranslate-plugin/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 16:32:04 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[qtranslate]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1333</guid>
		<description><![CDATA[qTranslate is a very handy and powerful i18n plugin for WordPress. In order to enable visitors of your WP site to switch between languages you need to include qTranslate&#8217;s widget. Following you find the necessary steps to do so. Install &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/04/language-selection-in-wordpress-using-qtranslate-plugin/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.qianqin.de/qtranslate/" title="qTranslate" target="_blank">qTranslate</a> is a very handy and powerful i18n plugin for <a href="http://www.wordpress.org" title="WordPress" target="_blank">WordPress</a>. In order to enable visitors of your WP site to switch between languages you need to include qTranslate&#8217;s widget. Following you find the necessary steps to do so.</p>
<ol>
<li>Install qTranslate (http://www.qianqin.de/qtranslate/)</li>
<li>edit the plugin settings to enable/disable your supported languages</li>
<li>edit your WP layout template (e.g. sidebar.php) and add to qTranslate widget:
<pre class="brush: php; title: ; notranslate">
echo qtrans_generateLanguageSelectCode('both');
</pre>
</li>
</ol>
<p>Currently, the qTranslate widget supports to following styles:</p>
<ul>
<li>image</li>
<li>dropdown</li>
<li>text</li>
<li>both</li>
</ul>
<p>For more information on the parameters of qtrans_generateLanguageSelectCode have a look at <strong>plugins/qtranslate/qtranslate_widget.php</strong>.</p>
<p>If you are looking for a plugin to support multilingual text have a look at the <a href="http://wordpress.org/extend/plugins/gtext-widget/" title="gText" target="_blank">gText</a> widget which works like a charm in combination with qTranslate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/04/language-selection-in-wordpress-using-qtranslate-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File Uploads using Zend_Form</title>
		<link>http://www.kerstner.at/en/2012/03/dateiupload-mit-zend_form/</link>
		<comments>http://www.kerstner.at/en/2012/03/dateiupload-mit-zend_form/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 18:07:59 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[file upload]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[receive]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1277</guid>
		<description><![CDATA[File uploads can be managed quite easily using Zend_Form. First off, create a Zend_Form instance and add a Zend_Form_Element_File element, representing the file-input element. Make sure to set the encoding type to multipart/form-data: Now that we have a form let&#8217;s &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/dateiupload-mit-zend_form/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>File uploads can be managed quite easily using <strong>Zend_Form</strong>. First off, create a Zend_Form instance and add a <strong>Zend_Form_Element_File</strong> element, representing the file-input element. Make sure to set the encoding type to <em>multipart/form-data</em>:</p>
<pre class="brush: php; title: ; notranslate">
class Form_FileUpload extends Zend_Form {

    public function init() {

        $this-&gt;setAttrib('enctype', 'multipart/form-data');

        $element = new Zend_Form_Element_File('image');
        $element-&gt;setLabel('Some picture');
        $element-&gt;addValidator('Count', false, 1);
        $element-&gt;addValidator('Size', false, 204800);
        $element-&gt;addValidator('Extension', false, 'jpg,png,gif');
        $element-&gt;setRequired(true);

        $this-&gt;addElement($element);

        $this-&gt;addElement('text', 'someText', array(
            'filters' =&gt; array('StringTrim'),
            'label' =&gt; _('Some Text'),
            'decorators' =&gt; array(
                'viewHelper', array(
                    'Label', array('class' =&gt; 'label')
                ),
                'Errors'
            ),
            'validators' =&gt; array(
                array('StringLength', true, array(5, 255))),
            'id' =&gt; 'SomeText'
        ));
}
</pre>
<p>Now that we have a form let&#8217;s add the logic in the corresponding controller. We only need one action (imageAction) to process POST requests and GET requests:</p>
<pre class="brush: php; title: ; notranslate">
public function imageAction() {

  $form = new Form_FileUpload();

  if ($this-&gt;getRequest()-&gt;isPost()) {
    $post = $this-&gt;getRequest()-&gt;getPost();

    if ($form-&gt;isValid($post)) {
     $upload = new Zend_File_Transfer_Adapter_Http();
     $upload-&gt;setDestination(realpath(APPLICATION_PATH . '\..\data\upload'));

     try { //be sure to call receive() before getValues()
       $upload-&gt;receive();
     } catch (Zend_File_Transfer_Exception $e) {
       $e-&gt;getMessage();
     }

     $formData = $form-&gt;getValues(); //be sure to call this after receive()

     $filename = $upload-&gt;getFileName('image'); //optional info about uploaded file
     $filesize = $upload-&gt;getFileSize('image');
     $filemimeType = $upload-&gt;getMimeType('image');

     $dstFilePath = '/images/'.$filename;

     $filterFileRename = new Zend_Filter_File_Rename(array('target' =&gt; $dstFilePath, 'overwrite' =&gt; true));
     $filterFileRename-&gt;filter($filename); //move uploade file to destination
   }
 }

 $this-&gt;view-&gt;form = $form;
}
</pre>
<p>That&#8217;s all there is to it. <strong>receive()</strong> processes the uploaded file, i.e. checks if everything went well. In order to move uploaded files to certain destination folders you can use <strong>Zend_Filter_File_Rename</strong>. Unlike the name suggests it does not only rename files but also is capable of moving files.</p>
<p>Make sure to call receive() before getValues() as Zend_Form otherwise messes up the file upload.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/dateiupload-mit-zend_form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for date format bug in comments section of zbench WordPress theme</title>
		<link>http://www.kerstner.at/en/2012/03/fix-for-date-format-bug-in-comments-section-of-zbench-wordpress-theme/</link>
		<comments>http://www.kerstner.at/en/2012/03/fix-for-date-format-bug-in-comments-section-of-zbench-wordpress-theme/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 14:58:12 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[date string]]></category>
		<category><![CDATA[qtranslate]]></category>
		<category><![CDATA[zbench]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1271</guid>
		<description><![CDATA[There exists a bug in the zbench WordPress theme when used together with qtranslate plugin resulting in a malformed date string in the comments section. Fortunately, there exists a quick fix for this problem. Simply replace corresponding code with the &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/fix-for-date-format-bug-in-comments-section-of-zbench-wordpress-theme/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>There exists a bug in the <a href="http://wordpress.org/extend/themes/zbench" target="_blank">zbench</a> WordPress theme when used together with <a href="http://wordpress.org/extend/plugins/qtranslate/" target="_blank">qtranslate</a> plugin resulting in a malformed date string in the comments section.</p>
<p>Fortunately, there exists a quick fix for this problem. Simply replace corresponding code with the following in the function <strong>mytheme_comment</strong> in <strong>functions.php</strong>:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;span class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;&lt;?php echo htmlspecialchars( get_comment_link( $comment-&gt;comment_ID ) ) ?&gt;&quot;&gt;&lt;?php echo mysql2date('Y/m/d/ H:i', $comment-&gt;comment_date);?&gt;&lt;/a&gt;&lt;?php edit_comment_link(__('[Edit]','zbench'),' ','') ?&gt;&lt;/span&gt;
</pre>
<p>Pay special attention to </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo mysql2date('Y/m/d/ H:i', $comment-&gt;comment_date);?&gt;
</pre>
<p>which replaces </p>
<pre class="brush: php; title: ; notranslate">
&lt;?php printf(__('%1$s at %2$s', 'zbench'), get_comment_date(),  get_comment_time()); ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/fix-for-date-format-bug-in-comments-section-of-zbench-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Print list of folders sorted by their size</title>
		<link>http://www.kerstner.at/en/2012/03/print-list-of-folders-sorted-by-their-size/</link>
		<comments>http://www.kerstner.at/en/2012/03/print-list-of-folders-sorted-by-their-size/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 06:43:58 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[du]]></category>
		<category><![CDATA[max-depth]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[sorted list]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1247</guid>
		<description><![CDATA[In order to print a list of folders and files sorted according to their size you only need two built-in UNIX commands, put together using the pipe (&#8220;&#124;&#8221;): du sort Whereas du gives you the storage space occupied by certain &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/print-list-of-folders-sorted-by-their-size/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In order to print a list of folders and files sorted according to their size you only need two built-in UNIX commands, put together using the pipe (&#8220;|&#8221;):</p>
<ol>
<li>du</li>
<li>sort</li>
</ol>
<pre class="brush: bash; title: ; notranslate">
du -h /var/www/ --max-depth=1 | sort -h
</pre>
<p>Whereas <strong><a href="http://ss64.com/bash/du.html">du</a></strong> gives you the storage space occupied by certain files and folders, <strong><a href="http://ss64.com/bash/sort.html">sort</a></strong> actually sorts the resulting list.</p>
<p>Using the additional parameter <strong>max-depth</strong> you can specify the <em>folder depth</em> which <em>du</em> will use to echo files and folders on the shell during its recursive parsing process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/print-list-of-folders-sorted-by-their-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Draggable Pin Marker for Google Maps using JavaScript API V3</title>
		<link>http://www.kerstner.at/en/2012/03/draggable-pin-markerfor-google-maps-using-javascript-api-v3/</link>
		<comments>http://www.kerstner.at/en/2012/03/draggable-pin-markerfor-google-maps-using-javascript-api-v3/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 17:35:50 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[draggable]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[marker]]></category>
		<category><![CDATA[pin]]></category>
		<category><![CDATA[v3]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1236</guid>
		<description><![CDATA[Google&#8217;s Maps API offer a vast range of functionality to interact with underlying maps. As opposed to statically setting markers (pins) programmatically sometimes you might want your users to be able to interact with the map by dragging existing markers &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/draggable-pin-markerfor-google-maps-using-javascript-api-v3/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Google&#8217;s Maps API offer a vast range of functionality to interact with underlying maps. As opposed to statically setting markers (pins) programmatically sometimes you might want your users to be able to interact with the map by <em>dragging</em> existing markers around the map. Fortunately, Google&#8217;s JavaScript API offers this functionality out of the box. </p>
<p>Basically, what we want to achieve is to be automatically notified when a user changes a marker&#8217;s position. Clearly, this can be done by registering a <strong>listener</strong> on the marker which will fire an event once the marker has been dropped on the destination coordinates. After all, we want to be given these coordinates in order to carry out further actions.</p>
<p>But first of all we need to create a new map instance and bind it to a DOM container element, as explained in the <a href="https://developers.google.com/maps/documentation/javascript/?hl=en" target="_blank">official reference documentation</a>:</p>
<pre class="brush: java; title: ; notranslate">
var latLng = new google.maps.LatLng(lat,lng);

var options = {
  zoom: 13,
  center: latLng,
  scrollwheel: false,
  disableDoubleClickZoom: true,
  mapTypeId: google.maps.MapTypeId.ROADMAP,
  locale: LANG
}

var map = new google.maps.Map(document.getElementById(canvasDomId), options);
</pre>
<p>Once we have the map instance we are able to add markers, as shown in the following code snippet:</p>
<pre class="brush: java; title: ; notranslate">
var marker = new google.maps.Marker({
  position: latLng,
  map: map,
  title: title,
  draggable: true
});
</pre>
<p>In order for the marker to be draggable across the map we need to set the attribute <strong>draggable</strong> to true.</p>
<p>Finally, in order to be notified of changes of the marker&#8217;s position we need to add an <strong>event listener</strong> to the marker:</p>
<pre class="brush: java; title: ; notranslate">
google.maps.event.addListener(marker, 'drag', function(event) {
  console.debug('new position is '+event.latLng.lat()+' / '+event.latLng.lng());
});

google.maps.event.addListener(marker, 'dragend', function(event) {
  console.debug('final position is '+event.latLng.lat()+' / '+event.latLng.lng());
});
</pre>
<p>Whereas the event <strong>drag</strong> is fired whenever the user drags the marker and slides it across the map, the <strong>dragend</strong> is triggered only when the marker is dropped.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/draggable-pin-markerfor-google-maps-using-javascript-api-v3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post to Facebook Fanpage as Page Admin through App via Impersonation</title>
		<link>http://www.kerstner.at/en/2012/03/post-to-facebook-fanpage-as-page-admin-through-app-via-impersonation/</link>
		<comments>http://www.kerstner.at/en/2012/03/post-to-facebook-fanpage-as-page-admin-through-app-via-impersonation/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 17:12:44 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fanpage]]></category>
		<category><![CDATA[impersonate]]></category>
		<category><![CDATA[manage_pages]]></category>
		<category><![CDATA[offline_access]]></category>
		<category><![CDATA[php-sdk]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[publish_stream]]></category>
		<category><![CDATA[read_stream]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1218</guid>
		<description><![CDATA[There seems to exist a lot of confusion when it comes to (programmatically) posting to Facebook (FB) fanpages through the PHP SDK, especially when trying to post as one of the page&#8217;s admin through an app via impersonation. Thus, instead &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/post-to-facebook-fanpage-as-page-admin-through-app-via-impersonation/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>There seems to exist a lot of confusion when it comes to (programmatically) posting to Facebook (FB) fanpages through the <a href="http://developers.facebook.com/docs/reference/php/">PHP SDK</a>, especially when trying to post as one of the page&#8217;s admin through an app via impersonation. </p>
<p>Thus, instead of posting through your regular FB user account you want to directly post to a fanpage as the page&#8217;s admin (owner), without the hazzle of being forced to login for each post.</p>
<p>Fortunately, there are only a few simple steps required to achieve this functionality which will be explained in the following.</p>
<h3>Request App access token</h3>
<p>First and foremost, the <strong>app</strong> through which you will be posting to the fanpage (as its admin) needs to request certain permissions, which can be done using the following link:</p>
<pre class="brush: xml; title: ; notranslate">

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&#038;client_secret=YOUR_APP_SECRET&#038;redirect_uri=YOUR_REDIRECT_URL&#038;scope=read_stream,publish_stream,offline_access,manage_pages
</pre>
<p>In order to be able to use this link you need to determine <strong>YOUR_APP_ID</strong> and <strong>YOUR_APP_SECRET</strong> via <a href="http://developers.facebook.com">http://developers.facebook.com</a>. Furthermore, in order to be able to post to the fanpage programmatically you need the <strong>offline_access</strong> permission. Additionally, to impersonate the fanpage&#8217;s admin <strong>manage_pages</strong> and <strong>publish_stream</strong> permissions are required.</p>
<blockquote><p>Please note that FB is planning to deprecate the offline_permission in favor of a functionality to extend the lifespan of existing access_tokens. Read more here: <a href="https://developers.facebook.com/roadmap/offline-access-removal/" target="_blank">https://developers.facebook.com/roadmap/offline-access-removal/</a></p></blockquote>
<p>Based on the URL provided above you will be redirected to FB&#8217;s login page in case you are not already logged in as the account associated for YOUR_APP_ID. Once logged in, you will be redirected to <strong>YOUR_REDIRECT_URL</strong> where you&#8217;ll find the access token as a <strong>GET</strong> parameter.</p>
<p>Alternatively, if you do not operate your own test environment for checking the response of this call (i.e. YOUR_REDIRECT_URL) you can simply use the following call, as stated in the <a href="http://developers.facebook.com/docs/authentication/">client-side authentication flow</a> in the official documentation. </p>
<pre class="brush: xml; title: ; notranslate">

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&#038;redirect_uri=https://www.facebook.com/connect/login_success.html&#038;response_type=token&#038;scope=read_stream,publish_stream,offline_access,manage_pages
</pre>
<p>This step needs to be done only <strong>once</strong>, unless you decide to change your permissions at a later point which will require you to re-authorize using the same link.</p>
<p>Be sure to check out <a href="http://developers.facebook.com/docs/authentication/" target="_blank">Authentication</a> section in the <a href="http://developers.facebook.com/docs/" target="_blank">Facebook Developer</a> notes.</p>
<p>In case you get the &#8220;An error occurred. Please try again later.&#8221; message make sure that YOUR_REDIRECT_URL matches the one of your FB app.</p>
<h3>Request (Fan)Page access token</h3>
<p>Once you have acquired the permissions to post through your app the next step is to request the <strong>access token</strong> for the fanpage, based on the app&#8217;s authentication previously requested. Using this token you will be able to post on the fanpage through your app without the need to go through the client-side authentication process every time.</p>
<pre class="brush: php; title: ; notranslate">
$pageInfo = $facebook-&gt;api(&quot;/$pageId?fields=access_token&quot;);
</pre>
<p><strong>$pageInfo</strong> now holds an array, including the field <strong>access_token</strong>. Based on this access token we are ready to finally post to the fanpage as one of its admin (impersonation).</p>
<p>Alternatively, in case this call does <strong>not</strong> return the access token you can issue a direct call to the OpenGraph API, as mentioned in <a href="http://developers.facebook.com/docs/authentication/server-side/">server-side authentication flow</a>:</p>
<pre class="brush: xml; title: ; notranslate">

https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&#038;redirect_uri=YOUR_REDIRECT_URI&#038;client_secret=YOUR_APP_SECRET&#038;code=CODE_GENERATED_BY_FACEBOOK
</pre>
<p>The <strong>code</strong> parameter represents the access token returned in the app-authentication step, which in our case does not expire due to the offline_access permission.</p>
<h3>Post to Fanpage as Admin</h3>
<pre class="brush: php; title: ; notranslate">
try {
  $args = array(
    'access_token' =&gt; $page_info['access_token'],
    'message' =&gt; 'TEST'
  );
  $post_id = $facebook-&gt;api(&quot;/$pageId/feed&quot;, &quot;post&quot;, $args);
} catch (FacebookApiException $e) {
  die($e-&gt;getMessage());
}
</pre>
<h3>The final PHP code</h3>
<p>Although the first step (request app access token) can also be done programmatically, normally you will do this manually as this is only required <em>once</em>. Acquiring the fanpage access token can be easily done on each request.</p>
<p>Please contact FB&#8217;s Graph API for all methods. The following code snippets shows how to post a message to the fanpage. For instance, use <strong>LINK</strong> instead of <strong>FEED</strong> to post links.</p>
<pre class="brush: php; title: ; notranslate">
$appid = 'XXX';
$appsecret = 'XXX';
$pageId = 'XXX';

$facebook = new Facebook(array(
  'appId' =&gt; $appid,
  'secret' =&gt; $appsecret,
  'cookie' =&gt; false,
));

$user = $facebook-&gt;getUser();

if ($user) {
  try {
    $page_info = $facebook-&gt;api(&quot;/$pageId?fields=access_token&quot;);
    if (!empty($page_info['access_token'])) {
      $args = array(
        'access_token' =&gt; $page_info['access_token'],
        'message' =&gt; 'TEST'
      );

      $postId = $facebook-&gt;api(&quot;/$pageId/feed&quot;, &quot;post&quot;, $args);
    }
  } catch (FacebookApiException $e) {
    error_log($e);
    $user = null;
 }
}
</pre>
<p>That&#8217;s all there is to it!</p>
<p><!--</p>
<h2>Common errors</h2>
<p>1.) handling expired access tokens<br />
2.) error http://stackoverflow.com/questions/4386691/facebook-error-error-validating-verification-code -> be sure to urlencode redirect_uri and add trailing / (also urlencode / !)</p>
<p>-></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/post-to-facebook-fanpage-as-page-admin-through-app-via-impersonation/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Quick Github project setup</title>
		<link>http://www.kerstner.at/en/2012/03/quick-github-project-setup/</link>
		<comments>http://www.kerstner.at/en/2012/03/quick-github-project-setup/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 16:26:45 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[GIT]]></category>
		<category><![CDATA[Versioning]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1207</guid>
		<description><![CDATA[Github represents a very prominent platform to host software projects using the versioning system GIT. In order to get started with your own project you only need to follow a couple of easy steps: Create a github account if you &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/quick-github-project-setup/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Github</strong> represents a very prominent platform to host software projects using the versioning system <strong>GIT</strong>.</p>
<p>In order to get started with your own project you only need to follow a couple of easy steps:</p>
<ol>
<li>Create a github account if you don&#8217;t already have one</li>
<li>Create a project on github</li>
<li>Create a SSH keypair unless you you don&#8217;t already have one
<ul>
<li><em>ssh-keygen -t rsa -C &#8220;Your Name&#8221;</em></li>
<li>be sure to save these keys in <strong>.ssh</strong> folder inside your home directory (default)</li>
<li>add the public key (<em>id_rsa.pub</em>) to your github account</li>
</ul>
<li>Setup your git project</li>
<ul>
<li><em>mkdir yourGitProject</em></li>
<li><em>cd yourGitProject</em></li>
<li><em>git config &#8211;global user.name &#8220;Your Name&#8221;</em></li>
<li><em>git config &#8211;global user.email your@email.com</em></li>
<li><em>git init</em></li>
<li><em>touch README</em></li>
<li><em>git add README</em></li>
<li><em>git commit -a -m &#8220;initial commit&#8221;</em></li>
<li><em>git remote add origin git@github.com:yourUsername/yourGitProject.git</em></li>
<li><em>git push -u origin master</em></li>
</ul>
</ul>
<p>That&#8217;s everything needed to get startet with your new github hosted project. Be sure to checkout <a href="http://help.github.com/git-cheat-sheets/" target="_blank">Github&#8217;s GIT cheat sheets</a> for further information on operating GIT.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/quick-github-project-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forward emails to multiple recipients using Microsoft Exchange Server</title>
		<link>http://www.kerstner.at/en/2012/03/forward-emails-to-multiple-recipients-using-microsoft-exchange-server/</link>
		<comments>http://www.kerstner.at/en/2012/03/forward-emails-to-multiple-recipients-using-microsoft-exchange-server/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 19:27:12 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1182</guid>
		<description><![CDATA[Although Microsoft Exchange (5.x+) offers the possibility to forward emails to single recipients it is sometimes necessary to specify a whole list of recipients. Fortunately, in order to achieve forwarding emails to multiple recipients using Microsoft Exchange Server you only &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/03/forward-emails-to-multiple-recipients-using-microsoft-exchange-server/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Although Microsoft Exchange (5.x+) offers the possibility to forward emails to single recipients it is sometimes necessary to specify a whole list of recipients.</p>
<p>Fortunately, in order to achieve forwarding emails to multiple recipients using Microsoft Exchange Server you only need to create a <strong>distribution group</strong> via the Active Directory management interface. Be sure when creating the new group to select &#8220;distribution&#8221; as group type.</p>
<p>Once created, add as many accounts to this group as needed. Emails to this group will be automatically <em>distributed</em> among its members.</p>
<p>As you might have realized already, the last step is to set this distribution list as single forward recipient in the Exchange settings tab of the account.</p>
<p>More detailed information can be found here: <a href="http://support.microsoft.com/kb/251631" target="_blank">http://support.microsoft.com/kb/251631</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/03/forward-emails-to-multiple-recipients-using-microsoft-exchange-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync&#8217;ing folders between remote machines</title>
		<link>http://www.kerstner.at/en/2012/02/rsyncing-folders-between-remote-machines/</link>
		<comments>http://www.kerstner.at/en/2012/02/rsyncing-folders-between-remote-machines/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 10:59:27 +0000</pubDate>
		<dc:creator>matthias.kerstner</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.kerstner.at/?p=1154</guid>
		<description><![CDATA[Rsync is an extremely powerful tool to transfer data between machines. Most of the time I use the following command to synchronize data between two machines. Whereas the above command merely adds updated files from SRC to DST, use &#8211;delete &#8230;<p class="read-more"><a href="http://www.kerstner.at/en/2012/02/rsyncing-folders-between-remote-machines/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Rsync is an extremely powerful tool to transfer data between machines. Most of the time I use the following command to synchronize data between two machines.</p>
<pre class="brush: bash; title: ; notranslate">
rsync -razvute 'ssh -i /root/.ssh/id_rsa' SRC DST
</pre>
<p>Whereas the above command merely adds <em>updated</em> files from SRC to DST, use <em>&#8211;delete</em> to delete orphaned files in DST, i.e. files that have been deleted in SRC and should be deleted in DST too.</p>
<p>Also, in case you want to run rsync (for intance as a cron job) without having access to the remote machine&#8217;s private key try using <strong>sshpass</strong>. sshpass gives you the possibilitiy to enter password directly without requiring the remote machine&#8217;s private key.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerstner.at/en/2012/02/rsyncing-folders-between-remote-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

