<?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>Thomas Hambach - Web engineer</title>
	<atom:link href="http://www.rdlt.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rdlt.com</link>
	<description>Web development, Web design &#38; Usability</description>
	<lastBuildDate>Mon, 06 Dec 2010 09:45:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>IPBWI Fatal error: Class &#8216;ipsCommand&#8217; not found</title>
		<link>http://www.rdlt.com/ipbwi-fatal-error-class-ipscommand-not-found.html</link>
		<comments>http://www.rdlt.com/ipbwi-fatal-error-class-ipscommand-not-found.html#comments</comments>
		<pubDate>Mon, 06 Dec 2010 09:45:41 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[invision power board]]></category>
		<category><![CDATA[ipb]]></category>
		<category><![CDATA[ipbwi]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=311</guid>
		<description><![CDATA[Are you encountering the error &#8220;IPBWI Fatal error: Class &#8216;ipsCommand&#8217; not found&#8221; when using IPBWI? There might be some things you want to check! Make sure you are not calling the IPBWI class from a folder that has the word &#8220;admin&#8221; in the folder path. Make sure your board is in online mode]]></description>
			<content:encoded><![CDATA[<p>Are you encountering the error &#8220;<strong>IPBWI Fatal error: Class &#8216;ipsCommand&#8217; not found</strong>&#8221; when using IPBWI?</p>
<p>There might be some things you want to check!</p>
<ol>
<li>Make sure you are not calling the IPBWI class from a folder that has the word &#8220;<strong>admin</strong>&#8221; in the folder path.</li>
<li>Make sure your board is in <strong>online </strong>mode</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/ipbwi-fatal-error-class-ipscommand-not-found.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Keeping Original Node Path in a Multilingual Drupal Site</title>
		<link>http://www.rdlt.com/keeping-original-node-path-in-a-multilingual-drupal-site.html</link>
		<comments>http://www.rdlt.com/keeping-original-node-path-in-a-multilingual-drupal-site.html#comments</comments>
		<pubDate>Sat, 30 Oct 2010 07:28:13 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[multilanguage]]></category>
		<category><![CDATA[pathauto]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=302</guid>
		<description><![CDATA[Let&#8217;s say you have to make a multilanguage Drupal website&#8230; Besides English it also has to be available in Chinese and Japanese. Drupal makes it really easy for you to set up the basics. Using the Locale and I18n module, most of your site can be translated with a few clicks of your mighty mouse. The [...]]]></description>
			<content:encoded><![CDATA[<p><img title="What we do" src="http://www.rdlt.com/wp-content/uploads/2010/10/title_what_hk.png" alt="What we do" width="300" height="54" /></p>
<p>Let&#8217;s say you have to make a multilanguage Drupal website&#8230; Besides English it also has to be available in Chinese and Japanese. Drupal makes it really easy for you to set up the basics. Using the Locale and I18n module, most of your site can be translated with a few clicks of your mighty mouse.</p>
<p>The problems come when you are trying to use pathauto in combination with placing the node title ([title-raw]) as path. You will be ending up with Chinese and Japanese characters in your URL. Most modern browsers do support this, but it&#8217;s still not a pretty sight and who knows what software/OS does not support it yet.</p>
<p>A solution might be typing Pinyin (for the Chinese version) in your paths&#8230; But this can be a long and tedious job (not to mention how many times your client will screw up or forget!).</p>
<p>Pathauto offers a relatively easy solution for our problem. We can &#8220;force&#8221; Drupal to use the original node paths for the translations too. This will not cause any conflicts as all translations are prepended with their ISO code. Just add the following code to one of your custom modules!</p>
<pre>/**
 * Because we want to use our original paths, prepended with the language identifier
 * We are going to assume the default language is english!
 *
 * @param $alias
 * @param $context
 */
function mymodule_pathauto_alias_alter(&amp;$alias,$context) {

	if($context['module'] == 'node' &amp;&amp; $context['language'] != 'en') {

		$node = node_load($context['entity_id']);
		if($node-&gt;tnid &gt; 0 &amp;&amp; $tnode = node_load($node-&gt;tnid)) {
			$alias = $tnode-&gt;path;
		}

	}

}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/keeping-original-node-path-in-a-multilingual-drupal-site.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>4Gamers.be Launched</title>
		<link>http://www.rdlt.com/4gamers-be-launched.html</link>
		<comments>http://www.rdlt.com/4gamers-be-launched.html#comments</comments>
		<pubDate>Fri, 29 Oct 2010 07:26:09 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=295</guid>
		<description><![CDATA[After months of intense labor, togheter with PHP Developer Jens and Designer Michiel, I am pleased to announce that the new website 4gamers.be has reached the stadium of public beta. To make the whole website work, we used PHP, CodeIgniter, MySQL (MyIsam and InnoDB), Varnish and Memcache. 4Gamers is een nieuw belgisch gaming portaal dat nu een [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.4gamers.be" target="_blank"><img class="alignnone size-full wp-image-296" title="4Gamers" src="http://www.rdlt.com/wp-content/uploads/2010/10/logo.png" alt="" width="234" height="63" /></a></p>
<p>After months of intense labor, togheter with PHP Developer <a href="http://www.jenssegers.be/" target="_blank">Jens</a> and Designer <a href="http://www.serhie.net/" target="_blank">Michiel</a>, I am pleased to announce that the new website 4gamers.be has reached the stadium of public beta. To make the whole website work, we used PHP, CodeIgniter, MySQL (MyIsam and InnoDB), Varnish and Memcache.</p>
<blockquote><p>4Gamers is een nieuw belgisch gaming portaal dat nu een groot aantal van de (ex) 9-lives redactie bevat. Op de website vind je reviews, previews, specials, trailers, screenshot en de nieuwste releases. Buiten game nieuws richt 4Gamers zich ook voor een deel op esports en hardware. Zeker een website om eens te bezoeken!</p></blockquote>
<h3>Technical Aspects</h3>
<h4>CodeIgniter</h4>
<p>It was the first time for me to do such a large scale project in CodeIgniter and I have to say CodeIgniter did dissapoint me on several points. The more I used CodeIgniter, the more I noticed that it was lacking basic features (or perhaps I suck at using Google?). First thing I can think of was the session class&#8230; I prefer to store my sessions in memcacge, but CI only has two choices (flat file or database).  Sure, you could extend the class and rewrite it. But I am not using a framework to do all this AGAIN.</p>
<h4>Varnish</h4>
<p>Varnish is always a breeze to use. Clear config files and it is slightly faster compared to Squid. The only issue encountered was while using Invision Power Board behind the proxy. It would not <a rel="lightbox" href="http://www.rdlt.com/wp-content/uploads/2010/10/cthulhu.jpg">properly recognize</a> whether or not a user is logged in (we base our caching on a certain cookie name &amp; value combination). This results in no proxy caching being enabled on the forum&#8230; This is quite dissapointing as it can quickly become the backbone of all conversations on 4gamers. Sure enough I&#8217;ll find a solution&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/4gamers-be-launched.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Facebook Error Message: Requires valid next URL.</title>
		<link>http://www.rdlt.com/facebook-error-message-requires-valid-next-url.html</link>
		<comments>http://www.rdlt.com/facebook-error-message-requires-valid-next-url.html#comments</comments>
		<pubDate>Wed, 16 Jun 2010 09:10:48 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[api error]]></category>
		<category><![CDATA[invalid parameter]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=285</guid>
		<description><![CDATA[Let me start with asking you a few questions! Are you having issues with the Facebook API? Are you constantly getting the error message &#8220;API Error Code: 100 API Error Description: Invalid parameter Error Message: Requires valid next URL.&#8220;? Are you using the latest official Facebook PHP class? Are you redirecting using the PHP header() [...]]]></description>
			<content:encoded><![CDATA[<p>Let me start with asking you a few questions!</p>
<ol>
<li>Are you having issues with the Facebook API?</li>
<li>Are you constantly getting the error message &#8220;<em>API Error Code: 100 API Error Description: Invalid parameter Error Message: Requires valid next URL.</em>&#8220;?</li>
<li>Are you using the latest official Facebook PHP class?</li>
<li>Are you redirecting using the PHP <em>header()</em> function?</li>
</ol>
<p><a rel="lightbox" href="http://www.rdlt.com/wp-content/uploads/2010/06/facebookerror.png"><img class="alignnone size-medium wp-image-286" title="Facebook error" src="http://www.rdlt.com/wp-content/uploads/2010/06/facebookerror-300x119.png" alt="Facebook error" width="300" height="119" /></a></p>
<p>Well,  I might have a solution for you. When calling the function <em>getLoginUrl</em> in the Facebook PHP class, the function will return a HTML encoded string. When outputing this string to your browser, it is rendered/decoded by a browser and this will convert all &#8220;safe&#8221; charachters to their textual equivalent.  This makes that <em>&#8220;&amp;amp;&#8221;</em> becomes &#8220;<em>&amp;</em>&#8221; and <em>&#8220;%20&#8243;</em> becomes &#8221; &#8220;.</p>
<p>However, when using the <em>header()</em> function in PHP, this url will not be rendered/decoded and you are basically sending out a garbled request.</p>
<p><strong>Original</strong></p>
<pre><code class="php">getLoginUrl($params);
header('Location:' . $url);
</code></pre>
<p><strong>Solution:</strong></p>
<pre><code class="php">getLoginUrl($params);
$url = str_replace('&amp;','&amp;',urldecode($url));
header('Location:' . $url);
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/facebook-error-message-requires-valid-next-url.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tekken Movie Trailer</title>
		<link>http://www.rdlt.com/tekken-movie-trailer.html</link>
		<comments>http://www.rdlt.com/tekken-movie-trailer.html#comments</comments>
		<pubDate>Fri, 15 Jan 2010 11:28:02 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=276</guid>
		<description><![CDATA[Even if the story might suck, I&#8217;ll be looking forward to the intense fighting scenes&#8230; and perhaps the girls in the skimpy suits]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/VcMwniPK4EI&amp;hl=en_GB&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/VcMwniPK4EI&amp;hl=en_GB&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Even if the story might suck, I&#8217;ll be looking forward to the intense fighting scenes&#8230; and perhaps the girls in the skimpy suits <img src='http://www.rdlt.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/tekken-movie-trailer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysqli for WordPress 2.9.1</title>
		<link>http://www.rdlt.com/mysqli-for-wordpress-2-9-1.html</link>
		<comments>http://www.rdlt.com/mysqli-for-wordpress-2-9-1.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 15:18:22 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[freebies]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=271</guid>
		<description><![CDATA[WordPress does not officialy support the mysqli drivers. I needed my WordPress installation to use the mysqli class instead of the mysql ones. I&#8217;m sure there will be someone else out there with the same needs I decided to place the modified database class and the patch file online. Use whichever you prefer. Full: Download [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-256" title="wordpress-logo" src="http://www.rdlt.com/wp-content/uploads/2009/12/wordpress-logo-150x150.png" alt="wordpress-logo" width="150" height="150" />WordPress does not officialy support the <a href="http://be2.php.net/manual/en/class.mysqli.php" target="_blank">mysqli</a> drivers.  I needed my WordPress installation to use the mysqli class instead of the mysql ones. I&#8217;m sure there will be someone else out there with the same needs I decided to place the modified database class and the patch file online. Use whichever you prefer.</p>
<ul>
<li><strong>Full:</strong> <a href="http://www.rdlt.com/wp-content/uploads/2010/01/wp-db-2.9.1-class.zip" target="_blank">Download WordPress 2.9.1 mysqli database class</a></li>
<li><strong>Patch: </strong><a href="http://www.rdlt.com/wp-content/uploads/2010/01/wp-db-2.9.1-patch.zip" target="_blank">Download WordPress 2.9.1 mysqli database class</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/mysqli-for-wordpress-2-9-1.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress mysqli 2.9 Database Class Patch</title>
		<link>http://www.rdlt.com/wordpress-mysqli-2-9-database-class-patch.html</link>
		<comments>http://www.rdlt.com/wordpress-mysqli-2-9-database-class-patch.html#comments</comments>
		<pubDate>Wed, 30 Dec 2009 10:30:51 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[freebies]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=253</guid>
		<description><![CDATA[WordPress does not officialy support the mysqli drivers.  I needed my WordPress installation to use the mysqli class instead of the mysql ones. I&#8217;m sure there will be someone else out there with the same needs I decided to place the modified database class and the patch file online. Use whichever you prefer. Full: Download [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-256" title="wordpress-logo" src="http://www.rdlt.com/wp-content/uploads/2009/12/wordpress-logo-150x150.png" alt="wordpress-logo" width="150" height="150" />WordPress does not officialy support the <a href="http://be2.php.net/manual/en/class.mysqli.php" target="_blank">mysqli</a> drivers.  I needed my WordPress installation to use the mysqli class instead of the mysql ones. I&#8217;m sure there will be someone else out there with the same needs I decided to place the modified database class and the patch file online. Use whichever you prefer.</p>
<ul>
<li><strong>Full:</strong> <a href="http://www.rdlt.com/wp-content/uploads/2009/12/wp-db-2.9-class.zip" target="_blank">Download WordPress 2.9 mysqli database class</a></li>
<li><strong>Patch: </strong><a href="http://www.rdlt.com/wp-content/uploads/2009/12/wp-db-2.9-patch.zip" target="_blank">Download WordPress 2.9 mysqli database class</a></li>
</ul>
<p><span id="more-253"></span></p>
<h3>Patch contents</h3>
<pre><code>Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 19)
+++ wp-includes/wp-db.php	(working copy)
@@ -367,9 +367,12 @@
 			$this-&gt;collate = DB_COLLATE;

 		$this-&gt;dbuser = $dbuser;
+
+		// $this-&gt;dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true);
+		$this-&gt;dbh = new mysqli($dbhost, $dbuser, $dbpassword, $dbname); 

-		$this-&gt;dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true);
-		if (!$this-&gt;dbh) {
+		// if (!$this-&gt;dbh) {
+		if ($this-&gt;dbh-&gt;connect_error || mysqli_connect_error()) { // remember $mysqli-&gt;connect_error is broken in PHP &lt; 5.2.9
 			$this-&gt;bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/"
 &lt;h1&gt;Error establishing a database connection&lt;/h1&gt;
 &lt;p&gt;This either means that the username and password information in your &lt;code&gt;wp-config.php&lt;/code&gt; file is incorrect or we can't contact the database server at &lt;code&gt;%s&lt;/code&gt;. This could mean your host's database server is down.&lt;/p&gt;
@@ -386,18 +389,21 @@
 		$this-&gt;ready = true;

 		if ( !empty($this-&gt;charset) ) {
+			$this-&gt;dbh-&gt;set_charset($this-&gt;charset);
+			$this-&gt;real_escape = true;
+			/*
 			if ( function_exists('mysql_set_charset') ) {
 				mysql_set_charset($this-&gt;charset, $this-&gt;dbh);
-				$this-&gt;real_escape = true;
 			} else {
 				$collation_query = "SET NAMES '{$this-&gt;charset}'";
 				if ( !empty($this-&gt;collate) )
 					$collation_query .= " COLLATE '{$this-&gt;collate}'";
 				$this-&gt;query($collation_query);
-			}
+			}*/
 		}

-		$this-&gt;select($dbname);
+		// selection of database with mysql happens when connecting
+		// $this-&gt;select($dbname);
 	}

 	/**
@@ -454,6 +460,9 @@
 	 * @return null Always null.
 	 */
 	function select($db) {
+
+		return true; // database selection happens in constructor when usng mysqli
+
 		if (!@mysql_select_db($db, $this-&gt;dbh)) {
 			$this-&gt;ready = false;
 			$this-&gt;bail(sprintf(/*WP_I18N_DB_SELECT_DB*/'
@@ -475,7 +484,7 @@

 	function _real_escape($string) {
 		if ( $this-&gt;dbh &#038;&#038; $this-&gt;real_escape )
-			return mysql_real_escape_string( $string, $this-&gt;dbh );
+			return $this-&gt;dbh-&gt;real_escape_string( $string );
 		else
 			return addslashes( $string );
 	}
@@ -579,7 +588,7 @@
 	function print_error($str = '') {
 		global $EZSQL_ERROR;

-		if (!$str) $str = mysql_error($this-&gt;dbh);
+		if (!$str) $str = $this-&gt;dbh-&gt;error;
 		$EZSQL_ERROR[] = array ('query' =&gt; $this-&gt;last_query, 'error_str' =&gt; $str);

 		if ( $this-&gt;suppress_errors )
@@ -703,39 +712,40 @@
 		if ( defined('SAVEQUERIES') &#038;&#038; SAVEQUERIES )
 			$this-&gt;timer_start();

-		$this-&gt;result = @mysql_query($query, $this-&gt;dbh);
+		$this-&gt;result = $this-&gt;dbh-&gt;query($query);
 		++$this-&gt;num_queries;

 		if ( defined('SAVEQUERIES') &#038;&#038; SAVEQUERIES )
 			$this-&gt;queries[] = array( $query, $this-&gt;timer_stop(), $this-&gt;get_caller() );

 		// If there is an error then take note of it..
-		if ( $this-&gt;last_error = mysql_error($this-&gt;dbh) ) {
+		if ( $this-&gt;last_error = $this-&gt;dbh-&gt;error) {
 			$this-&gt;print_error();
 			return false;
 		}

 		if ( preg_match("/^\\s*(insert|delete|update|replace|alter) /i",$query) ) {
-			$this-&gt;rows_affected = mysql_affected_rows($this-&gt;dbh);
+			$this-&gt;rows_affected = $this-&gt;db-&gt;affected_rows;
 			// Take note of the insert_id
 			if ( preg_match("/^\\s*(insert|replace) /i",$query) ) {
-				$this-&gt;insert_id = mysql_insert_id($this-&gt;dbh);
+				$this-&gt;insert_id = $this-&gt;db-&gt;insert_id;
 			}
 			// Return number of rows affected
 			$return_val = $this-&gt;rows_affected;
 		} else {
 			$i = 0;
-			while ($i &lt; @mysql_num_fields($this-&gt;result)) {
-				$this-&gt;col_info[$i] = @mysql_fetch_field($this-&gt;result);
+			while ($i &lt; $this-&gt;result-&gt;field_count) {
+				$this-&gt;col_info[$i] = @$this-&gt;result-&gt;fetch_field();
 				$i++;
 			}
 			$num_rows = 0;
-			while ( $row = @mysql_fetch_object($this-&gt;result) ) {
+			while ( $row = @$this-&gt;result-&gt;fetch_object() ) {
 				$this-&gt;last_result[$num_rows] = $row;
 				$num_rows++;
 			}

-			@mysql_free_result($this-&gt;result);
+			// no more need for freeing results, they ARE free! <img src='http://www.rdlt.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
+			// @mysql_free_result($this-&gt;result);

 			// Log number of rows the query returned
 			$this-&gt;num_rows = $num_rows;
@@ -1138,4 +1148,5 @@
 	 */
 	$wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
 }
+
 ?&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/wordpress-mysqli-2-9-database-class-patch.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Drupal Hacker</title>
		<link>http://www.rdlt.com/drupal-hacker.html</link>
		<comments>http://www.rdlt.com/drupal-hacker.html#comments</comments>
		<pubDate>Thu, 10 Dec 2009 13:39:34 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=250</guid>
		<description><![CDATA[To better share my experience with Drupal to everyone, I&#8217;ve set up a new domain http://www.drupal-hacker.com . Drupal is an awesome product, we all know that. But we also know that not everything works as we expect it and that any software might have it&#8217;s quirks. Here at Drupal Hacker, I try to smooth out [...]]]></description>
			<content:encoded><![CDATA[<p>To better share my experience with Drupal to everyone, I&#8217;ve set up a new domain <a href="http://www.drupal-hacker.com" target="_blank">http://www.drupal-hacker.com </a>.</p>
<blockquote><p>Drupal is an awesome product, we all know that. But we also know that not everything works as we expect it and that any software might have it&#8217;s quirks. Here at Drupal Hacker, I try to smooth out these problems by providing patches to unmaintained modules or to ignored bugs. Last&#8230; don&#8217;t take all the sarcasm too seriously!</p>
<p><a href="http://www.drupal-hacker.com" target="_blank">http://www.drupal-hacker.com</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/drupal-hacker.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xdebug trace file parser</title>
		<link>http://www.rdlt.com/xdebug-trace-file-parser.html</link>
		<comments>http://www.rdlt.com/xdebug-trace-file-parser.html#comments</comments>
		<pubDate>Wed, 18 Nov 2009 18:02:10 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[freebies]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=241</guid>
		<description><![CDATA[When I am trying to optimize my PHP code, one of my prefered tools is xdebug. It provides me with excellent error messages, outputs code tracing files &#38; insight into memory usage. By using kcachegrind or webgrind &#8211; wincachegrind crashes *all* the time &#8211; to parse the cachegrind files created by xdebug, you get a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-243" title="xdebug_trace_preview" src="http://www.rdlt.com/wp-content/uploads/2009/11/xdebug_trace_preview-300x199.png" alt="xdebug_trace_preview" width="300" height="199" /></p>
<p>When I am trying to optimize my PHP code, one of my prefered tools is <a href="http://www.xdebug.org" target="_blank">xdebug</a>. It provides me with excellent error messages, outputs code tracing files &amp; insight into memory usage.</p>
<p>By using kcachegrind or <a href="http://code.google.com/p/webgrind/" target="_blank">webgrind</a> &#8211; wincachegrind crashes *all* the time &#8211; to parse the cachegrind files created by xdebug, you get a good idea of what your code is doing most of the time. It&#8217;ll show you which functions are called, by who, which arguments are passed and tons more. <a href="http://www.xdebug.org" target="_blank">Check it out. </a></p>
<p>Now, there was one small thing I couldn&#8217;t find anywhere. A program to parse the trace files that xdebug generates. True, xdebug already provides the option to output this information into HTML, but it&#8217;s not really what I was looking for. <strong>I want to get quick information in the blink of an eye! </strong>That&#8217;s why I have created my own trace file parser, based on PHP of course.</p>
<h3><span id="more-241"></span>What is it?</h3>
<p>This <strong>xdebug trace parser</strong> will show you, for each function:</p>
<ul>
<li>How much memory was used on entry &amp; exit</li>
<li>How much time it costed to execute the function</li>
<li>The exact line the function was called from plus insight into the code by clicking a link</li>
<li>Whether the function is native PHP or not</li>
</ul>
<p><a rel="lightbox" href="http://www.rdlt.com/wp-content/uploads/2009/11/xdebug_trace_warning.png"><img class="alignnone size-medium wp-image-245" title="xdebug_trace_warning" src="http://www.rdlt.com/wp-content/uploads/2009/11/xdebug_trace_warning-300x54.png" alt="xdebug_trace_warning" width="300" height="54" /></a></p>
<p>It also has a basic &#8220;alerting&#8221; feature, which will allow you to set triggers on memory usage &amp; execution time. You can specifiy that if the memory or time jump is greater than a certain value, to show this in the output.</p>
<h3>Requirements</h3>
<p>It should be obvious that you&#8217;ll need to install and configure xdebug for your PHP installation. See <a href="http://www.xdebug.org" target="_blank">http://www.xdebug.org</a> for more information on this.</p>
<p>Your xdebug config should look a bit like this, don&#8217;t forget to update your paths <img src='http://www.rdlt.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre><code>[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="\php\ext\php_xdebug-2.0.4-5.2.8.dll"
xdebug.auto_trace=1
xdebug.trace_format=1
xdebug.profiler_append=1
xdebug.profiler_enable=1
xdebug.profiler_enable_trigger=0
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.trace_output_dir="D:\webserver\xdebug"
xdebug.trace_output_name= %t.trace
xdebug.profiler_output_name = %s.%t.profile
xdebug.profiler_output_dir="D:\webserver\xdebug"
</code></pre>
<h3>Download</h3>
<p>Now, give it a try and <a href="../wp-content/uploads/2009/11/trace.zip" target="_blank">downlod the xdebug trace file parser here!</a></p>
<h3>Usage</h3>
<p>Once you&#8217;ve downloaded the trace file parser, extract it to a directory inside your website root and surf to the URL. If everything works out you should be able to select trace files onceyou have ran an other PHP script on your server. This trace file parser will *not* show it&#8217;s own traces because that would make things even more complicated!</p>
<p>Comments &amp; suggestions! <img src='http://www.rdlt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/xdebug-trace-file-parser.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>xampp mysqli crashes apache</title>
		<link>http://www.rdlt.com/xampp-mysqli-crashes-apache.html</link>
		<comments>http://www.rdlt.com/xampp-mysqli-crashes-apache.html#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:46:09 +0000</pubDate>
		<dc:creator>Thomas Hambach</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.rdlt.com/?p=238</guid>
		<description><![CDATA[Is your XAMPP installation crashing apache when using the mysqli PHP functions on windows? The apache logs are not telling anything even when you have debug mode enabled? Are you getting something like &#8220;Faulting application apache.exe, version 2.2.11.0, faulting module ntdll.dll&#8221; or &#8220;Faulting application apache.exe, version 2.2.11.0, faulting module MSVCR71.dll.&#8221; ? Really? Sure? Well here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Is your <strong>XAMPP </strong>installation crashing apache when using the mysqli PHP functions on windows? The apache logs are not telling anything even when you have debug mode enabled? Are you getting something like &#8220;<strong>Faulting application apache.exe, version 2.2.11.0, faulting module ntdll.dll</strong>&#8221; or &#8220;<strong>Faulting application apache.exe, version 2.2.11.0, faulting module MSVCR71.dll.</strong>&#8221; ?</p>
<p>Really? Sure? Well here&#8217;s your solution&#8230;</p>
<p>Download the most recent version of <strong>php_mysqli.dll </strong>and place it in <strong>&lt;yourxampdir&gt;\php\ext</strong> directory.You might want to take a backup of the file you&#8217;re replacing in case it doesn&#8217;t work&#8230;</p>
<p>You can <a href="http://www.rdlt.com/wp-content/uploads/2009/11/php_mysqli.zip">download the php_mysqli.dll righ here</a> or you&#8217;ll have to find a recent version for your PHP version yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rdlt.com/xampp-mysqli-crashes-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

