<?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>Renoir Boulanger &#187; howto</title>
	<atom:link href="http://renoirboulanger.com/blog/tag/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://renoirboulanger.com</link>
	<description>Un geek social et Linuxien de nature</description>
	<lastBuildDate>Sun, 29 Apr 2012 20:29:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Comment remplacer les caract√®res bizzares dans WordPress lorsqu&#8217;on a mal fait la conversion</title>
		<link>http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/</link>
		<comments>http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 01:07:40 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[Techniques]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sc]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=2232</guid>
		<description><![CDATA[Comment remplacer les caract√®res bizzares dans WordPress lorsqu&#8217;on a mal fait la conversionAccrocheur mon titre n&#8217;est-ce pas? Je trouve ça tellement pas drôle lorsque ça m&#8217;arrive ce genre de situation avec les caractères accentués. Le problème n&#8217;arrive pas tout le temps qu&#8217;avec WordPress. 
Voici, enfin, une suite a mon billet Pourquoi tout ces caractères bizzares. [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/' class='retweet '  style='display:block;margin:10px 0px;' >Comment remplacer les caract√®res bizzares dans WordPress lorsqu&#8217;on a mal fait la conversion</a><p>Accrocheur mon titre n&#8217;est-ce pas? Je trouve ça tellement pas drôle lorsque ça m&#8217;arrive ce genre de situation avec les caractères accentués. Le problème n&#8217;arrive pas tout le temps qu&#8217;avec WordPress. </p>
<p>Voici, enfin, une suite a mon billet <a href="http://renoirboulanger.com/blog/2009/09/pourquoi-tout-ces-caracteres-bizzares/">Pourquoi tout ces caractères bizzares</a>.  Je devais travailler sur un problème de conversion de caractères pour un client dus a une conversion non réussie et/ou terminée entre <tt>latin1</tt> et <tt>utf-8</tt> puis je me suis remis a penser a ce problème. Pourquoi ne pas le régler, et documenter! </p>
<p>Voilà pourquoi ce billet <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>La situation</h3>
<p>Mon cas était bien simple. J&#8217;avait mal fait ma sauvegarde lors d&#8217;un transfert et j&#8217;avait tout mes commentaires, billets, et autres données qui avait des accents &#8220;<tt>transform√©s comme √áa</tt>&#8221; (transformés comme ça).</p>
<p>Ce genre de problème arrive pour toutes sortes de raisons. Mais le symptôme est le même. Si vous avez des<br />
Je partage avec vous mon bout de code a «copier-coller» dans <tt>phpmyadmin</tt> pour votre blogue WordPress si vous avez ces problèmes (oubliez-pas de faire des sauvegardes là(!)).</p>
<p>Plusieurs tutoriels existent pour régler la situation mais mon cas était assez unique. J&#8217;ai conservé le problème puis j&#8217;ai publié plusieurs billets (qui sortent bien) et laissé ceux &#8220;<tt>ab√Æm√©s</tt>&#8221; là. <strong>Il n&#8217;était plus question d&#8217;extraire, convertir et ré-importer</strong>.</p>
<h3>Pourquoi?!</h3>
<p>C&#8217;est une réponse assez complexe. L&#8217;article <a href="http://tikiwiki.org/UTF-8"><strong>UTF-8</strong> sur TikiWiki.org</a> l&#8217;explique en détail.</p>
<blockquote><p>In short, UTF-8 is a character encoding that uses 1 to 3 bytes for each character.<br />
It is one of the existing character encodings of the UCS (Universal Character Set), that contains nearly a hundred thousand abstract characters (including ASCII characters).</p>
<p>UTF-8 greatly simplifies the task of internationalization by replacing multiple alternative encodings (such as ISO8859-15 Latin-9, which encodes those English, French, German, Spanish and Portuguese characters not available in ASCII).</p></blockquote>
<p>En simple, le UTF-8 est un format d&#8217;encodage qui utilise 1 a 3 bytes pour chaque caractère. C&#8217;est un format d&#8217;encodage qui comprend près de plusieurs centaines de milliers de caractères (Incluant ceux du ASCII).</p>
<p>UTF-8 est fait pour contenir tout les caractères existants pour simplifier l&#8217;internationalisation. </p>
<p>C&#8217;est un standard qui est pas nécessairement jeune mais qui n&#8217;était pas non plus supporté partout.</p>
<p>MySQL a commencé a le supporter qu&#8217;a partir de la version 4.1.</p>
<p>Ce qui arrive c&#8217;est qu&#8217;avec le temps, les gens prennent de plus en plus soin de rendre accessible pour toutes les langues leur applications. Ainsi un russe pourrait écrire en cyrillic et un Japonais en Kanji dans la même base de donnée. Le coup est difficile! Surtout que les versions de MySQL et PHP et Java offrent maintenant le choix par défaut en UTF-8&#8230; lorsqu&#8217;on fait pas attention: on se fait coincer!</p>
<p><span id="more-2232"></span></p>
<h3>Comment j&#8217;ai opéré</h3>
<p>Comme il n&#8217;y a pas que WordPress qui peut avoir ce type de problème j&#8217;ai fait un petit script qui génère pour chaque table et colone affectée. J&#8217;ai passé dans chaque table et colone où je voyait des choses bizzares et j&#8217;ai représenté dans un array a deux dimensions. Avec cette méthode on peut faire la même chose avec n&#8217;importequel schéma de base de donnée.</p>
<h4>Exemple: Représenter les tables et les colones</h4>
<p>Avec ce format, en exemple, j&#8217;ai représenté les tables (<tt>wp_posts</tt>, etc&#8230;) et chaque array représente une colone où des caractères accentués sont mal convertis.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$tables</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'wp_posts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_content'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_title'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_excerpt'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_usermeta'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'meta_value'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_term_taxonomy'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_comments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_content'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Utiliser le script</h3>
<p>Le script a été utilisé pratiquement tel quel sur ma base de donnée WordPress de ce site. </p>
<p>Seuls ajustements a faire. </p>
<ul>
<li>Remplacer les &#8220;&lt;&nbsp;pre&nbsp;&gt;&#8221; par &#8220;&lt;pre&gt;&#8221;. Vous comprenez le principe <img src='http://renoirboulanger.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Afficher le contenu généré via un serveur Web avec PHP installé</li>
<li>Aller dans <tt>phpmyadmin</tt>, <strong>faire une copie de la base de donnée à affecter</strong> (Voir dans onglet &#8220;<tt>Opérations</tt>&#8221; et &#8220;<tt>Copier la base de données vers:  </tt>&#8220;)</li>
<li>Aller dans cette base de donnée là dans phpmyadmin (!!)</li>
<li>Exécuter le code généré (copier-coller) dans la fenêtre <tt>SQL</tt> de la base de donnée de tests</li>
<li>Faire pareil avec la vraie si vous êtes satisfaits du résultat</li>
</ul>
<h4>Le code</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type:text/html;charset=utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$tables</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'wp_posts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_content'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_title'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'post_excerpt'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_usermeta'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'meta_value'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_term_taxonomy'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">,</span><span style="color: #0000ff;">'wp_comments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_content'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$chars</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√Ä'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|À'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√¥'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ô'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√Ç'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|â'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√á'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ç'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√©'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|é'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√â'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|É'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√†'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|à'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√®'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|è'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√™'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ê'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√¢'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|â'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'‚Äô'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|‘'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'¬´'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|«'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'¬ª'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|»'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√ß'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ç'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√π'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|ù'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√ª'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|û'</span><span style="color: #339933;">,</span>
 <span style="color: #990000;">bin2hex</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'√Æ'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'|î'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tables</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$table</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$elements</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$elements</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$col</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chars</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$elc</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|'</span><span style="color: #339933;">,</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$update_line</span><span style="color: #339933;">.=</span> <span style="color: #0000ff;">'update '</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' set '</span><span style="color: #339933;">.</span><span style="color: #000088;">$col</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' = REPLACE('</span><span style="color: #339933;">.</span><span style="color: #000088;">$col</span><span style="color: #339933;">.</span><span style="color: #0000ff;">', UNHEX(\''</span><span style="color: #339933;">.</span><span style="color: #000088;">$elc</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'\'), \''</span><span style="color: #339933;">.</span><span style="color: #000088;">$elc</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'\') ;'</span><span style="color: #339933;">.</span>PHP_EOL<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt; pre &gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$update_line</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt; / pre &gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/06/comment-remplacer-les-caracteres-bizzares-dans-wordpress-lorsqu-on-a-mal-fait-la-conversion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installer PHP 5.3.1 sous Debian et/ou Ubuntu via un repository non officiel</title>
		<link>http://renoirboulanger.com/blog/2010/01/installer-php-5-3-1-sous-debian-et-ubuntu-via-un-repository-non-officiel/</link>
		<comments>http://renoirboulanger.com/blog/2010/01/installer-php-5-3-1-sous-debian-et-ubuntu-via-un-repository-non-officiel/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 04:53:33 +0000</pubDate>
		<dc:creator>Renoir Boulanger</dc:creator>
				<category><![CDATA[GeekNight]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://renoirboulanger.com/?p=1718</guid>
		<description><![CDATA[Installer PHP 5.3.1 sous Debian et/ou Ubuntu via un repository non officielJ&#8217;était, hier, en train de jouer avec des appels SOAP pour préparer un projet et j&#8217;ai réalisé que ma version compilée de php 5.3.0 était défectueuse. 

Je dis que mon installation est défectueuse car lorsque j&#8217;instantiait $client = new Zend_Soap_Client; plus rien ne répondait. [...]]]></description>
			<content:encoded><![CDATA[<a href='http://renoirboulanger.com/blog/2010/01/installer-php-5-3-1-sous-debian-et-ubuntu-via-un-repository-non-officiel/' class='retweet '  style='display:block;margin:10px 0px;' >Installer PHP 5.3.1 sous Debian et/ou Ubuntu via un repository non officiel</a><p>J&#8217;était, hier, en train de jouer avec des appels SOAP pour préparer un projet et j&#8217;ai réalisé que ma version compilée de php 5.3.0 était défectueuse. </p>
</p>
<p>Je dis que mon installation est défectueuse car lorsque j&#8217;instantiait <tt>$client = new Zend_Soap_Client;</tt> plus rien ne répondait. Même aller en <tt>error_reporting(E_ALL);</tt> et tout ce qui est imaginable. C&#8217;est après quelques heures a tourner en rond je me suis dit que si même <tt>$client = new SoapClient;</tt> avec un résultat du genre &#8220;Class does not exists&#8221;. C&#8217;est le PHP&#8230; pas le code ou le Framework. Pas de doute.</p>
<p>J&#8217;ai donc pensé recompiler la <em>dernière version</em> <strong>PHP 5.3.1</strong> qui est considérée stable&#8230; quant à recompiler, autant mettre à jour sur la <em>dernière</em> version!</p>
<p>Ce billet vous permettra d&#8217;installer la version stable <em>PHP 5.3.1</em> a partir d&#8217;un repository déjà configuré au lieu de le compiler.</p>
<p>&nbsp;</p>
<p><span id="more-1718"></span></p>
<h3>Tournage en rond avant d&#8217;en arriver là</h3>
<p>J&#8217;ai souvent entendu l&#8217;adage qui veut qu&#8217;on ne devrait pas installer un logiciel a sa première version majeure. On peut faire le parallèle avec les automobiles. Il y a des coins ronds qui doivent être réparés. La version 5.3.1 est justement la correction de plus de 100 bugs.</p>
<p>&nbsp;</p>
<h3>Quelques corrections dans PHP 5.3.1</h3>
<ul>
<li>Ajouté &#8220;max_file_uploads&#8221; dans la configuration INI qui peut etre là pour éviter la quantité de fichiers téléversés a 20 par défaut. Ainsi éviter un tentative d&#8217;attaque <abbr title="Denial of Service" lang="en">DOS</abbr></li>
<li>Ajouté des vérification de validité sur le moteur <tt>exif</tt></li>
<li>Corrigé le &#8220;<tt>safe_mode</tt>&#8221; dans <tt>tempnam()</tt></li>
<li>Corrigé <tt>open_basedir</tt> dans <tt>posix_mkfifo()</tt></li>
<li>Corrigé la fonction brisée <tt>safe_mode_include_dir</tt></li>
</ul>
<p>Voir le &#8220;<a href="http://www.php.net/ChangeLog-5.php#5.3.1">ChangeLog (anglais)</a>&#8221; et son &#8220;<a href="http://www.php.net/releases/5_3_1.php">release announcement (anglais)</a>&#8220;</p>
<p>&nbsp;</p>
<h3>Ma station de travail</h3>
<p>Ma station de travail secondaire est en Ubuntu 8.10 sur mon vieux portable. J&#8217;avait compilé la version 5.3.0 il y a plusieurs mois (dès sa sortie) pour pouvoir jouer avec les nouvelles fonctions.</p>
<p>La version disponible en auto-installation sur Ubuntu est encore sur du PHP 5.2.x ce qui est innacceptable pour mes projets. J&#8217;avait même fait ma ligne <tt>configure</tt> et j&#8217;avait commencé a compiler la nouvelle version. C&#8217;est là que je me suis dit que j&#8217;était pas le premier a vouloir une version plus récente de PHP.</p>
<p>&nbsp;</p>
<p><!--more--></p>
<h3>Installer <strong>PHP 5.3.1</strong> sous Ubuntu Linux</h3>
<div style="background-color:#FFFEEB;border:1px solid #666600;margin:5px 0px;padding:18px 8px 8px 50px;">
<h4>Mise à jour</h4>
<p>Nous avons fait la migration de notre serveur d&#8217;hébergement public vers cette version de PHP 5.3.1 en suivant cette procédure. J&#8217;ai ajusté le tutoriel.</p>
<p>LE CHANGEMENT: Utiliser <tt><strong>aptitude</strong></tt> au lieu de <tt><strong>apt-get</strong></tt></p>
</div>
<p>C&#8217;est pas une version officielle selon Debian ou Ubuntu car jusqu&#8217;en mi-2010 sur la release <tt>Squeeze</tt> de Debian c&#8217;est comme ça.</p>
<div style="background:#ececec;margin:5px 0px;padding:18px 8px 8px 50px;border:1px solid #333">
<h4 style="color:#777;margin-bottom:10px;">AVERTISSEMENT</h4>
<p>Il s&#8217;agit d&#8217;une version compilée par une source extérieure de Debian ou Ubuntu maintenaue par <a href="http://www.dotdeb.org/">Dotdeb</a>. Cette partie du tutoriel est largement inspirée (traduction quaisi verbatim) du <a href="http://www.dotdeb.org/2009/11/30/php-5-3-1-packages-for-debian-lenny-theyre-here/">billet suivant</a>.</div>
<p>Comparé a la version Debian, la version <em>Dotdeb</em> a ces changements</p>
<ul>
<li>Les <tt>.deb</tt> ont le patch Suhosin appliqué par défaut</li>
<li>mis a part <tt>apache2</tt>, <tt>apache2filter</tt>, <tt>CGI</tt>, et le <tt>CLI</tt> (pour la ligne de commande), le module <tt>FPM</tt> utilise la version custom [de <em>Dotdeb</em>] du paquet intitulé &#8220;<tt>php5-fpm</tt>&#8220;. Il permet des meilleures performances et plus de fonctions comparables a une installation en mode <tt>CGI</tt>.</li>
<li><strong>Note: </strong>Le module <tt>FPM</tt>: a un exemple de configuration, un &#8220;init script&#8221;, et un gabarit de configuration pour <tt>NGINX</tt></li>
</ul>
<h4>Installer?!</h4>
<p>C&#8217;est fonctionnel sous <tt>Debian Lenny</tt> et probablement d&#8217;autres. Moi, personnellement, je l&#8217;ai essayée sous <tt>Ubuntu 9.04 Jaunty</tt>. Dites-moi si vous l&#8217;avez essayé sous d&#8217;autres version dans <a href="#comments">les commentaires</a></p>
<h5>Étape 1</h5>
<p>Modifier le <tt>sources.list</tt></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></td></tr></table></div>

<p>Ajouter les deux lignes suivantes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">deb http:<span style="color: #000000; font-weight: bold;">//</span>php53.dotdeb.org stable all
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>php53.dotdeb.org stable all</pre></td></tr></table></div>

</p>
<h5>Étape 2</h5>
<p>Maintenant, simplement mettre a jour avec&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># aptitude update &amp;&amp; aptitude upgrade</span></pre></td></tr></table></div>

<p>Si vous aviez une version inférieure de PHP, elle devrait se mettre à jour.</p>
<h3>Sources</h3>
<p><a href="http://www.dotdeb.org/2009/11/30/php-5-3-1-packages-for-debian-lenny-theyre-here/">PHP 5.3.1 packages for Debian “Lenny” : they’re here!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://renoirboulanger.com/blog/2010/01/installer-php-5-3-1-sous-debian-et-ubuntu-via-un-repository-non-officiel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

