<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for blog.kungf.eu</title>
	<atom:link href="http://blog.kungf.eu/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kungf.eu</link>
	<description>The Stuff of Hamish Brains</description>
	<lastBuildDate>Wed, 03 Mar 2010 20:07:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Colour Gradient PHP Class by Todd Cesere</title>
		<link>http://blog.kungf.eu/archived/colour-gradient-php-class/comment-page-1#comment-30550</link>
		<dc:creator>Todd Cesere</dc:creator>
		<pubDate>Wed, 03 Mar 2010 20:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=132#comment-30550</guid>
		<description>I got (and fixed - so that I could use it) a bunch of parse errors because of spaces in less than or equal to tokens. In other words, &quot;&lt; =&quot; instead of &quot;&lt;=&quot;.</description>
		<content:encoded><![CDATA[<p>I got (and fixed &#8211; so that I could use it) a bunch of parse errors because of spaces in less than or equal to tokens. In other words, &#8220;&lt; =&quot; instead of &quot;&lt;=&quot;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Colour Gradient PHP Class by Skapa en &#8216;heatmap&#8217; för fastighetspriser med Google maps &#124; Payema</title>
		<link>http://blog.kungf.eu/archived/colour-gradient-php-class/comment-page-1#comment-30540</link>
		<dc:creator>Skapa en &#8216;heatmap&#8217; för fastighetspriser med Google maps &#124; Payema</dc:creator>
		<pubDate>Thu, 04 Feb 2010 12:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=132#comment-30540</guid>
		<description>[...] hittade en php-class som heter Colour gradient class som på ett enkelt sätt skapar en färggradient array i hundra steg, baserat på vilka färger man [...]</description>
		<content:encoded><![CDATA[<p>[...] hittade en php-class som heter Colour gradient class som på ett enkelt sätt skapar en färggradient array i hundra steg, baserat på vilka färger man [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Wordpress 2.1 yay… oh wait… by borg</title>
		<link>http://blog.kungf.eu/archived/wordpress-21-yay-oh-wait/comment-page-1#comment-30461</link>
		<dc:creator>borg</dc:creator>
		<pubDate>Tue, 12 Jan 2010 11:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=104#comment-30461</guid>
		<description>mmm....thanks for info</description>
		<content:encoded><![CDATA[<p>mmm&#8230;.thanks for info</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Moved To A New Host by borg</title>
		<link>http://blog.kungf.eu/archived/5/comment-page-1#comment-30460</link>
		<dc:creator>borg</dc:creator>
		<pubDate>Tue, 12 Jan 2010 11:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=108#comment-30460</guid>
		<description>hm///useful..</description>
		<content:encoded><![CDATA[<p>hm///useful..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Mac OS X Activity Monitor &#8211; why have you forsaken me? by borg</title>
		<link>http://blog.kungf.eu/archived/activity-monitor-wtf/comment-page-1#comment-30459</link>
		<dc:creator>borg</dc:creator>
		<pubDate>Tue, 12 Jan 2010 11:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=129#comment-30459</guid>
		<description>as for me I use ActyMac DutyWatch</description>
		<content:encoded><![CDATA[<p>as for me I use ActyMac DutyWatch</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Log Parser Class by hamish</title>
		<link>http://blog.kungf.eu/archived/apache-log-parser-class/comment-page-1#comment-28440</link>
		<dc:creator>hamish</dc:creator>
		<pubDate>Wed, 01 Apr 2009 13:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=123#comment-28440</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-28376&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-28376&quot; rel=&quot;nofollow&quot;&gt;hamish&lt;/a&gt; :&lt;/strong&gt;
&lt;code&gt;
-   $quotes = preg_match(’/^\\\”/’, $element) ? true : false;&lt;br /&gt;
+  $quotes = preg_match(’/^\\”/’, $element) ? true : false;&lt;br /&gt;
&lt;br /&gt;
-   array(’/^\\\”/’, ‘/\\\”$/’),&lt;br /&gt;
+  array(’/^\\”/’, ‘/\\”$/’),&lt;br /&gt;
 &lt;br /&gt;
-   if(!preg_match($time_format, $time, $matches)&lt;br /&gt;
+  if(!preg_match($time_format, $time, $m)&lt;br /&gt;
&lt;/code&gt; 
&lt;/blockquote&gt;

Of the changes suggested above, I agree with the last. There is clearly a mistake here that will stop the time stamps from being parsed. The other two however, I am not so sure. In both cases it is matching the quotes on the element string. Eg: &lt;code&gt;\&quot;%{User-Agent}i\&quot;&lt;/code&gt; But the quotes must be escaped in the &lt;code&gt;httpd.conf&lt;/code&gt; so we must match &lt;code&gt;\&quot;&lt;/code&gt;. The &lt;code&gt;\&lt;/code&gt; (backslash) is the escape character for both PHP strings and regular expressions, so it must be escaped twice. Therefore I think the correct value here is &lt;code&gt;’/^\\\\”/&lt;/code&gt; with four slashes.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-28376"><p>
<strong><a href="#comment-28376" rel="nofollow">hamish</a> :</strong><br />
<code><br />
-   $quotes = preg_match(’/^\\\”/’, $element) ? true : false;<br />
+  $quotes = preg_match(’/^\\”/’, $element) ? true : false;</p>
<p>-   array(’/^\\\”/’, ‘/\\\”$/’),<br />
+  array(’/^\\”/’, ‘/\\”$/’),</p>
<p>-   if(!preg_match($time_format, $time, $matches)<br />
+  if(!preg_match($time_format, $time, $m)<br />
</code>
</p></blockquote>
<p>Of the changes suggested above, I agree with the last. There is clearly a mistake here that will stop the time stamps from being parsed. The other two however, I am not so sure. In both cases it is matching the quotes on the element string. Eg: <code>\"%{User-Agent}i\"</code> But the quotes must be escaped in the <code>httpd.conf</code> so we must match <code>\"</code>. The <code>\</code> (backslash) is the escape character for both PHP strings and regular expressions, so it must be escaped twice. Therefore I think the correct value here is <code>’/^\\\\”/</code> with four slashes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Colour Gradient PHP Class by hamish</title>
		<link>http://blog.kungf.eu/archived/colour-gradient-php-class/comment-page-1#comment-28378</link>
		<dc:creator>hamish</dc:creator>
		<pubDate>Mon, 30 Mar 2009 02:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=132#comment-28378</guid>
		<description>Okay I fixed the file containing the wrong class problem... and it only took me a year. :p</description>
		<content:encoded><![CDATA[<p>Okay I fixed the file containing the wrong class problem&#8230; and it only took me a year. :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Log Parser Class by hamish</title>
		<link>http://blog.kungf.eu/archived/apache-log-parser-class/comment-page-1#comment-28376</link>
		<dc:creator>hamish</dc:creator>
		<pubDate>Mon, 30 Mar 2009 02:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=123#comment-28376</guid>
		<description>Justin Randel; suggested to following patch, which I may get around to merging some time:
&lt;pre style=&quot;font-size:smaller&quot;&gt;
--- src/ApacheLogParser.php	2007-05-31 23:03:27.000000000 +1000
+++ ApacheLogParser.php	2009-01-08 20:26:48.000000000 +1100
@@ -137,12 +137,12 @@ class ApacheLogRegex {
 
         foreach(explode(&#039; &#039;, $this-&gt;_format) as $element)
         {
-            $quotes = preg_match(&#039;/^\\\&quot;/&#039;, $element) ? true : false;
+            $quotes = preg_match(&#039;/^\\&quot;/&#039;, $element) ? true : false;
 
             if($quotes)
             {
                 $element = preg_replace(
-                    array(&#039;/^\\\&quot;/&#039;, &#039;/\\\&quot;$/&#039;),
+                    array(&#039;/^\\&quot;/&#039;, &#039;/\\&quot;$/&#039;),
                     &#039;&#039;,
                     $element
                 );
@@ -333,7 +333,7 @@ class ApacheLogRegex {
             .&#039;:([\d]{2}):([\d]{2}) ([\+\-])([\d]{2})([\d]{2})\]/&#039;;
 
         $m = array();    //matches
-        if(!preg_match($time_format, $time, $matches)
+        if(!preg_match($time_format, $time, $m)
                 &#124;&#124; count($m) != 10)
             return null;
 
@@ -347,5 +347,3 @@ class ApacheLogRegex {
 
 } // end class ApacheLogRegex
 
-
-?&gt;
\ No newline at end of file
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Justin Randel; suggested to following patch, which I may get around to merging some time:</p>
<pre style="font-size:smaller">
--- src/ApacheLogParser.php	2007-05-31 23:03:27.000000000 +1000
+++ ApacheLogParser.php	2009-01-08 20:26:48.000000000 +1100
@@ -137,12 +137,12 @@ class ApacheLogRegex {

         foreach(explode(' ', $this->_format) as $element)
         {
-            $quotes = preg_match('/^\\\"/', $element) ? true : false;
+            $quotes = preg_match('/^\\"/', $element) ? true : false;

             if($quotes)
             {
                 $element = preg_replace(
-                    array('/^\\\"/', '/\\\"$/'),
+                    array('/^\\"/', '/\\"$/'),
                     '',
                     $element
                 );
@@ -333,7 +333,7 @@ class ApacheLogRegex {
             .':([\d]{2}):([\d]{2}) ([\+\-])([\d]{2})([\d]{2})\]/';

         $m = array();    //matches
-        if(!preg_match($time_format, $time, $matches)
+        if(!preg_match($time_format, $time, $m)
                 || count($m) != 10)
             return null;

@@ -347,5 +347,3 @@ class ApacheLogRegex {

 } // end class ApacheLogRegex

-
-?>
\ No newline at end of file
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Log Parser Class by Adrien</title>
		<link>http://blog.kungf.eu/archived/apache-log-parser-class/comment-page-1#comment-27646</link>
		<dc:creator>Adrien</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=123#comment-27646</guid>
		<description>Hi, thanks for this usefull class, i use it for a statistics.

However there is an syntax error in your script that disable the logtime_to_timestamp method:
At line 384 (in version 1.2.1) you must set &quot;$m&quot; as parameter of &quot;preg_match&quot; instead of &quot;$matches&quot;.

So the code will look like (at line 384):
		if(!preg_match($time_format, $time, $m)

Have a nice day!</description>
		<content:encoded><![CDATA[<p>Hi, thanks for this usefull class, i use it for a statistics.</p>
<p>However there is an syntax error in your script that disable the logtime_to_timestamp method:<br />
At line 384 (in version 1.2.1) you must set &#8220;$m&#8221; as parameter of &#8220;preg_match&#8221; instead of &#8220;$matches&#8221;.</p>
<p>So the code will look like (at line 384):<br />
		if(!preg_match($time_format, $time, $m)</p>
<p>Have a nice day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Log Parser Class by Lubo</title>
		<link>http://blog.kungf.eu/archived/apache-log-parser-class/comment-page-1#comment-26262</link>
		<dc:creator>Lubo</dc:creator>
		<pubDate>Sun, 18 Jan 2009 13:53:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kungf.eu/?p=123#comment-26262</guid>
		<description>find line 383 -
if(!preg_match($time_format, $time, $matches)

and replace it with 	

if(!preg_match($time_format, $time, $m)

- so $matches should be $m and it&#039;ll work fine

chers</description>
		<content:encoded><![CDATA[<p>find line 383 -<br />
if(!preg_match($time_format, $time, $matches)</p>
<p>and replace it with 	</p>
<p>if(!preg_match($time_format, $time, $m)</p>
<p>- so $matches should be $m and it&#8217;ll work fine</p>
<p>chers</p>
]]></content:encoded>
	</item>
</channel>
</rss>
