<?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>Naeh.net &#187; Divers</title>
	<atom:link href="http://naeh.net/categorie/divers/feed/" rel="self" type="application/rss+xml" />
	<link>http://naeh.net</link>
	<description>Le mémo du développeur</description>
	<lastBuildDate>Sun, 07 Aug 2011 20:29:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>installer memcached sous debian lenny</title>
		<link>http://naeh.net/installer-memcached-sous-debian-lenny/</link>
		<comments>http://naeh.net/installer-memcached-sous-debian-lenny/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 13:40:59 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=198</guid>
		<description><![CDATA[avec ce post nous allons voir la procédure pour installer memcache sur une debian lenny afin de l'utiliser avec php. Pour commencer installer memcached : apt-get install memcached ensuite, installer l'extension php pecl install memcache si l'installation échoue avec le message suivant : downloading memcache-2.2.6.tgz ... Starting to download memcache-2.2.6.tgz &#40;35,957 bytes&#41; ..........done: 35,957 bytes [...]]]></description>
			<content:encoded><![CDATA[<p>avec ce post nous allons voir la procédure pour installer memcache sur une debian lenny afin de l'utiliser avec php.</p>
<p>Pour commencer installer memcached :</p>

<div class="wp_codebox"><table><tr id="p1988"><td class="code" id="p198code8"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> memcached</pre></td></tr></table></div>

<p>ensuite, installer l'extension php</p>

<div class="wp_codebox"><table><tr id="p1989"><td class="code" id="p198code9"><pre class="bash" style="font-family:monospace;">pecl <span style="color: #c20cb9; font-weight: bold;">install</span> memcache</pre></td></tr></table></div>

<p>si l'installation échoue avec le message suivant :</p>

<div class="wp_codebox"><table><tr id="p19810"><td class="code" id="p198code10"><pre class="bash" style="font-family:monospace;">downloading memcache-2.2.6.tgz ...
Starting to download memcache-2.2.6.tgz <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">35</span>,<span style="color: #000000;">957</span> bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span>
..........done: <span style="color: #000000;">35</span>,<span style="color: #000000;">957</span> bytes
<span style="color: #000000;">11</span> <span style="color: #7a0874; font-weight: bold;">source</span> files, building
running: phpize
<span style="color: #c20cb9; font-weight: bold;">sh</span>: phpize: <span style="color: #7a0874; font-weight: bold;">command</span> not found
ERROR: <span style="color: #000000; font-weight: bold;">`</span>phpize<span style="color: #ff0000;">' failed</span></pre></td></tr></table></div>

<p>Allez faire un tour ici : <a href="http://naeh.net/installation-fileinfo/" title="Installation de fileinfo" target="_blank">Installation de fileinfo</a> on a déjà rencontré ce problème <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Pour rappel, il faut faire un simple :</p>

<div class="wp_codebox"><table><tr id="p19811"><td class="code" id="p198code11"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-dev
et retenter le :
pecl <span style="color: #c20cb9; font-weight: bold;">install</span> memcache</pre></td></tr></table></div>

<p>il va surement vous poser une question, appuyez sur « entrée »</p>
<p>maintenant que memcache est correctement installer il faut l'activer en créant un fichier memcached.ini dans le dossier conf.d utilisé par le serveur (dans mon cas pour apache c'est : /etc/php5/apache2/conf.d) pour lighttpd par exemple c'est /etc/php5/cgi/conf.d) (cela évite de modifier les php.ini)<br />
memcached.ini doit contenir :</p>

<div class="wp_codebox"><table><tr id="p19812"><td class="code" id="p198code12"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">extension</span>=memcache.so</pre></td></tr></table></div>

<p>pour s'assurer que l'extension est bien installée, créer un fichier php contenant :</p>

<div class="wp_codebox"><table><tr id="p19813"><td class="code" id="p198code13"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/phpinfo"><span style="color: #990000;">phpinfo</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>et aller voir dedans, normalement vous devriez voir l'extension activée.</p>
<p><img src="http://naeh.net/wp-content/uploads/2011/07/memecache-300x171.gif" alt="phpinfo memecache" title="phpinfo memecache" width="300" height="171" class="aligncenter size-medium wp-image-203" /></p>
<p>pour l'utilisation, rien de bien méchant, la doc php (http://php.net/manual/fr/book.memcache.php) est très bien faite <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>petit bonus :</strong><br />
pour vérifier que le service est bien lancé, faite :</p>

<div class="wp_codebox"><table><tr id="p19814"><td class="code" id="p198code14"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-latupen</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> memcached
résultat :
tcp        <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span> 127.0.0.1:<span style="color: #000000;">11211</span>         0.0.0.0:<span style="color: #000000; font-weight: bold;">*</span>               LISTEN      <span style="color: #000000;">0</span>          <span style="color: #000000;">157533</span>      <span style="color: #000000;">5952</span><span style="color: #000000; font-weight: bold;">/</span>memcached</pre></td></tr></table></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Finstaller-memcached-sous-debian-lenny%2F&amp;title=installer%20memcached%20sous%20debian%20lenny" id="wpa2a_2"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/installer-memcached-sous-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lancement de www.snippets.fr</title>
		<link>http://naeh.net/lancement-de-www-snippets-fr/</link>
		<comments>http://naeh.net/lancement-de-www-snippets-fr/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 21:15:18 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Programmation]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=191</guid>
		<description><![CDATA[j'ai le plaisir de vous annoncer le lancement d'un nouveau site, http://www.snippets.fr. comme son nom l'indique, ce site est là pour regrouper des snippets dans différents langages (php seulement pour l'instant) et sur des tehcno que j'utilise au quotidien (Drupal, Magento, WordPress, etc.) dans le boulot mais aussi pour mes projets perso. si vous avez [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://naeh.net/wp-content/uploads/2011/01/Capture.jpg"><img src="http://naeh.net/wp-content/uploads/2011/01/Capture-300x119.jpg" alt="" title="snippets.fr" width="300" height="119" class="aligncenter size-medium wp-image-192" /></a></p>
<p>j'ai le plaisir de vous annoncer le lancement d'un nouveau site, <a href="http://www.snippets.fr">http://www.snippets.fr</a>.</p>
<p>comme son nom l'indique, ce site est là pour regrouper des snippets dans différents langages (php seulement pour l'instant) et sur des tehcno que j'utilise au quotidien (Drupal, Magento, WordPress, etc.) dans le boulot mais aussi pour mes projets perso.</p>
<p>si vous avez des snippets qui trainent, vous savez où les contribuer maintenant <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Bon surf.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Flancement-de-www-snippets-fr%2F&amp;title=Lancement%20de%20www.snippets.fr" id="wpa2a_4"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/lancement-de-www-snippets-fr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aide et Astuces Windows 7</title>
		<link>http://naeh.net/aide-et-astuces-windows-7/</link>
		<comments>http://naeh.net/aide-et-astuces-windows-7/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 16:56:15 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows - OS]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=185</guid>
		<description><![CDATA[Voici un court billet pour afin de partager un article fort intéressant (à mon goût :p) montrant quelques astuces qui pourraient se révéler très utiles pour l'utilisation de vos windows 7 de tous les jours, surtout maintenant que cet OS commence à se généraliser... Voici le lien : Aide et Astuces Windows 7 Bonne lecture.]]></description>
			<content:encoded><![CDATA[<p>Voici un court billet pour afin de partager un article fort intéressant (à mon goût :p) montrant quelques astuces qui pourraient se révéler très utiles pour l'utilisation de vos windows 7 de tous les jours, surtout maintenant que cet OS commence à se généraliser...</p>
<p>Voici le lien : <a target="_blank" href="http://www.logiciel.net/aide-et-astuces-windows-7-6849.htm">Aide et Astuces Windows 7</a></p>
<p>Bonne lecture.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Faide-et-astuces-windows-7%2F&amp;title=Aide%20et%20Astuces%20Windows%207" id="wpa2a_6"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/aide-et-astuces-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nouvelle version, nouvelle robe</title>
		<link>http://naeh.net/nouvelle-version-nouvelle-robe/</link>
		<comments>http://naeh.net/nouvelle-version-nouvelle-robe/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 15:24:34 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=134</guid>
		<description><![CDATA[Je viens de mettre à jour wordpress a sa dernière version (depuis le temps que je voulais le faire) et j'en ai profité pour changer de thème, ça change complètent du précédent, j'espère qu'il n y aura pas beaucoup de bugs, si vous en voyez, merci de les signaler en commentaires à ce billet. Bon [...]]]></description>
			<content:encoded><![CDATA[<p>Je viens de mettre à jour wordpress a sa dernière version (depuis le temps que je voulais le faire) et j'en ai profité pour changer de thème, ça change complètent du précédent, j'espère qu'il n y aura pas beaucoup de bugs, si vous en voyez, merci de les signaler en commentaires à ce billet.</p>
<p>Bon surf sur naeh.net, le mémo du développeur <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Fnouvelle-version-nouvelle-robe%2F&amp;title=Nouvelle%20version%2C%20nouvelle%20robe" id="wpa2a_8"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/nouvelle-version-nouvelle-robe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>La dure vie du développeur web</title>
		<link>http://naeh.net/la-dure-vie-du-developpeur-web/</link>
		<comments>http://naeh.net/la-dure-vie-du-developpeur-web/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 21:51:56 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=126</guid>
		<description><![CDATA[une excellente parodie en l'honneur des développeurs web, dont je fais fièrement partie le site e-commerce à 400€ c'est trop fort]]></description>
			<content:encoded><![CDATA[<p>une excellente parodie en l'honneur des développeurs web, dont je fais fièrement partie <img src='http://naeh.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><center><object width="480" height="275"><param name="movie" value="http://www.dailymotion.com/swf/xbfjlq&#038;related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/xbfjlq&#038;related=0" type="application/x-shockwave-flash" width="480" height="275" allowfullscreen="true" allowscriptaccess="always"></embed></object></center></p>
<p>le site e-commerce à 400€ c'est trop fort <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Fla-dure-vie-du-developpeur-web%2F&amp;title=La%20dure%20vie%20du%20d%C3%A9veloppeur%20web" id="wpa2a_10"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/la-dure-vie-du-developpeur-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>protéger un ou plusieurs fichiers par htaccess</title>
		<link>http://naeh.net/proteger-un-ou-plusieurs-fichiers-par-htaccess/</link>
		<comments>http://naeh.net/proteger-un-ou-plusieurs-fichiers-par-htaccess/#comments</comments>
		<pubDate>Fri, 08 May 2009 16:46:23 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=95</guid>
		<description><![CDATA[Nous avons vu dans précédent article comment protéger un répertoire avec htaccess, c'est l'utilisation la plus courante de cette technique, mais ici nous allons nous intéresser a comment faire la même chose mais pour protéger uniquement un ou quelques fichiers d'un répertoire, c'est à dire, dans le même répertoire, certains fichiers seront protégés mais pas [...]]]></description>
			<content:encoded><![CDATA[<p>Nous avons vu dans <a href="http://naeh.net/proteger-un-repertoire-par-un-htaccess/">précédent article</a> comment protéger un répertoire avec htaccess, c'est l'utilisation la plus courante de cette technique, mais ici nous allons nous intéresser a comment faire la même chose mais pour protéger uniquement un ou quelques fichiers d'un répertoire, c'est à dire, dans le même répertoire, certains fichiers seront protégés mais pas d'autres.</p>
<p>pour protéger un seul fichier voici ce qu'il faut mettre dans le .htaccess :</p>

<div class="wp_codebox"><table><tr id="p9517"><td class="code" id="p95code17"><pre class="html" style="font-family:monospace;">&lt;files fichier.ext&gt;
require valid-user
&lt;/files&gt;</pre></td></tr></table></div>

<p>pour en protéger plusieurs :</p>

<div class="wp_codebox"><table><tr id="p9518"><td class="code" id="p95code18"><pre class="html" style="font-family:monospace;">&lt;files fichier1.ext fichier2.ext fichier3.ext&gt;
require valid-user
&lt;/files&gt;</pre></td></tr></table></div>

<p>cette syntaxe est a utiliser en complément de celle expliquée dans <a href="http://naeh.net/proteger-un-repertoire-par-un-htaccess">l'autre article</a> bien sûr.</p>
<p>bonne protection de fichiers...</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Fproteger-un-ou-plusieurs-fichiers-par-htaccess%2F&amp;title=prot%C3%A9ger%20un%20ou%20plusieurs%20fichiers%20par%20htaccess" id="wpa2a_12"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/proteger-un-ou-plusieurs-fichiers-par-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd vs Apache vs Lighttpd + Apache</title>
		<link>http://naeh.net/lighttpd-vs-apache-vs-lighttpd-apache/</link>
		<comments>http://naeh.net/lighttpd-vs-apache-vs-lighttpd-apache/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 21:37:46 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=85</guid>
		<description><![CDATA[Il fut un temps où on ne se posait pas de question quant au serveur web, on prend Apache et on en parle plus, aujourd'hui les choses ont changé, Apache reste quand même le plus utilisé avec plus de 66% des parts de marché, suivi par IIS, puis tous les autres "petits" derrière, néanmoins en [...]]]></description>
			<content:encoded><![CDATA[<p>Il fut un temps où on ne se posait pas de question quant au serveur web, on prend Apache et on en parle plus, aujourd'hui les choses ont changé, Apache reste quand même le plus utilisé avec plus de 66% des parts de marché, suivi par IIS, puis tous les autres "petits" derrière, néanmoins en fonction des besoins, certains de ces petits peuvent s'avérer bien plus performants qu'Apache, aujourd'hui on va tester 3 configurations possibles avec Apache et Lighttpd.</p>
<p>d'après ce qu'on peut lire un peu partout sur le net, Lighttpd (lighty pour les intimes) est beaucoup plus performant quand il s'agit de servir des pages statiques, mais qu'en est-il vraiment ? et comment s'en sort-il avec le contenu dynamique ? (des sites statiques ça n'existe plus de nos jours ^^).</p>
<p>pour notre test, on va prendre un site très léger, basé sur Zend framework (donc loin d'être statique), contenant une page qui affiche 9 images au hasard a partir d'une tables mysql contenant environ 1000 enregistrements (seulement les emplacement des images sont stockés dans la base). Le serveur de test est un kimsufi L (petit processeur et 1Go de RAM).</p>
<p><strong>versions utilisées : </strong><br />
<a href="http://www.apache.org/" target="_blank">Apache 2.2.9</a><br />
<a href="http://www.lighttpd.net/" target="_blank">Lighttpd 1.4.19</a><br />
<a href="http://fr.php.net/" target="_blank">PHP 5.2.6</a></p>
<p>pour les tests on utilise <a href="http://packages.debian.org/fr/sid/siege" target="_blank">siege</a>, on lance donc un siege avec 100 concurrency sur 10 minutes, voici la commande :</p>

<div class="wp_codebox"><table><tr id="p8524"><td class="code" id="p85code24"><pre class="bash" style="font-family:monospace;">siege <span style="color: #660033;">-c100</span> <span style="color: #660033;">-t10M</span> URL_DU_SITE</pre></td></tr></table></div>

<p>on note également le Load average de la machine a la fin de l'opération.</p>
<h2>1ère configuration : Lighttpd tout seul</h2>
<p>voici le resultat :</p>

<div class="wp_codebox"><table><tr id="p8525"><td class="code" id="p85code25"><pre class="bash" style="font-family:monospace;">Load average : <span style="color: #000000;">4.87</span>
&nbsp;
Lifting the server siege...      done.
Transactions:		       <span style="color: #000000;">23859</span> hits
Availability:		      <span style="color: #000000;">100.00</span> <span style="color: #000000; font-weight: bold;">%</span>
Elapsed <span style="color: #000000; font-weight: bold;">time</span>:		      <span style="color: #000000;">600.37</span> secs
Data transferred:	       <span style="color: #000000;">83.25</span> MB
Response <span style="color: #000000; font-weight: bold;">time</span>:		        <span style="color: #000000;">2.02</span> secs
Transaction rate:	       <span style="color: #000000;">39.74</span> trans<span style="color: #000000; font-weight: bold;">/</span>sec
Throughput:		        <span style="color: #000000;">0.14</span> MB<span style="color: #000000; font-weight: bold;">/</span>sec
Concurrency:		       <span style="color: #000000;">80.21</span>
Successful transactions:       <span style="color: #000000;">23859</span>
Failed transactions:	           <span style="color: #000000;">0</span>
Longest transaction:	        <span style="color: #000000;">5.20</span>
Shortest transaction:	        <span style="color: #000000;">0.10</span></pre></td></tr></table></div>

<h2>2ème configuration : Apache2 tout seul</h2>
<p>le résultat :</p>

<div class="wp_codebox"><table><tr id="p8526"><td class="code" id="p85code26"><pre class="bash" style="font-family:monospace;">Load average : <span style="color: #000000;">77.51</span>
&nbsp;
Lifting the server siege...      done.
Transactions:		       <span style="color: #000000;">23543</span> hits
Availability:		      <span style="color: #000000;">100.00</span> <span style="color: #000000; font-weight: bold;">%</span>
Elapsed <span style="color: #000000; font-weight: bold;">time</span>:		      <span style="color: #000000;">599.66</span> secs
Data transferred:	       <span style="color: #000000;">82.16</span> MB
Response <span style="color: #000000; font-weight: bold;">time</span>:		        <span style="color: #000000;">2.04</span> secs
Transaction rate:	       <span style="color: #000000;">39.26</span> trans<span style="color: #000000; font-weight: bold;">/</span>sec
Throughput:		        <span style="color: #000000;">0.14</span> MB<span style="color: #000000; font-weight: bold;">/</span>sec
Concurrency:		       <span style="color: #000000;">80.22</span>
Successful transactions:       <span style="color: #000000;">23543</span>
Failed transactions:	           <span style="color: #000000;">0</span>
Longest transaction:	       <span style="color: #000000;">10.51</span>
Shortest transaction:	        <span style="color: #000000;">0.05</span></pre></td></tr></table></div>

<h2>3ème configuration : Lighttpd + Apache</h2>
<p>maintenant faisons le test en couplant les 2, dans cette configuration tout ce qui est statique (images, css, js, etc.) sera servi par lighty alors que les scripts php eux, seront traités par apache, pour cela on active le mod_proxy dans lighty, et on ajoute le code suivant dans le vhost de notre site :</p>

<div class="wp_codebox"><table><tr id="p8527"><td class="code" id="p85code27"><pre class="bash" style="font-family:monospace;"> <span style="color: #007800;">$HTTP</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">&quot;url&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">!</span>~ <span style="color: #ff0000;">&quot;\.(js|css|gif|jpg|png|ico|txt|swf|html|htm)$&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
               proxy.server  = <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #ff0000;">&quot;&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>
                               <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #ff0000;">&quot;host&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;127.0.0.1&quot;</span>, <span style="color: #ff0000;">&quot;port&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000;">8080</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
                       <span style="color: #7a0874; font-weight: bold;">&#41;</span>
               <span style="color: #7a0874; font-weight: bold;">&#41;</span>
       <span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>vous l'aurez compris, Apache écoute sur le port 8080 (c'est fait en changeant le fichier /etc/apache2/ports.conf).</p>
<p>voici le résultat :</p>

<div class="wp_codebox"><table><tr id="p8528"><td class="code" id="p85code28"><pre class="bash" style="font-family:monospace;">Load average : <span style="color: #000000;">14.79</span>
&nbsp;
Lifting the server siege...      done.
Transactions:		       <span style="color: #000000;">22684</span> hits
Availability:		      <span style="color: #000000;">100.00</span> <span style="color: #000000; font-weight: bold;">%</span>
Elapsed <span style="color: #000000; font-weight: bold;">time</span>:		      <span style="color: #000000;">600.25</span> secs
Data transferred:	       <span style="color: #000000;">79.10</span> MB
Response <span style="color: #000000; font-weight: bold;">time</span>:		        <span style="color: #000000;">2.13</span> secs
Transaction rate:	       <span style="color: #000000;">37.79</span> trans<span style="color: #000000; font-weight: bold;">/</span>sec
Throughput:		        <span style="color: #000000;">0.13</span> MB<span style="color: #000000; font-weight: bold;">/</span>sec
Concurrency:		       <span style="color: #000000;">80.53</span>
Successful transactions:       <span style="color: #000000;">22684</span>
Failed transactions:	           <span style="color: #000000;">0</span>
Longest transaction:	        <span style="color: #000000;">8.61</span>
Shortest transaction:	        <span style="color: #000000;">0.07</span></pre></td></tr></table></div>

<p>plutôt surprenant !</p>
<h2>Conclusion :</h2>
<p>Lighty s'en sort très bien au vu des transactions/s (ou le nombre total de transactions traitées), contrairement a ce qu'on pouvait attendre, coupler les 2 nous fait perdre en performances (on enregistre quand même un load average nettement inférieur a la config d'apache tout seul).</p>
<p>personnellement ce que je retiens, c'est que lighty n'est pas si mauvais que ça pour le contenu dynamique, les performances restent quand très proches dans les 3 cas, donc autant utiliser la solution qui nous plait <img src='http://naeh.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Flighttpd-vs-apache-vs-lighttpd-apache%2F&amp;title=Lighttpd%20vs%20Apache%20vs%20Lighttpd%20%2B%20Apache" id="wpa2a_14"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/lighttpd-vs-apache-vs-lighttpd-apache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Masked Input Plugin</title>
		<link>http://naeh.net/masked-input-plugin/</link>
		<comments>http://naeh.net/masked-input-plugin/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 14:00:55 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=72</guid>
		<description><![CDATA[Ou comment permettre à un utilisateur se saisir plus facilement dans un formulaire des données a longueur fixe, ou de format spécifique (dates, numéros de téléphone, etc.) sans se préoccuper du formatage. C'est un plugin pour jQuery, il a été testé sur Internet Explorer 6 / 7, Firefox 1.5/2/3, Safari, Opera et Chrome. Son fonctionnement [...]]]></description>
			<content:encoded><![CDATA[<p>Ou comment permettre à un utilisateur se saisir plus facilement dans un formulaire des données a longueur fixe, ou de format spécifique (dates, numéros de téléphone, etc.) sans se préoccuper du formatage.</p>
<p>C'est un plugin pour jQuery, il a été testé sur Internet Explorer 6 / 7, Firefox 1.5/2/3, Safari, Opera et Chrome.</p>
<p><strong>Son fonctionnement :</strong><br />
on va prendre un champ date au format <strong>dd/mm/YYYY</strong> pour l'exemple :</p>
<p>quand le champ du formulaire reçoit le focus, le plugin va automatiquement pré-remplir le champ avec "<strong>__/__/____</strong>" et votre saisie va automatiquement remplacer la chaine par défaut, ainsi pour une date vous n'aurez pas a saisir les / juste les information de la date, ce qui est quand même pas mal pour l'utilisateur final.</p>
<p>vous trouverez plus d'exemples sur cette page : <a href="http://digitalbush.com/projects/masked-input-plugin/">Masked Input Plugin</a></p>
<p>l'onglet "usage" vous sera de grande utilité pour la partie implémentation et utilisation.</p>
<p>voici une vidéo pour illustrer quelques exemples :<br />
<center><br />
<object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/BMaTiGKykl8&#038;hl=fr&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BMaTiGKykl8&#038;hl=fr&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></center></p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Fmasked-input-plugin%2F&amp;title=Masked%20Input%20Plugin" id="wpa2a_16"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/masked-input-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 8</title>
		<link>http://naeh.net/internet-explorer-8/</link>
		<comments>http://naeh.net/internet-explorer-8/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 12:19:19 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Windows - Logiciels]]></category>
		<category><![CDATA[internet explorer 8]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=66</guid>
		<description><![CDATA[IE 8 a été annoncé en version finale lors du MIX09 de Microsoft qui s'est déroulé du 19 au 20 mars à Las vegas. Tout le monde peut le télécharger depuis le 19 mars. Du coté des développeurs cette version est très attendue, surtout après une version 7 un peu décevante... Donc qu'en est-il avec [...]]]></description>
			<content:encoded><![CDATA[<p>IE 8 a été annoncé en version finale lors du <a href="http://live.visitmix.com/" target="_blank">MIX09</a> de Microsoft qui s'est déroulé du 19 au 20 mars à Las vegas. Tout le monde peut le télécharger depuis le 19 mars.</p>
<p>Du coté des développeurs cette version est très attendue, surtout après une version 7 un peu décevante... Donc qu'en est-il avec cette nouvelle version ?</p>
<p>Chez nous les développeurs, la règle d'or est : "on ne réinvente pas la roue !", du coup au lieux de vous faire un article en 30 pages, je vais juste relayer un super article fait par <a href="http://www.alsacreations.com">Alsacréations</a> avec toutes les nouveautés d'IE8, tout ce qu'il supporte, ne supporte pas, etc. en résumé : <a href="http://www.alsacreations.com/actu/lire/680-telecharger-internet-explorer-8.html">un article complet sur IE8</a>, bonne lecture...</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Finternet-explorer-8%2F&amp;title=Internet%20Explorer%208" id="wpa2a_18"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/internet-explorer-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Partager un répertoire Windows avec VirtualBox</title>
		<link>http://naeh.net/partager-un-repertoire-windows-avec-virtualbox/</link>
		<comments>http://naeh.net/partager-un-repertoire-windows-avec-virtualbox/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 19:03:03 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows - Logiciels]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[partage]]></category>
		<category><![CDATA[virtualBox]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=59</guid>
		<description><![CDATA[Dans cet article nous allons voir comment partager, facilement, un répertoire Windows avec une machine virtuelle sous VirtualBox. Tout d'abord, précisions l'environnement : Il s'agit d'un système Hôte sous Windows XP, nous installons dessus le logiciel VirtualBox, et dans ce dernier nous créons une machine virtuelle tournant sous Linux (Systême guest). Pour commencer il faut [...]]]></description>
			<content:encoded><![CDATA[<p>Dans cet article nous allons voir comment partager, facilement, un répertoire Windows avec une machine virtuelle sous VirtualBox.</p>
<p>Tout d'abord, précisions l'environnement :<br />
Il s'agit d'un système Hôte sous Windows XP, nous installons dessus le logiciel VirtualBox, et dans ce dernier nous créons une machine virtuelle tournant sous Linux (Systême guest).</p>
<p>Pour commencer il faut installer les additions client pour notre VirtualBox, pour cela je vous renvoie à notre article : <a href="http://naeh.net/additions-client-pour-virtualbox/">Additions client pour VirtualBox</a>.</p>
<p>Une fois les additions client installées, procédons comme suit :</p>
<ol>
<li>Sélectionner la machine virtuelle est cliquez sur "<strong>Répertoires Partagés</strong>"</li>
<li>Cliquez sur le "<strong>+</strong>" (PLUS) a droite de la fenêtre qui s'ouvre et sélectionner un répertoire à partager, vous pouvez lui donner un nom</li>
<li>Valider et démarrez votre machine virtuelle</li>
</ol>
<p>Maintenant, nous allons voir comment monter le partage du coté de notre système guest (Linux), pour cela, exécutez la commande suivante :</p>

<div class="wp_codebox"><table><tr id="p5931"><td class="code" id="p59code31"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> vboxsf NOM_PARTAGE POINT_MONTAGE</pre></td></tr></table></div>

<p>où :<br />
NOM_PARTAGE est le nom que vous avez donné à votre répertoire partagé lors de sa sélection.<br />
POINT_MONTAGE est le point (répertoire, ou encore emplacement) dans la machine virtuelle dans lequel vous voulez monter le répertoire.</p>
<p>voici un exemple avec un partage nommé Downloads :</p>

<div class="wp_codebox"><table><tr id="p5932"><td class="code" id="p59code32"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> vboxsf Downloads <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>downloads</pre></td></tr></table></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnaeh.net%2Fpartager-un-repertoire-windows-avec-virtualbox%2F&amp;title=Partager%20un%20r%C3%A9pertoire%20Windows%20avec%20VirtualBox" id="wpa2a_20"><img src="http://naeh.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://naeh.net/partager-un-repertoire-windows-avec-virtualbox/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
	</channel>
</rss>

