<?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>Pierre&#039;s Blog</title>
	<atom:link href="http://pierre.linux.edu/feed/" rel="self" type="application/rss+xml" />
	<link>http://pierre.linux.edu</link>
	<description>A blog about Internet and technologies</description>
	<lastBuildDate>Sun, 21 Aug 2011 13:06:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Converting your AVI files to any DivX / Xvid format</title>
		<link>http://pierre.linux.edu/2011/05/converting-your-avi-files-to-any-divx-xvid-format/</link>
		<comments>http://pierre.linux.edu/2011/05/converting-your-avi-files-to-any-divx-xvid-format/#comments</comments>
		<pubDate>Sun, 01 May 2011 17:04:41 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Free]]></category>
		<category><![CDATA[MacOS]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=247</guid>
		<description><![CDATA[Greetings everyone, I&#8217;ve been recently searching on a way to convert a RIFF86 AVI file into a decent DivX / Xvid format on my MacBook, and I though it would be cool to share my technic for all of you who wants an easy and free way to convert your movie into DivX or Xvid [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings everyone,</p>
<p>I&#8217;ve been recently searching on a way to convert a RIFF86 AVI file into a decent DivX / Xvid format on my MacBook, and I though it would be cool to share my technic for all of you who wants an easy and free way to convert your movie into DivX or Xvid format.<br />
<br/><br />
<span id="more-247"></span></p>
<h3>1) Get MacPorts</h3>
<p>1st of all, you will need to <a href="http://pierre.linux.edu/2010/09/how-to-install-open-source-software-on-a-mac/">get working MacPorts / Darwin Ports on your mac</a>.<br />
Feel free to have a look about <a href="http://pierre.linux.edu/2010/09/how-to-install-open-source-software-on-a-mac/">what it MacPorts is on this page</a>.</p>
<p>&nbsp;</p>
<h3>2) Install MPlayer</h3>
<p><span style="text-decoration: underline;">What is MPlayer? </span></p>
<p>MPlayer is a free open-source multimedia player who is able to read a large number of format on a large number of operating system.</p>
<p><span style="text-decoration: underline;">How to install on a Mac ?</span></p>
<p>In a terminal on your mac, run this command:</p>
<blockquote><p>me@BidouBook:~# sudo port install mplayer +x264 +xvid</p></blockquote>
<p>Once it is installed, you can start to convert your files using &#8220;mencoder&#8221; command.</p>
<p>&nbsp;</p>
<p>Check your available video codec by running:</p>
<blockquote><p>me@BidouBook:~# mencoder -ovc help</p></blockquote>
<p>Check your available audio codec by running:</p>
<blockquote><p>me@BidouBook:~# mencoder -oac help</p></blockquote>
<p>&nbsp;</p>
<p>The syntax works like this:</p>
<blockquote><p>me@BidouBook:~# mencoder &lt;filename.avi&gt; -ovc xvid -oac mp3lame -xvidencopts bitrate=768 -o &lt;output.avi&gt;</p></blockquote>
<p>Simply replace &#8220;&lt;filename.avi&gt;&#8221; by your input AVI file, and &lt;output.avi&gt; with an output filename and you are done!</p>
<p>&nbsp;</p>
<p>Happy converting!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2011/05/converting-your-avi-files-to-any-divx-xvid-format/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting up exim with AUTH LOGIN, AUTH PLAIN and AUTH CRAM-MD5 with Debian</title>
		<link>http://pierre.linux.edu/2010/11/setting-up-exim-with-auth-login-auth-plain-and-auth-cram-md5-with-debian/</link>
		<comments>http://pierre.linux.edu/2010/11/setting-up-exim-with-auth-login-auth-plain-and-auth-cram-md5-with-debian/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 01:27:11 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Authentification]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[exim]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=242</guid>
		<description><![CDATA[Hello everyone, I faced recently lots of trouble while setting up a Debian box with exim. Obviously, the documentation was outdated or incomplete on some aspect, and I lost so many time searching &#8220;WTF my exim4 is not making AUTH PLAIN, AUTH LOGIN and/or AUTH CRAM-MD5&#8243; that I though it would be good to share [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>I faced recently lots of trouble while setting up a Debian box with exim.</p>
<p>Obviously, the documentation was outdated or incomplete on some aspect, and I lost so many time searching &#8220;WTF my exim4 is not making AUTH PLAIN, AUTH LOGIN and/or AUTH CRAM-MD5&#8243; that I though it would be good to share the solution with you guys.</p>
<p>I know some of you would say &#8220;Damn dude, this is insecure to do it!&#8221;  and you are right (except perhaps for CRAM-MD5 which add little more  complexity than LOGIN), but anyway, here is a 1st shot on &#8220;how to make  it work simple&#8221; before you finally set SSL on it.</p>
<p>Also, some  people might use port with authentication, because their lossy client /  provider don&#8217;t support SSL. (This is probably the case with some mobile  phone&#8230; I believe)</p>
<p><span id="more-242"></span></p>
<p>Ok let&#8217;s begin:</p>
<h3>1) Installing the correct package</h3>
<blockquote><p>
apt-get install exim4 exim4-config
</p></blockquote>
<p>This command should install exim4 on your setup.</p>
<p>During installation, you should be asked a few questions about the mail server you wanna set.</p>
<p>I choose &#8220;<em>Internet site; mail is sent and received directly using SMTP</em>&#8221; and I choose &#8220;<em>NO</em>&#8221; when asking &#8220;<em>Split configuration into small files?</em>&#8221;</p>
<p><em>NOTE: if you are not sure about your current exim install, you can reconfigure it by running &#8220;dpkg-reconfigure exim4&#8243;</em></p>
<h3>2) Edit exim4.conf.template</h3>
<p>Yes, that&#8217;s right, you need to change a few thing within this file to make it work.</p>
<p>Find the line where it is written &#8220;plain_server&#8221; and uncomment the block</p>
<blockquote><p>
plain_server:<br />
  driver = plaintext<br />
  public_name = PLAIN<br />
  server_condition = &#8220;${if crypteq{$auth3}{${extract{1}{:}{${lookup{$auth2}lsearch{CONFDIR/passwd}{$value}{*:*}}}}}{1}{0}}&#8221;<br />
  server_set_id = $auth2<br />
  server_prompts = :<br />
  .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS<br />
   server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}<br />
  .endif
