<?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>Holy Shmoly! &#187; PHP</title>
	<atom:link href="http://ocaoimh.ie/category/PHP/feed/" rel="self" type="application/rss+xml" />
	<link>http://ocaoimh.ie</link>
	<description>Look what I found today!</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:27: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>PHP is_numeric() vs is_int()</title>
		<link>http://ocaoimh.ie/2009/03/31/php-is_numeric-vs-is_int/</link>
		<comments>http://ocaoimh.ie/2009/03/31/php-is_numeric-vs-is_int/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 14:46:33 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[irishblogs]]></category>
		<category><![CDATA[is_int]]></category>
		<category><![CDATA[is_numeric]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/?p=89494711</guid>
		<description><![CDATA[Some lessons you don&#8217;t forget, but this one I did because it doesn&#8217;t come up very often. Don&#8217;t use is_int() because, as Jeremy says, it&#8217;ll lie to you. Use is_numeric() instead. Copy the following chunk of code into a php &#8230; <a href="http://ocaoimh.ie/2009/03/31/php-is_numeric-vs-is_int/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://inphotos.org/good-food-causes-cancer/"><img style='border: 1px solid #333;margin-left: 5px' src="http://inphotos.org/wp-content/uploads/2009/01/good-food-causes-cancer-150x150.jpg" align='right' border="0" /></a> Some lessons you don&#8217;t forget, but this one I did because it doesn&#8217;t come up very often.</p>
<p>Don&#8217;t use is_int() because, <a href="http://jeremy.zawodny.com/blog/archives/001503.html">as Jeremy says</a>, it&#8217;ll lie to you. Use is_numeric() instead.</p>
<p>Copy the following chunk of code into a php file and run it. You&#8217;ll be surprised at the outcome:</p>
<blockquote><p><code>$t = "12345";<br />
if( is_int($t ) ) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $t . " is an int!";<br />
} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo $t . " is not an int!";<br />
}</code></p></blockquote>
<p>The problem is that is_int() thinks a string of numbers is a string, not an integer. The <a href="http://ie2.php.net/manual/en/function.is-int.php">is_int() man page</a> has an example illustrating that but it&#8217;s easy to miss. That function should carry a public health warning! </p>
<p>There&#8217;s also the <a href="http://ie.php.net/manual/en/function.ctype-digit.php">ctype_digit()</a> function too but it has it&#8217;s own gotcha:<br />
<blockquote>Note: This function require a string to be useful, so for example passing in an integer will always return FALSE. However, also note that HTML Forms will result in numeric strings and not integers. See also the types section of the manual. </p></blockquote>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89494711" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> No related posts</li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2009/03/31/php-is_numeric-vs-is_int/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>No activity within 1800 seconds; please log in again</title>
		<link>http://ocaoimh.ie/2008/03/12/no-activity-within-1800-seconds-please-log-in-again/</link>
		<comments>http://ocaoimh.ie/2008/03/12/no-activity-within-1800-seconds-please-log-in-again/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 15:36:56 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[irishblogs]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2008/03/12/no-activity-within-1800-seconds-please-log-in-again/</guid>
		<description><![CDATA[1800 seconds is such a long time, right? It&#8217;s 30 minutes. It&#8217;s 0.5 hours. It&#8217;s 0.0208333333 days. It&#8217;s also 5.70397764 × 10-5 years. And it&#8217;s not long enough for me. phpMyAdmin logs you out after 1800 seconds, obviously for security &#8230; <a href="http://ocaoimh.ie/2008/03/12/no-activity-within-1800-seconds-please-log-in-again/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1800 seconds is such a long time, right?</p>
<ol>
<li> It&#8217;s <a href="http://www.google.ie/search?q=convert+1800+seconds+to+minutes">30 minutes</a>.</li>
<li> It&#8217;s <a href="http://www.google.ie/search?q=convert+1800+seconds+to+hours">0.5 hours</a>.</li>
<li> It&#8217;s <a href="http://www.google.ie/search?q=convert+1800+seconds+to+days">0.0208333333 days</a>.</li>
<li> It&#8217;s also <a href="http://www.google.ie/search?q=convert+1800+seconds+to+years">5.70397764 × 10<sup>-5</sup> years</a>.</li>
</ol>
<p>And it&#8217;s not long enough for me. phpMyAdmin logs you out after 1800 seconds, obviously for security reasons. That&#8217;s fine if there are other people about, if I was in an office with people coming and going, but I work from home. All I see for most of the day is my family, the radio, my messy desk, computers, and the view out the window. Time to figure out how to make that 1800 second limit a little longer or remove it altogether.</p>
<p>After a little digging, I discovered that extending the time limit to a day is actually quite easy. Open your phpMyAdmin&#8217;s config.inc.php and search for or add the following line:</p>
<blockquote><p><code>$cfg['LoginCookieValidity']     = 86400;</code></p></blockquote>
<p>Refresh your logged out phpMyAdmin and presuming you haven&#8217;t left it idle for 24 hours, you&#8217;ll be logged in again!</p>
<p>If the time limit really bugs you, you need http authentication. Look for the &#8220;auth_type&#8221; line in the config.inc.php and change that to &#8220;http&#8221;. phpMyAdmin won&#8217;t log you out as long as your browser is open. Perfect!</p>
<p>If you&#8217;re concerned about sending your MySQL username and password in the clear each time you make a request to phpMyAdmin you can either use SSL or try the &#8220;config&#8221; auth_type. Make sure you fill in the username and password fields in the config file, and secure the phpMyAdmin directory with a htpasswd file.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89493604" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2002/11/21/hot-babe-hot-babe-is/" rel="bookmark" title="Permanent Link: Hot Babe Hot-babe is a small g &#8230;">Hot Babe Hot-babe is a small g &#8230;</a></li><li> <a href="http://ocaoimh.ie/2004/02/17/ask-an-irish-woman-about-drink/" rel="bookmark" title="Permanent Link: Ask an Irish woman about drink?">Ask an Irish woman about drink?</a></li><li> <a href="http://ocaoimh.ie/2010/04/11/modern-warfare-2-nuke-in-8-seconds/" rel="bookmark" title="Permanent Link: Modern Warfare 2 nuke in 8 seconds">Modern Warfare 2 nuke in 8 seconds</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2008/03/12/no-activity-within-1800-seconds-please-log-in-again/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Is your eAccelerator cache dir still there?</title>
		<link>http://ocaoimh.ie/2007/09/05/is-your-eaccelerator-cache-dir-still-there/</link>
		<comments>http://ocaoimh.ie/2007/09/05/is-your-eaccelerator-cache-dir-still-there/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 15:25:51 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[eaccelerator]]></category>
		<category><![CDATA[irishblogs]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2007/09/05/is-your-eaccelerator-cache-dir-still-there/</guid>
		<description><![CDATA[While looking through this WordPress performance post I realised that eAccelerator might not be running properly on this blog. For some time I&#8217;ve noticed this site hasn&#8217;t been as quick off the mark as it used to be. Dare I &#8230; <a href="http://ocaoimh.ie/2007/09/05/is-your-eaccelerator-cache-dir-still-there/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While looking through this <a href="http://segala.com/blog/blog-tips3-increase-performance-of-your-wp-site/">WordPress performance post</a> I realised that <a href="http://eaccelerator.net/">eAccelerator</a> might not be running properly on this blog. For some time I&#8217;ve noticed this site hasn&#8217;t been as quick off the mark as it used to be. Dare I say it, but it was even a little sluggish!</p>
<p>If you&#8217;re not familiar with it, eAccelerator is a PHP accelerator. It caches PHP bytecode and performs optimizations to make your PHP site run a lot faster.</p>
<p>I verified that eAccelerator was loaded and then checked my php.ini configuration. Sure enough, the <code>eaccelerator.cache_dir</code> directive was set to &#8220;/tmp/eacc/&#8221; and that directory was deleted the last time my server rebooted.</p>
<p>A permanent fix is to change the location of the cache dir. Put it anywhere the webserver can read, but don&#8217;t put it in /tmp/.</p>
<p>While you&#8217;re looking at eAccelerator, upgrade to the latest version, especially if you&#8217;re running PHP5.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89493287" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2005/03/16/lighttpd-fastcgi-php-and-eaccelerator/" rel="bookmark" title="Permanent Link: Lighttpd, fastcgi, php and eAccelerator">Lighttpd, fastcgi, php and eAccelerator</a></li><li> <a href="http://ocaoimh.ie/2007/11/07/how-well-did-super-cache-handle-the-digg/" rel="bookmark" title="Permanent Link: How well did Super Cache handle the digg?">How well did Super Cache handle the digg?</a></li><li> <a href="http://ocaoimh.ie/2009/01/09/wp-super-cache-087/" rel="bookmark" title="Permanent Link: WP Super Cache 0.8.7">WP Super Cache 0.8.7</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2007/09/05/is-your-eaccelerator-cache-dir-still-there/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Notes when upgrading to PHP5</title>
		<link>http://ocaoimh.ie/2007/08/18/notes-when-upgrading-to-php5/</link>
		<comments>http://ocaoimh.ie/2007/08/18/notes-when-upgrading-to-php5/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 10:32:44 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[click-tracker]]></category>
		<category><![CDATA[crazyegg]]></category>
		<category><![CDATA[heatmap]]></category>
		<category><![CDATA[irishblogs]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2007/08/18/notes-when-upgrading-to-php5/</guid>
		<description><![CDATA[I upgraded one of my servers to PHP5 this morning. Two things to watch out for: The location of your php.ini may have changed. It&#8217;s probably now in /etc/php5/apache2/. You need to copy over any changes from your old one. &#8230; <a href="http://ocaoimh.ie/2007/08/18/notes-when-upgrading-to-php5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I upgraded one of my servers to PHP5 this morning. Two things to watch out for:
<ul>
<li> The location of your php.ini may have changed. It&#8217;s probably now in /etc/php5/apache2/. You need to copy over any changes from your old one.</li>
<li> Update your libraries too such as the mysql client and the gd library. Don&#8217;t forget you can delete the old ones. <code>apt-get install php5-mysql php5-gd</code> will do the job of installing, the old packages have a php4 prefix.</li>
<li> WP-Cache doesn&#8217;t like PHP5 much. If you see a blank page after upgrading to PHP5, then hit reload and it loads, then WP-Cache needs to be modified. Leroy has the <a href="http://www.bloggingblog.net/wp-cache-and-the-blank-page-problem/">fix</a>, open wp-cache-phase2.php in your wp-cache folder and change <code>ob_end_clean()</code><code> to </code><code>ob_end_flush()</code>. SImple as that!</li>
</ul>
<p>The reason for the upgrade? I wanted to install the gd extension, but after lots of fun upgrading everything my browser tried to <a href="http://ocaoimh.ie/2005/04/14/debian-sarge-php4-and-apache2-why-do-you-persecute-me">download every page</a>, complaining that it was a phtml file. I chose the upgrade to PHP5 to fix it!</p>
<p>And finally, the reason for gd, was to get the heatmap in this <a href="http://workshop.davors.eu/wp-click-tracking/">wordpress click tracking</a> plugin working. It&#8217;s like <a href="http://crazyegg.com/">Crazy Egg</a> and it works well, but I couldn&#8217;t get it to display a heatmap for any page other than the front page. Some of the comments on <a href="http://www.dailyblogtips.com/wordpress-click-tracking-plugin/">Daily Blog Tips</a> where I found it are hilarious. They completely miss the point of using a heatmap!</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89493268" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2003/04/23/phppatterns-updates/" rel="bookmark" title="Permanent Link: phpPatterns() Updates">phpPatterns() Updates</a></li><li> <a href="http://ocaoimh.ie/2003/02/27/a-look-at-php5/" rel="bookmark" title="Permanent Link: A Look at PHP5">A Look at PHP5</a></li><li> <a href="http://ocaoimh.ie/2005/02/18/php-future-java-or-simplicity/" rel="bookmark" title="Permanent Link: PHP Future &#8211; Java or Simplicity">PHP Future &#8211; Java or Simplicity</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2007/08/18/notes-when-upgrading-to-php5/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Cannot load mysql extension. Please check your PHP configuration.</title>
		<link>http://ocaoimh.ie/2007/01/03/cannot-load-mysql-extension-please-check-your-php-configuration/</link>
		<comments>http://ocaoimh.ie/2007/01/03/cannot-load-mysql-extension-please-check-your-php-configuration/#comments</comments>
		<pubDate>Wed, 03 Jan 2007 14:37:21 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[irishblogs]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2007/01/03/cannot-load-mysql-extension-please-check-your-php-configuration/</guid>
		<description><![CDATA[A friend recently had a problem configuring a new server. He installed PHP, Apache, MySQL and phpMyAdmin but when he launched it he got the following error: phpMyAdmin – Error Cannot load mysql extension. Please check your PHP configuration. If &#8230; <a href="http://ocaoimh.ie/2007/01/03/cannot-load-mysql-extension-please-check-your-php-configuration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A friend recently had a problem configuring a new server. He installed PHP, Apache, MySQL and phpMyAdmin but when he launched it he got the following error:</p>
<blockquote><p>phpMyAdmin – Error<br />
Cannot load mysql extension. Please check your PHP configuration.</p></blockquote>
<p>If you&#8217;ve installed all of the above more than once you&#8217;ll know what is more than likely wrong. The MySQL PHP module isn&#8217;t loaded. First of all, you must find your php.ini. It could be anywhere but if you create a small php file with the <code>phpinfo();</code> command it will tell you where it is. Common places include /etc/apache/, /etc/php4/apache2/php.ini, /etc/php5/apache2/php.ini or even /usr/local/lib/php.ini</p>
<p>Edit your server&#8217;s php.ini and look for the following line. Remove the &#8216;;&#8217; from the start of the line and restart Apache. Things should work fine now!</p>
<blockquote><p>;extension=mysql.so</p></blockquote>
<p>should become</p>
<blockquote><p>extension=mysql.so</p></blockquote>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89492982" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2002/07/26/mysql-optimization-b/" rel="bookmark" title="Permanent Link: MySQL Optimization by Jeremy Z &#8230;">MySQL Optimization by Jeremy Z &#8230;</a></li><li> <a href="http://ocaoimh.ie/2004/02/11/obscure-firefox-references-and-features/" rel="bookmark" title="Permanent Link: Obscure Firefox References and Features">Obscure Firefox References and Features</a></li><li> <a href="http://ocaoimh.ie/2004/08/24/searching-with-php-and-mysql/" rel="bookmark" title="Permanent Link: Searching with PHP and MySQL">Searching with PHP and MySQL</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2007/01/03/cannot-load-mysql-extension-please-check-your-php-configuration/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Killing off PHP</title>
		<link>http://ocaoimh.ie/2006/10/01/killing-off-php/</link>
		<comments>http://ocaoimh.ie/2006/10/01/killing-off-php/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 14:42:26 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[litespeed-tech]]></category>
		<category><![CDATA[lsphp]]></category>
		<category><![CDATA[lsws]]></category>
		<category><![CDATA[responding]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2006/10/01/killing-off-php/</guid>
		<description><![CDATA[Do you know why Apache processes get stuck and stop responding when serving pages on a WordPress site? I&#8217;ve seen this happen here and on my previous host on a regular basis. I don&#8217;t know what happens. It can&#8217;t be &#8230; <a href="http://ocaoimh.ie/2006/10/01/killing-off-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Do you know why Apache processes get stuck and stop responding when serving pages on a WordPress site?
</p>
<p>I&#8217;ve seen this happen here and on my previous host on a regular basis. I don&#8217;t know what happens. It can&#8217;t be a PHP script gone into an infinite loop because the normal Apache timeout should kill it. It&#8217;s not MySQL as a quick inspection of the process list usually shows it&#8217;s empty.</p>
<p>It could be plugins, some of them haven&#8217;t been written to the high standards that is expected in WordPress core. It could be some strange interaction between plugins and core code and memory limits and PHP extensions.</p>
<p>Whatever causes it, this will fix it. It&#8217;s brutal, it&#8217;s crude, but it&#8217;ll stop the load average going up on your box and it will ensure that every Apache child process is listening and responding. Add this to the crontab of your nobody or www-data user. Pick whichever user runs the webserver because you want to limit the damage in case something bad happens and the command malfunctions!<br />
<code>*/10 * * * * ps auxw|grep apache2| awk '$10 !~ /0:00/ {print $2":"$10}'|awk -F ':' '$2 !~ 0 {print $1}'|xargs kill -9 2&gt; /dev/null </code><br />
What this does is it uses the ps, grep, and awk tools to find processes that are using anything more than the minimum CPU time. It is very crude, but it works.</p>
<p>If you use Litespeed, then replace &#8220;apache2&#8243; with &#8220;lsphp&#8221;. I have found that this is very necessary as those processes get stuck quite often, especially in low memory situations.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89492859" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2010/08/26/so-someone-is-trying-to-reach-level-70-i/" rel="bookmark" title="Permanent Link: So someone is trying to reach level 70 i&#8230;">So someone is trying to reach level 70 i&#8230;</a></li><li> <a href="http://ocaoimh.ie/2010/08/17/its-sad-when-you-join-a-game-of-conque/" rel="bookmark" title="Permanent Link: It&#8217;s sad when you join a game of Conque&#8230;">It&#8217;s sad when you join a game of Conque&#8230;</a></li><li> <a href="http://ocaoimh.ie/2010/11/25/mileys-killing-spree/" rel="bookmark" title="Permanent Link: Miley&#8217;s killing spree">Miley&#8217;s killing spree</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2006/10/01/killing-off-php/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Gzip Compression or No?</title>
		<link>http://ocaoimh.ie/2006/08/29/gzip-compression-or-no/</link>
		<comments>http://ocaoimh.ie/2006/08/29/gzip-compression-or-no/#comments</comments>
		<pubDate>Tue, 29 Aug 2006 14:36:33 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2006/08/29/gzip-compression-or-no/</guid>
		<description><![CDATA[mod_gzip, zlib.output_compression or whatever way you compress your web pages is a great way of reducing your network traffic costs but comes at the cost of increased CPU usage. Despite what you might think, it can be more expensive to &#8230; <a href="http://ocaoimh.ie/2006/08/29/gzip-compression-or-no/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>mod_gzip, <a href="http://www.php.net/zlib">zlib.output_compression</a> or <a href="http://www.php.net/ob_gzhandler">whatever way</a> you compress your web pages is a great way of reducing your network traffic costs but comes at the cost of increased CPU usage. Despite what you might think, it can be more expensive to send data over the network, especially to slow clients than compress it first of all and send a smaller burst.</p>
<p>Unfortunately this little server may not be up to the task of gzipping content at an acceptable rate to make it worthwhile. I&#8217;ll leave it run for another few hours and check the stats tomorrow.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89492791" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2005/01/17/pear-output-cache-and-wpmu/" rel="bookmark" title="Permanent Link: PEAR Output Cache and WPMU">PEAR Output Cache and WPMU</a></li><li> <a href="http://ocaoimh.ie/2003/02/23/compressed-httpd-data/" rel="bookmark" title="Permanent Link: Compressed httpd data">Compressed httpd data</a></li><li> <a href="http://ocaoimh.ie/2003/02/24/httpd-compression-update/" rel="bookmark" title="Permanent Link: httpd compression update">httpd compression update</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2006/08/29/gzip-compression-or-no/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Five common PHP design patterns</title>
		<link>http://ocaoimh.ie/2006/07/24/five-common-php-design-patterns/</link>
		<comments>http://ocaoimh.ie/2006/07/24/five-common-php-design-patterns/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 09:18:59 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/2006/07/24/five-common-php-design-patterns/</guid>
		<description><![CDATA[Over at IBM Developer Works there&#039;s an interesting article on PHP patterns. If you&#039;ve never come across patterns before it&#039;s a good introduction. Just remember that these methods of solving software problems are most useful when you&#039;ve got lots of &#8230; <a href="http://ocaoimh.ie/2006/07/24/five-common-php-design-patterns/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over at IBM Developer Works there&#039;s an interesting article on <a href="http://www-128.ibm.com/developerworks/library/os-php-designptrns/?ca=dgr-lnxw02PHP-Patterns">PHP patterns</a>. If you&#039;ve never come across patterns before it&#039;s a good introduction. Just remember that these methods of solving software problems are most useful when you&#039;ve got lots of code. Using the MVC pattern to print &quot;Hello World!&quot; is probably a little overkill!</p>
<p>For the curious, the patterns covered are: factory, singleton, observer, chain-of-command and strategy.</p>
<p>Elsewhere on dikini.net you can find a collection of <a href="http://dikini.net/php_design_patterns">design patterns</a>. Vlado <a href="http://dikini.net/26.07.2006/updated_design_pattern_collection">updated</a> his collection recently and there&#039;s now 20 techniques or patterns. He openly admits that, &#039;not all can be considered &quot;officially&quot; design patterns, but to be honest I don&#039;t really care.&#039; (<a href="http://www.phpdeveloper.org/news/5873">via</a>)</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89492761" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2005/05/24/how-to-use-design-patterns/" rel="bookmark" title="Permanent Link: How to Use Design Patterns">How to Use Design Patterns</a></li><li> <a href="http://ocaoimh.ie/2003/01/11/a-survey-of-common-d/" rel="bookmark" title="Permanent Link: A Survey of Common Design Patt &#8230;">A Survey of Common Design Patt &#8230;</a></li><li> <a href="http://ocaoimh.ie/2003/05/19/introduction-to-design-patterns-using-php/" rel="bookmark" title="Permanent Link: Introduction to Design Patterns Using PHP">Introduction to Design Patterns Using PHP</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2006/07/24/five-common-php-design-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Optimization and Security tips and rant</title>
		<link>http://ocaoimh.ie/2006/01/25/php-optimization-and-security-tips-and-rant/</link>
		<comments>http://ocaoimh.ie/2006/01/25/php-optimization-and-security-tips-and-rant/#comments</comments>
		<pubDate>Wed, 25 Jan 2006 09:42:22 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[irishblogs]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blogs.linux.ie/xeer/2006/01/25/php-optimization-and-security-tips-and-rant/</guid>
		<description><![CDATA[Andrew van der Stock&#8217;s criticism of PHP&#8217;s security model. What security? Global request arrays go some way to making applications safer but there are obscure functions and settings which can trip up developers. (via) PHP Optimization Tricks from Ilia Alshanetsky &#8230; <a href="http://ocaoimh.ie/2006/01/25/php-optimization-and-security-tips-and-rant/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Andrew van der Stock&#8217;s <a href="http://www.greebo.net/?p=320">criticism</a> of PHP&#8217;s security model. What security? Global request arrays go some way to making applications safer but there are obscure functions and settings which can trip up developers. (<a href="http://www.phpdeveloper.org/news/4715">via</a>)<br />
<a href="http://ilia.ws/archives/12-PHP-Optimization-Tricks.html">PHP Optimization Tricks</a> from Ilia Alshanetsky has one gem I didn&#8217;t know about &#8211; the <a href="http://ie.php.net/ctype">ctype</a> extension. It&#8217;s somewhat limited but would be faster and less resouce intensive than a regular expression to do simple checks.</p>
<p>While I&#8217;m blogging development stuff, here&#8217;s <a href="http://phplens.com/phpeverywhere/?q=node/view/224">mention</a> of a <a href="http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm">vector drawing library</a> in Javascript!<br />
Yes, newer browsers have SVG support but this will work in older browsers and newer. Cute.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89492691" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2002/07/26/mysql-optimization-b/" rel="bookmark" title="Permanent Link: MySQL Optimization by Jeremy Z &#8230;">MySQL Optimization by Jeremy Z &#8230;</a></li><li> <a href="http://ocaoimh.ie/2005/06/18/seo-for-the-newbies/" rel="bookmark" title="Permanent Link: SEO for the newbies">SEO for the newbies</a></li><li> <a href="http://ocaoimh.ie/2002/12/04/system-optimization/" rel="bookmark" title="Permanent Link: System Optimization Guide for  &#8230;">System Optimization Guide for  &#8230;</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2006/01/25/php-optimization-and-security-tips-and-rant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Writing Scalable Applications with PHP</title>
		<link>http://ocaoimh.ie/2005/10/11/writing-scalable-applications-with-php/</link>
		<comments>http://ocaoimh.ie/2005/10/11/writing-scalable-applications-with-php/#comments</comments>
		<pubDate>Tue, 11 Oct 2005 09:28:50 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blogs.linux.ie/xeer/2005/10/11/writing-scalable-applications-with-php/</guid>
		<description><![CDATA[Linux Journal&#8217;s Writing Scalable Applications with PHP article makes a bold claim which some of the comments on it disagree with. Must follow some of the links later. Related Posts Writing, Briefly 2005: The year of the DOM Content is &#8230; <a href="http://ocaoimh.ie/2005/10/11/writing-scalable-applications-with-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Linux Journal&#8217;s <a href="http://www.linuxjournal.com/article/7593">Writing Scalable Applications with PHP</a> article makes a bold claim which some of the comments on it disagree with. Must follow some of the links later.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89492622" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2005/03/31/writing-briefly/" rel="bookmark" title="Permanent Link: Writing, Briefly">Writing, Briefly</a></li><li> <a href="http://ocaoimh.ie/2005/01/12/2005-the-year-of-the-dom/" rel="bookmark" title="Permanent Link: 2005: The year of the DOM">2005: The year of the DOM</a></li><li> <a href="http://ocaoimh.ie/2005/04/29/content-is-king/" rel="bookmark" title="Permanent Link: Content is King!">Content is King!</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2005/10/11/writing-scalable-applications-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

