<?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>h3x.no &#187; PHP</title>
	<atom:link href="http://h3x.no/category/development/php/feed" rel="self" type="application/rss+xml" />
	<link>http://h3x.no</link>
	<description>Tor Henning Ueland`s thoughts about technology and other stuff</description>
	<lastBuildDate>Mon, 20 Feb 2012 10:07:52 +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 GeoIP: Required database not available at /usr/share/GeoIP/GeoIP.dat</title>
		<link>http://h3x.no/2010/11/10/php-geoip-required-database-not-available-at-usrsharegeoipgeoip-dat</link>
		<comments>http://h3x.no/2010/11/10/php-geoip-required-database-not-available-at-usrsharegeoipgeoip-dat#comments</comments>
		<pubDate>Wed, 10 Nov 2010 07:43:57 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[GeoIP]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=695</guid>
		<description><![CDATA[This error is most likely caused by you missing the GeoIP.dat file. Simply download it from Maxmind.com and place it in /usr/share/GeoIP/ (or another path if that is the case) cd /usr/share/GeoIP/ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gunzip  GeoIP.dat.gz And that should be &#8230; <a href="http://h3x.no/2010/11/10/php-geoip-required-database-not-available-at-usrsharegeoipgeoip-dat">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This error is most likely caused by you missing the GeoIP.dat file. Simply download it from Maxmind.com and place it in /usr/share/GeoIP/ (or another path if that is the case)</p>
<blockquote><p>cd /usr/share/GeoIP/<br />
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz<br />
gunzip  GeoIP.dat.gz</p></blockquote>
<p>And that should be enough, no restart of any service is needed <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2010/11/10/php-geoip-required-database-not-available-at-usrsharegeoipgeoip-dat/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sh: phpize: not found</title>
		<link>http://h3x.no/2010/07/09/sh-phpize-not-found</link>
		<comments>http://h3x.no/2010/07/09/sh-phpize-not-found#comments</comments>
		<pubDate>Fri, 09 Jul 2010 19:56:07 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[phpize]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=499</guid>
		<description><![CDATA[When using pecl, or something else that require phpize, you may get a warning saying that phpize is not found, even when you have PHP installed on your server.  In order to use phpize you need to install the PHP &#8230; <a href="http://h3x.no/2010/07/09/sh-phpize-not-found">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When using pecl, or something else that require phpize, you may get a warning saying that phpize is not found, even when you have PHP installed on your server.  In order to use phpize you need to install the PHP development packages, normally named php-devel.</p>
<p>For Debian/Ubuntu, you can fix this by running:</p>
<blockquote><p>sudo apt-get install php5-dev</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2010/07/09/sh-phpize-not-found/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wonder how many would like that PHP function</title>
		<link>http://h3x.no/2010/06/10/wonder-how-many-would-like-that-php-function</link>
		<comments>http://h3x.no/2010/06/10/wonder-how-many-would-like-that-php-function#comments</comments>
		<pubDate>Thu, 10 Jun 2010 15:59:18 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Mafia]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=446</guid>
		<description><![CDATA[Oh, and yes. It is fake, something i made last year.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="PHP mafia generator" src="http://h3x.no/images/2010/diverse/mafia.jpg" alt="" width="566" height="1443" /></p>
<p>Oh, and yes. It is fake, something i made last year.</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2010/06/10/wonder-how-many-would-like-that-php-function/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A lesson in PHP stupidity</title>
		<link>http://h3x.no/2010/02/13/a-lesson-in-php-stupidity</link>
		<comments>http://h3x.no/2010/02/13/a-lesson-in-php-stupidity#comments</comments>
		<pubDate>Sat, 13 Feb 2010 12:16:50 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=182</guid>
		<description><![CDATA[1:  post_max_size &#62;= 2GB makes PHP overflow, resulting in a negative post_max_size: &#8220;POST Content-Length of 0 bytes exceeds the limit of -2147483648 bytes&#8221; 2: defining post_max_size (etc) with MB instead of M causes PHP to only read the last character, &#8230; <a href="http://h3x.no/2010/02/13/a-lesson-in-php-stupidity">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1:  post_max_size &gt;= 2GB makes PHP overflow, resulting in a negative post_max_size:<br />
&#8220;POST Content-Length of 0 bytes exceeds the limit of -2147483648 bytes&#8221;</p>
<p>2: defining post_max_size (etc) with MB instead of M causes PHP to only read the last character, in other words 10MB becomes 10 bytes . How hard can it be to either use the first character or even better, both?</p>
<p><em>(note 1: this can be avoided by actually reading the manual, but this  should have been handled better from PHP`s side IMO)</em></p>
<p><em>(Note 2: This experience come from the latest stable PHP version in SLES 10SP2, </em><em>hopefully this has been fixed in later releases.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2010/02/13/a-lesson-in-php-stupidity/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display clock each 10 minutes x times forward in PHP</title>
		<link>http://h3x.no/2009/08/16/display-clock-each-10-minutes-x-times-forward-in-php</link>
		<comments>http://h3x.no/2009/08/16/display-clock-each-10-minutes-x-times-forward-in-php#comments</comments>
		<pubDate>Sun, 16 Aug 2009 18:23:44 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.h3x.no/?p=104</guid>
		<description><![CDATA[Here is a simple code PHP snippet to display the clock each 10 minutes x times in the format of: php5 test.php 20:40 20:50 21:00 21:10 21:20 21:30 21:40 Etc. &#60;?php $j = 0; for($i=0;$i&#60;10;$i+=1) { $j += (10*60); $hour &#8230; <a href="http://h3x.no/2009/08/16/display-clock-each-10-minutes-x-times-forward-in-php">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a simple code PHP snippet to display the clock each 10 minutes x times in the format of:</p>
<blockquote><p>
php5 test.php<br />
20:40<br />
20:50<br />
21:00<br />
21:10<br />
21:20<br />
21:30<br />
21:40</p></blockquote>
<p>Etc.</p>
<p><!-- Generator: GNU source-highlight 2.11.1<br />
by Lorenzo Bettini</p>
<p>http://www.lorenzobettini.it</p>
<p>http://www.gnu.org/software/src-highlite --></p>
<pre><tt><span style="color: #990000;">&lt;?php</span>

<span style="color: #009900;">$j</span> <span style="color: #990000;">=</span> <span style="color: #993399;">0</span><span style="color: #990000;">;</span>
<strong><span style="color: #0000ff;">for</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">$i</span><span style="color: #990000;">=</span><span style="color: #993399;">0</span><span style="color: #990000;">;</span><span style="color: #009900;">$i</span><span style="color: #990000;">&lt;</span><span style="color: #993399;">10</span><span style="color: #990000;">;</span><span style="color: #009900;">$i</span><span style="color: #990000;">+=</span><span style="color: #993399;">1</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
        <span style="color: #009900;">$j</span> <span style="color: #990000;">+=</span> <span style="color: #990000;">(</span><span style="color: #993399;">10</span><span style="color: #990000;">*</span><span style="color: #993399;">60</span><span style="color: #990000;">);</span>
        <span style="color: #009900;">$hour</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">date</span></strong><span style="color: #990000;">(</span><span style="color: #ff0000;">"H"</span><span style="color: #990000;">,</span> <span style="color: #990000;">(</span><strong><span style="color: #000000;">time</span></strong><span style="color: #990000;">()+</span><span style="color: #009900;">$j</span><span style="color: #990000;">));</span>
        <span style="color: #009900;">$min</span>  <span style="color: #990000;">=</span> <strong><span style="color: #000000;">ceil</span></strong><span style="color: #990000;">((</span><strong><span style="color: #000000;">date</span></strong><span style="color: #990000;">(</span><span style="color: #ff0000;">"i"</span><span style="color: #990000;">,</span> <span style="color: #990000;">(</span><strong><span style="color: #000000;">time</span></strong><span style="color: #990000;">()+</span><span style="color: #009900;">$j</span><span style="color: #990000;">))/</span><span style="color: #993399;">10</span><span style="color: #990000;">))*</span><span style="color: #993399;">10</span><span style="color: #990000;">;</span>
        <strong><span style="color: #0000ff;">if</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">$min</span> <span style="color: #990000;">&gt;</span> <span style="color: #993399;">50</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
                <span style="color: #009900;">$min</span> <span style="color: #990000;">=</span> <span style="color: #ff0000;">"00"</span><span style="color: #990000;">;</span>
                <span style="color: #009900;">$hour</span><span style="color: #990000;">++;</span>
        <span style="color: #ff0000;">}</span>
        <strong><span style="color: #0000ff;">echo</span></strong> <span style="color: #009900;">$hour</span><span style="color: #990000;">.</span><span style="color: #ff0000;">":"</span><span style="color: #990000;">.</span><span style="color: #009900;">$min</span><span style="color: #990000;">.</span><span style="color: #ff0000;">"\n"</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<span style="color: #990000;">?&gt;</span>
</tt></pre>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2009/08/16/display-clock-each-10-minutes-x-times-forward-in-php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 19/22 queries in 0.007 seconds using apc

Served from: h3x.no @ 2012-05-17 17:46:37 -->