</p></blockquote>
<p>Repeat that operation for &#8220;login_server&#8221; and &#8220;cram_md5_server&#8221; to enable both &#8220;AUTH LOGIN&#8221; and &#8220;AUTH CRAM-MD5&#8243;</p>
<h3>2) Create a login and password list</h3>
<p>The most easy way to do it is probably to run the script: <code>/usr/share/doc/exim4/examples/exim-adduser</code><br />
This script will create the file <em>/etc/exim4/passwd</em>, storing both &#8220;PLAIN&#8221; and &#8220;MD5&#8243; password.</p>
<p>Make sure you set the correct permission on that file:</p>
<p><code>chown root:Debian-exim /etc/exim4/passwd<br />
chmod 600 /etc/exim4/passwd</code></p>
<h3>3) Run update-exim4.conf</h3>
<p>Run update-exim4.conf and restart exim agent.</p>
<h3>4) Test to see if it works</h3>
<p>A simple telnet on port 25 can help you check if the AUTH mode is working.<br />
<code>root@localhost:~# telnet localhost 25<br />
Trying 127.0.0.1...<br />
Connected to localhost.localdomain.<br />
Escape character is '^]'.<br />
220 localhost ESMTP Exim 4.69 Tue, 23 Nov 2010 02:22:22 +0100<br />
ehlo smtp<br />
250-localhost Hello localhost [127.0.0.1]<br />
250-AUTH=LOGIN CRAM-MD5 PLAIN<br />
250-AUTH LOGIN CRAM-MD5 PLAIN<br />
250-STARTTLS<br />
250-PIPELINING<br />
250 8BITMIME</code></p>
<p>If you see that 250-AUTH LOGIN CRAM-MD5 PLAIN<br />
Then yes, it it working!</p>
<h3>5) What if something goes wrong ?</h3>
<p>You can always check in the logs to see if something went wrong, see the file <em>/var/log/exim4/mainlog </em></p>
<p>Enjoy <img src='http://pierre.linux.edu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/11/setting-up-exim-with-auth-login-auth-plain-and-auth-cram-md5-with-debian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Checking for rootkit using rkhunter</title>
		<link>http://pierre.linux.edu/2010/11/checking-for-rootkit-using-rkhunter/</link>
		<comments>http://pierre.linux.edu/2010/11/checking-for-rootkit-using-rkhunter/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 19:56:05 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=238</guid>
		<description><![CDATA[It&#8217;s pretty common nowadays to have linux server and linux boxes at home, or at work, for hosting website and even more. It&#8217;s also true that linux offer a high level of security, because most of the source codes are open (means everyone have access to it) but also because most linux distro check and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty common nowadays to have linux server and linux boxes at home, or at work, for hosting website and even more.</p>
<p>It&#8217;s also true that linux offer a high level of security, because most of the source codes are open (means everyone have access to it) but also because most linux distro check and provide solution for all kind of security flaws in their product.</p>
<p><span id="more-238"></span>But anyway, if you are paranoid and you want to make sure your system have not been hacked, there is a little tool you should install and use frequently to make sure no one else than you uses your linux.</p>
<p><span style="text-decoration: underline;">Your server doesn&#8217;t need to be hacked to protect and use this software.</span></p>
<p>That tools call &#8220;rkhunter&#8221; for &#8220;Rootkit Hunter&#8221;.</p>
<h3>1) What is a rootkit ?</h3>
<p>A rootkit is a software that enables continued privileged access to a computer, while actively hiding its presence from administrators by subverting standard operating system functionality or other applications.</p>
<h3>2) What is a rkhunter ?</h3>
<p>rkhunter (Rootkit Hunter) is a Unix-based tool that scans for rootkits, backdoors and possible local exploits.</p>
<p>In another word, rootkit hunter helps you find rootkit on your system.</p>
<h3>3) Howto setup rkhunter ?</h3>
<p>I think the most easy way to install rkhunter is to use your package manager to have it (apt-get install rkhunter or yum install rkhunter). But you can also download the source from <a href="http://rkhunter.sourceforge.net/">http://rkhunter.sourceforge.net/<br />
</a></p>
<p>Once rkhunter is installed, there are a few things to do to make it works better:</p>
<ul>
<li>
<pre>rkhunter --update (Runs virus db update)</pre>
</li>
<li>
<pre>rkhunter --check (Check for existing rootkit on the system)</pre>
</li>
<li>
<pre>rkhunter --propupd (To create db of various file on your system)</pre>
</li>
</ul>
<p>That&#8217;s all !!</p>
<p>One last thing you need to know, if for some reason, rkhunter show you &#8220;red value&#8221; or &#8220;not ok sign&#8221;, then yes, you have a problem!</p>
<p>PS: for some reason, rkhunter doesn&#8217;t work pretty well with MacOS X. Too bad <img src='http://pierre.linux.edu/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/11/checking-for-rootkit-using-rkhunter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s new with HTML 5</title>
		<link>http://pierre.linux.edu/2010/10/whats-new-with-html-5/</link>
		<comments>http://pierre.linux.edu/2010/10/whats-new-with-html-5/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 14:14:05 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=227</guid>
		<description><![CDATA[Hello everyone, Today, I&#8217;ll talk a bit about HTML5, and what are the main tags that have changed. Ready for the next ? After reading the fantastic book &#8220;HTML5, up and running&#8221; published by O&#8217;Reilly, I wanted to share a few infos that I found in it to introduce people in the world of HTML5. [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>Today, I&#8217;ll talk a bit about HTML5, and what are the main tags that have changed.</p>
<p>Ready for the next ?</p>
<p><span id="more-227"></span>After reading the fantastic book &#8220;<a href="http://www.amazon.com/HTML5-Up-Running-Mark-Pilgrim/dp/0596806027">HTML5, up and running</a>&#8221; published by O&#8217;Reilly, I wanted to share a few infos that I found in it to introduce people in the world of HTML5.</p>
<h3>Semantic Tags</h3>
<p>I believe the main difference between HTML5 and older versions are optimizations based on semantic, and not on about data presentation. If you don&#8217;t know what&#8217;s semantic, I suggest you have a look at wikipedia&#8217;s article about the subject <a href="http://en.wikipedia.org/wiki/Semantic_Web">here</a>.</p>
<p>Let&#8217;s see that in a simple example, using the old and the new HTML tags for displaying a web page holding a list of articles.</p>
<p>Imagine a classic page:</p>
<pre>+ Main Page Title
+
+-- Sub Title
+---- Article's content
+
+-- Sub Title
+---- Article's content</pre>
<p>Etc&#8230;</p>
<p>In an old HTML way, you would have done something like this</p>
<pre>&lt;H1&gt; Main Page Title &lt;/H1&gt;

&lt;DIV class="article"&gt;
 &lt;H2&gt; Sub Title &lt;/H2&gt;
 &lt;DIV class="content"&gt; Article's content &lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="article"&gt;
 &lt;H2&gt; Sub Title &lt;/H2&gt;
 &lt;DIV class="content"&gt; Article's content &lt;/DIV&gt;
&lt;/DIV&gt;
</pre>
<p>The problem is, class=&#8221;article&#8221; and class=&#8221;content&#8221; have no sense to search engine (and people), and is only used here to display information (Eg, with a big font, or colored character, etc&#8230;)</p>
<p>For the search engine, they are just part of text.</p>
<p>But, would it be better if search engine understand what type of text it is? (title / content / etc&#8230;?)<br />
HTML5 introduce new tags such as &lt;article&gt;, &lt;header&gt; and &lt;time&gt;.</p>
<p>Those 3 tags will really help search engine understand the text found on the page and how they are structured.</p>
<p>This is what you would to display the entry, using HTML5:</p>
<pre>&lt;article&gt;
 &lt;header&gt;
  &lt;h1&gt; Sub Title Goes here &lt;/h1&gt;
  &lt;time datetime="2010-11-06" pubdate&gt; October 6, 2010 &lt;/time&gt;
 &lt;/header&gt;
 &lt;p&gt; Article's content &lt;/p&gt;
&lt;/article&gt;</pre>
<p>As you can see, I used &lt;H1&gt; tag to place the title, and yes, it&#8217;s no more a problem to have more than one &lt;H1&gt; on your page to display a structured heading tree.</p>
<p>Also the &lt;time&gt; here is a new tag that pretty help search engine knowing when the article has been published. There are also other format that you can use, including some with GMT, which could help people and search engine knowing exactly when the article was published.</p>
<p>They are all packed into a &lt;header&gt; tag (which by the way, have nothing to do with HTML &lt;head&gt; tag). This help search engine understand those info are not part of the article&#8217;s content, and should be treated differently.</p>
<h3>Video and Audio</h3>
<p>Another thing that comes with HTML5 are the new tags &lt;video&gt; and &lt;audio&gt;, who should replace &lt;embed&gt; and &lt;object&gt; wars/troubles when having to display such contents&#8230;</p>
<h3>Form and Inputs</h3>
<p>A lot of new input&#8217;s type have been created to help browser/developer validatating their forms. Such as type email, number, range, search, etc&#8230;</p>
<p>This article is really short, compare to all the things that have changed with HTML5. If you want more info on the subject, I really suggest you buy yourself <a href="http://en.wikipedia.org/wiki/Mark_Pilgrim">Mark Pilgrim</a>&#8216;s book which gives more details and informations on the subjects and much much more.</p>
<p>Hope you enjoyed this post, and see you soon</p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/10/whats-new-with-html-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to install open-source software on a Mac</title>
		<link>http://pierre.linux.edu/2010/09/how-to-install-open-source-software-on-a-mac/</link>
		<comments>http://pierre.linux.edu/2010/09/how-to-install-open-source-software-on-a-mac/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 17:32:54 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Free]]></category>
		<category><![CDATA[MacOS]]></category>
		<category><![CDATA[darwin]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=222</guid>
		<description><![CDATA[Hello everyone, Today, I&#8217;ll discuss quickly about &#8220;how to install open-source software on a mac&#8221;. It&#8217;s pretty well known that Apple strategy consist in &#8220;controlling and choosing all the software you can install on Apple computer&#8221;. And this, because it improve OS stability and reduce amount of crash/virus you can have on a computer. As [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>Today, I&#8217;ll discuss quickly about &#8220;how to install open-source software on a mac&#8221;.</p>
<p><span id="more-222"></span>It&#8217;s pretty well known that Apple strategy consist in &#8220;controlling and choosing all the software you can install on Apple computer&#8221;. And this, because it improve OS stability and reduce amount of crash/virus you can have on a computer.</p>
<p>As many of us, I like to use and install free <a href="http://en.wikipedia.org/wiki/Open_source">open-source</a> software, such as &#8220;unrar utility&#8221; or VLC on my computer, for my own personal use.</p>
<p>I know you would &#8220;hey wait a minute, there already plenty of software I can install on my Mac, such as iTunes for watching movies&#8230;&#8221; and you are right, but anyway, I&#8217;ll still show you how you can have more than that by installation <a href="http://www.macports.org/">mac ports</a> on your mac.</p>
<p>MacPorts project (also know as Darwin Ports Project) offers more than 7000 of open source software, almost out of the box, for all kinds of usage.</p>
<p>Ports system is similar to BSD ports system (for those who already use BSD). It allows your mac to download, compile and install opensource software in a single command line.</p>
<p>It also help upgrading them and keep dependency &#8220;up to date&#8221; with the latest stable release of all ports.</p>
<p>Ok but enough talking, how can I install it on my mac?</p>
<p>The probably most easy way to do it is to download the DMG package for your OS. (Right now, I&#8217;m using MacOS X snow leopard and I think it&#8217;s the latest one)</p>
<p>Here is a shortcut to the download page: <a href="http://distfiles.macports.org/MacPorts/MacPorts-1.9.1-10.6-SnowLeopard.dmg">http://distfiles.macports.org/MacPorts/MacPorts-1.9.1-10.6-SnowLeopard.dmg</a></p>
<p><em>NOTE: make sure you have the latest version, by the time you read this post, release 1.9.1 could be &#8220;outated&#8221;.</em></p>
<p>Once you download that, the package install pretty much as any other mac dmg package.</p>
<p>Then, everything you want to install have to be installed from the command line (also called &#8220;Terminal&#8221; on Mac)</p>
<p>Here is a short list of command you might find usefull to begin with:</p>
<ol>
<li>
<pre>port selfupdate</pre>
</li>
<li>
<pre>port upgrade outdated</pre>
</li>
<li>
<pre>port search XXX</pre>
</li>
<li>
<pre>port install XXX</pre>
</li>
</ol>
<p>Selfupdate is used to update ports tree (all open source versions that could be installed on your system)</p>
<p>Upgrade outdated upgrade all &#8220;outdated&#8221; software, computing dependency, so you always have the latest version of everything you&#8217;ve installed on your computer.</p>
<p>Search XXX help searching for a specific program &#8220;eg: port search unrar&#8221;</p>
<p>Install XXX install the software you&#8217;ve chosen</p>
<p>That&#8217;s it for today, enjoy <img src='http://pierre.linux.edu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/09/how-to-install-open-source-software-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP vs CodeIgniter Benchmark Performance</title>
		<link>http://pierre.linux.edu/2010/08/cakephp-vs-codeigniter-benchmark-performance/</link>
		<comments>http://pierre.linux.edu/2010/08/cakephp-vs-codeigniter-benchmark-performance/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 01:04:23 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=214</guid>
		<description><![CDATA[Greeting everyone, I&#8217;ll post today another  benchmark result which compare CakePHP versus CodeIgniter, 2 popular php framework that help coder building their site quickly. I&#8217;m not an expert with PHP framework, since there are so many and they evolute everyday, so I&#8217;m not posting here to present another vague comparison on &#8220;which framework is the [...]]]></description>
			<content:encoded><![CDATA[<p>Greeting everyone,</p>
<p>I&#8217;ll post today another  benchmark result which compare CakePHP versus CodeIgniter, 2 popular php framework that help coder building their site quickly.</p>
<p>I&#8217;m not an expert with PHP framework, since there are so many and they evolute everyday, so I&#8217;m not posting here to present another vague comparison on &#8220;which framework is the best&#8221; and &#8220;why to choose one instead of another&#8221;&#8230;</p>
<p>On this post, I only want to display server&#8217;s performance comparison between cake and CI.</p>
<p>The test will create a variable &#8220;hello world&#8221; in the controller, and then display it in the view (pretty simple), no cache (except APC opcode), blank page with variable to be displayed.</p>
<p><span id="more-214"></span></p>
<h5>Versions I&#8217;ve been using for this test are:</h5>
<p>- CakePHP 1.3.3</p>
<p>- CodeIgniter 1.7.2</p>
<h5>Server Configuration:</h5>
<p>- Macbook (Intel Core2 2,4Ghz / 2Gb RAM)</p>
<p>- PHP 5.3.3 (with APC)</p>
<p>- Apache 2.2.15</p>
<h5 style="text-align: left;">Code for this test can be downloaded here:</h5>
<p style="text-align: left;">- <a href="sources_cakephp.tar.bz2">cakephp sources</a></p>
<p style="text-align: left;">- <a href="http://pierre.linux.edu/sources_codeigniter.tar.bz2">codeigniter sources</a></p>
<p style="text-align: left;">I will use &#8220;ab&#8221;, Apache Benchmark Tool, using 10 concurent user during 60 seconds. (NOTE: yes, i use ab since Neotys doesn&#8217;t want to provide me a NeoLoad licence for free&#8230;)</p>
<h5 style="text-align: left;">Complete requests:</h5>
<p style="text-align: left;">- CakePHP: 3450 hits</p>
<p style="text-align: left;">- CI: 32544 hits</p>
<h5>Requests per second:</h5>
<p>- CakePHP: 57.50 [#/sec]</p>
<p>- CI: 542.37 [#/sec]</p>
<h5>longest request</h5>
<p>- CakePHP: 897 ms</p>
<p>- CI: 1997 ms</p>
<p>Enjoy <img src='http://pierre.linux.edu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/08/cakephp-vs-codeigniter-benchmark-performance/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using htaccess to redirect domain to www</title>
		<link>http://pierre.linux.edu/2010/08/using-htaccess-to-redirect-domain-to-www/</link>
		<comments>http://pierre.linux.edu/2010/08/using-htaccess-to-redirect-domain-to-www/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 00:22:41 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.htaccess]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=207</guid>
		<description><![CDATA[Welcome back!! Today, I&#8217;ll show you an easy rule to redirect domain.com to www.domain.com to help you prevent your site from duplicate content. I know it has been said thousand of time on other site about it, but I still meet persons/companies that doesn&#8217;t properly configure their address&#8230; First of all, this rule only work [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome back!!</p>
<p>Today, I&#8217;ll show you an easy rule to redirect domain.com to www.domain.com to help you prevent your site from <a href="http://en.wikipedia.org/wiki/Duplicate_content">duplicate content</a>. I know it has been said thousand of time on other site about it, but I still meet persons/companies that doesn&#8217;t properly configure their address&#8230;</p>
<p><span id="more-207"></span>First of all, this rule only work for apache webserver having the &#8220;<a href="http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride">AllowOverride</a>&#8221; set to something else than &#8220;none&#8221; and having the &#8220;mod_rewrite&#8221; module enabled.</p>
<p>You may ask to yourself, do I need such a rule for my site? This is how to find out if you do.</p>
<p>1) Call your site using http://domain.com/, see your home (or see 404)</p>
<p>2) Call your site using http://www.domain.com/, see your home</p>
<p>If the page load without any redirect (eg, to change domain.com to www.domain.com), then YES, you need this rule.</p>
<p>If you see, your home on both address, then you might be in duplicate content.</p>
<p>If you see a 404 on one of the 2 pages, then visitors might hate you for forcing them to add &#8220;www&#8221; to access your site (instead of simply calling domain.com)</p>
<p>Here is the rule to write in the .htaccess file, which should be place at the root folder of your site directory:</p>
<pre> Options +FollowSymlinks
 RewriteEngine On
 RewriteCond %{http_host} ^domain.com [NC]
 RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
</pre>
<p>Make sure you replace &#8220;domain.com&#8221; on the 2 lines above with your own site domain.</p>
<p>Enjoy <img src='http://pierre.linux.edu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/08/using-htaccess-to-redirect-domain-to-www/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Choosing the best redirect for your SEO</title>
		<link>http://pierre.linux.edu/2010/08/choosing-the-best-redirect-for-your-seo/</link>
		<comments>http://pierre.linux.edu/2010/08/choosing-the-best-redirect-for-your-seo/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 01:06:37 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[seo]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=204</guid>
		<description><![CDATA[Greetings everyone !!! Today I&#8217;ll talk a bit about page web redirection, also called redirect and how to use them properly to optimize your SEO (Search Engine Optimization) It exists a lot of manner to redirect someone from a page to another. Today, we&#8217;ll focus on what we call &#8220;HTTP Redirect&#8221;, based on HTTP header [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings everyone !!!</p>
<p>Today I&#8217;ll talk a bit about page web redirection, also called redirect and how to use them properly to optimize your SEO (Search Engine Optimization)</p>
<p><span id="more-204"></span></p>
<p>It exists a lot of manner to redirect someone from a page to another.</p>
<p>Today, we&#8217;ll focus on what we call &#8220;HTTP Redirect&#8221;, based on HTTP header that are sent by the server to browser or search engine.</p>
<p>They are also plenty of way for doing HTTP redirect, but the 2 majors are usually called by their respective code:</p>
<ul>
<li>301 redirect (permanent)</li>
<li>302 redirect (temporary)</li>
</ul>
<p>When to use the 302 redirect and how about the 301 ?</p>
<p>The 302 redirects are in most cases, the default redirects you can find on any website.</p>
<p>Let&#8217;s say for example, I want to access on the admin page on this blog. This specific page require my browser to be logged as admin. So I go to the login page, hit my login and password and then, my browser receive a 302 redirect to the admin page and the page display properly because I have all the requirement to see it.</p>
<p>What happen if I call the &#8220;admin page&#8221; without being log, then in most cases, my browser also get a redirect but this time, to the login page to force me to login and get all the requirements before watching/editing the admin page.</p>
<p>Here is the great use of 302 redirect.</p>
<p>But how about 301 redirect, and why are they use?</p>
<p>It may happen, for various reasons, that you have to change the complete <a href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL</a> of your site.</p>
<p>The problem is: How to deal with search engine like Google that store in their index the old addresses ?</p>
<p>If you change straight away all the URLs on your site, this will generate probably generate lots of 404 error because of the old addresses in search engine index (who does not exists anymore) and you may loose all your site&#8217;s reference on Google.</p>
<p>That is exactly the moment to use 301 (alias permanent redirect). Instead of showing a <span style="text-decoration: line-through;">(bad)</span> nice 404 error, why dont you send a 301 redirect to the new address that holds the page?</p>
<p>Benefit for that is that you site&#8217;s pages wont loose their <a href="http://en.wikipedia.org/wiki/PageRank">page rank</a> on search engine, as well as teaching the search engine &#8220;hey dude, the page URL have change now and here is the new address&#8221;</p>
<p>I know it has been said a thousand of time in SEO tutorial, but I still see website who make 302 instead of 301. So I hope this article will help people improving their knowledge on the Internet referencing.</p>
<p>See you soon</p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/08/choosing-the-best-redirect-for-your-seo/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Using iptables to reject w00tw00t.at.ISC.SANS.DFind scanners</title>
		<link>http://pierre.linux.edu/2010/06/using-iptables-to-reject-w00tw00t-at-isc-sans-dfind-scanners/</link>
		<comments>http://pierre.linux.edu/2010/06/using-iptables-to-reject-w00tw00t-at-isc-sans-dfind-scanners/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 10:55:11 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=187</guid>
		<description><![CDATA[Hello people, I found recently in my apache log thousands of &#8220;w00tw00t.at.ISC.SANS.DFind&#8221; requests coming from all parts of the world. I&#8217;ve been searching for solutions to remove their hits because they consume resources on my servers and they doesn&#8217;t help when computing my visitors stats&#8230; 1) Apache mod_security There are many different way to remove [...]]]></description>
			<content:encoded><![CDATA[<p>Hello people,</p>
<p>I found recently in my apache log thousands of &#8220;<em>w00tw00t.at.ISC.SANS.DFind</em>&#8221; requests coming from all parts of the world.</p>
<p>I&#8217;ve been searching for solutions to remove their hits because they consume resources on my servers and they doesn&#8217;t help when computing my visitors stats&#8230;</p>
<p><span id="more-187"></span></p>
<h3>1) Apache mod_security</h3>
<p><a href="http://pierre.linux.edu/wp-content/uploads/2010/06/mod_sec.gif"><img class="size-full wp-image-188 alignleft" style="margin: 10px;" title="mod_sec" src="http://pierre.linux.edu/wp-content/uploads/2010/06/mod_sec.gif" alt="" width="116" height="95" /></a>There are many different way to remove those hits, 1st manner that I  found was to use &#8220;mod_security&#8221; with apache and create specific rules on  it.</p>
<p>The only problem, it force apache to filter every request and  it doesn&#8217;t look like (to me) a fast processing for my web server&#8230;</p>
<p>(If you have additional benchmark info on it, I&#8217;m interested)</p>
<h3>2) Fail2Ban</h3>
<p>Fail2Ban is a tool that watch your log periodically and create iptables rules to deny evil users connecting to your site.</p>
<p>The only problem with it, it bans the ip AFTER the woot.woot request was make.</p>
<h3>3) Iptables</h3>
<p><a href="http://www.netfilter.org/">Iptables </a>is a linux netfilter module that helps administrator creating software firewall.</p>
<p>It&#8217;s probably the most advanced firewall module of all times!</p>
<p>I found recently a parameter that allow filtering requests by checking / reading the packet&#8217;s content.</p>
<p>In our &#8220;w00tw00t.at.ISC.SANS.DFind&#8221; case, we want to make sure those request never succeed on our apache webserver.</p>
<p>Here is the command that I use to disallow them:</p>
<pre>root@server:~# iptables -I INPUT -p tcp --dport 80 -m string --to 70 --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP</pre>
<p>Basically, it will get 70 bytes of the packet and check that it doesn&#8217;t contain the HTTP request &#8220;GET /w00tw00t.at.ISC.SANS.&#8221;</p>
<p>The following command will display statistic on our iptables rules, so you can check that they are working properly.</p>
<pre>root@server:~# iptables -L INPUT -nvx
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts      bytes target     prot opt in     out     source               destination
 82     8249 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:80 STRING match "GET /w00tw00t.at.ISC.SANS." ALGO name bm TO 70</pre>
<p>Enjoy !</p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/06/using-iptables-to-reject-w00tw00t-at-isc-sans-dfind-scanners/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Firefox to customize your website</title>
		<link>http://pierre.linux.edu/2010/06/using-firefox-to-customize-your-website/</link>
		<comments>http://pierre.linux.edu/2010/06/using-firefox-to-customize-your-website/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 07:54:59 +0000</pubDate>
		<dc:creator>Pierre HENELLE</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://pierre.linux.edu/?p=177</guid>
		<description><![CDATA[Greeting all, Today I&#8217;ll talk about Firefox and various plug in you can install to customize or debug your website It became popular now-day to  have a website (eg, my personal blog). But what happen when something doesn&#8217;t work or doesn&#8217;t look like you would want? You have to determine what is wrong and how [...]]]></description>
			<content:encoded><![CDATA[<p>Greeting all,</p>
<p>Today I&#8217;ll talk about Firefox and various plug in you can install to customize or debug your website</p>
<p><span id="more-177"></span></p>
<p>It became popular now-day to  have a website (eg, my personal blog).</p>
<p>But what happen when something doesn&#8217;t work or doesn&#8217;t look like you would want? You have to determine what is wrong and how to solve it.</p>
<p>I&#8217;m using <a href="http://www.mozilla-europe.org">Firefox </a>web browser to make those tasks because it has thousands of free plug in which help developer creating and debugging their site.</p>
<ol>
<li>Firebug</li>
<li>Web developer</li>
</ol>
<h3>1) Firebug</h3>
<p>The 1st plug in you need to install is called <a href="https://addons.mozilla.org/fr/firefox/addon/1843/">firebug.</a> Firebug is a free debugging tools that allows you to change your CSS / HTML on the fly (without having to modify your page). You can also inspect specific elements (such as div, and their current CSS properties) and debug Javascript.</p>
<p><a href="http://pierre.linux.edu/wp-content/uploads/2010/06/firebug1.jpg"><img class="size-medium wp-image-178 alignleft" title="firebug1" src="http://pierre.linux.edu/wp-content/uploads/2010/06/firebug1-300x136.jpg" alt="" width="300" height="136" /></a><a href="http://pierre.linux.edu/wp-content/uploads/2010/06/firebug2.jpg"><img class="aligncenter size-medium wp-image-179" title="firebug2" src="http://pierre.linux.edu/wp-content/uploads/2010/06/firebug2-300x136.jpg" alt="" width="300" height="136" /></a></p>
<h3>2) Web developer</h3>
<p>The 2nd plug in you could install is <a href="https://addons.mozilla.org/fr/firefox/addon/60/">Web developer</a>. Web developer allows you  to disable specific aspect of your current navigation, like cookies or javascript, as well as seeing cookie values. When dealing with SEO and security, it&#8217;s quite important having control on those aspect and being sure everything works as it should be. Web developer also show CSS / Javascript errors and make W3C validation on your page.</p>
<p>Hope you enjoyed this post !</p>
]]></content:encoded>
			<wfw:commentRss>http://pierre.linux.edu/2010/06/using-firefox-to-customize-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

