<?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; extension</title>
	<atom:link href="http://naeh.net/tag/extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://naeh.net</link>
	<description>Le mémo du développeur</description>
	<lastBuildDate>Wed, 30 Jun 2010 18:56:54 +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>Installer libssh2, ssh2 pour php</title>
		<link>http://naeh.net/installer-libssh2-ssh2-pour-php/</link>
		<comments>http://naeh.net/installer-libssh2-ssh2-pour-php/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 20:51:00 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux - Logiciels]]></category>
		<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[libssh2]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[ssh2]]></category>

		<guid isPermaLink="false">http://naeh.net/?p=56</guid>
		<description><![CDATA[Dans cet article nous allons voir comment installer l'extension ssh2 pour php5, cette extension permet l'utilisation de fonctionnalités SSH2 avec php (très utiles quand on veut faire du SFTP par exemple) pour plus d'informations cf. la documentation officielle sur php.net
Pour l'installation, ce n'est pas très compliqué, il suffit de suivre ces quelques étapes à la [...]]]></description>
			<content:encoded><![CDATA[<p>Dans cet article nous allons voir comment installer l'extension ssh2 pour php5, cette extension permet l'utilisation de fonctionnalités SSH2 avec php (très utiles quand on veut faire du SFTP par exemple) pour plus d'informations cf. <a href="http://fr.php.net/manual/fr/book.ssh2.php" target="_blank">la documentation officielle sur php.net</a></p>
<p>Pour l'installation, ce n'est pas très compliqué, il suffit de suivre ces quelques étapes à la lettre et tout ira très bien ;-)</p>
<p>tout d'abord il faut s'assurer d'avoir les bons paquets d'installés, en voici une liste :</p>
<ul>
<li>php5-dev</li>
<li>openssl</li>
<li>libssl-dev</li>
<li>gcc</li>
<li>make</li>
<li>etc. je suppose que si vous installez cette extension, c'est que vous avez déjà php, apache etc.</li>
</ul>
<p><em>Toute la suite s'effectue en root</em></p>
<p>mais avant toute chose, n'oublions pas de faire un petit :</p>

<div class="wp_codebox"><table><tr id="p5611"><td class="code" id="p56code11"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade</pre></td></tr></table></div>

<p>en suite il faut créer un répertoire de travail :</p>

<div class="wp_codebox"><table><tr id="p5612"><td class="code" id="p56code12"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> libssh2
<span style="color: #7a0874; font-weight: bold;">cd</span> libssh2</pre></td></tr></table></div>

<p>ensuite télécharger libssh2 :</p>

<div class="wp_codebox"><table><tr id="p5613"><td class="code" id="p56code13"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ovh.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>libssh2<span style="color: #000000; font-weight: bold;">/</span>libssh2-<span style="color: #000000;">0.14</span>.tar.gz</pre></td></tr></table></div>

<p>puis l'extraire :</p>

<div class="wp_codebox"><table><tr id="p5614"><td class="code" id="p56code14"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> libssh2-<span style="color: #000000;">0.14</span>.tar.gz</pre></td></tr></table></div>

<p>aller dans le répertoire créé et installer libssh2 :</p>

<div class="wp_codebox"><table><tr id="p5615"><td class="code" id="p56code15"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> libssh2-<span style="color: #000000;">0.14</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> all <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>maintenant que libssh2 est installée, passons a ssh2 :</p>
<p>on sort du repertoire de libssh2 et on télécharge ssh2 :</p>

<div class="wp_codebox"><table><tr id="p5616"><td class="code" id="p56code16"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>pecl.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>ssh2-<span style="color: #000000;">0.10</span>.tgz</pre></td></tr></table></div>

<p>extraire l'archive téléchargée :</p>

<div class="wp_codebox"><table><tr id="p5617"><td class="code" id="p56code17"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> ssh2-<span style="color: #000000;">0.10</span>.tgz</pre></td></tr></table></div>

<p>aller dans le répertoire créé et installer ssh2 :</p>

<div class="wp_codebox"><table><tr id="p5618"><td class="code" id="p56code18"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ssh2-<span style="color: #000000;">0.10</span>
phpize <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-ssh2</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span></pre></td></tr></table></div>

<p>maintenant que l'installation est terminée, on active l'extension, ici on va copier le fichier ssh2.so dans le répertoire des extension de php5 (il peut être différent du mien selon la distrib et l'installation) :</p>

<div class="wp_codebox"><table><tr id="p5619"><td class="code" id="p56code19"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> modules<span style="color: #000000; font-weight: bold;">/</span>ssh2.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">20060613</span>+lfs</pre></td></tr></table></div>

<p>puis on ajoute l'extension en créant un fichier ssh2.ini dans le répertoire conf.d (comme pour toutes les autres extensions de php) on n'oublie pas de le faire pour apache mais aussi pour le mode CLI.</p>

<div class="wp_codebox"><table><tr id="p5620"><td class="code" id="p56code20"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;extension=ssh2.so&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>cli<span style="color: #000000; font-weight: bold;">/</span>conf.d<span style="color: #000000; font-weight: bold;">/</span>ssh2.ini
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;extension=ssh2.so&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>conf.d<span style="color: #000000; font-weight: bold;">/</span>ssh2.ini
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></td></tr></table></div>

<p>Et voilà, notre extension est installée, a vous ssh2 et sftp avec php :)</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/installer-libssh2-ssh2-pour-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Extraire le contenu d&#8217;un zip directement sur son FTP chez free</title>
		<link>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/</link>
		<comments>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 17:13:21 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[extraire]]></category>
		<category><![CDATA[hébergement]]></category>
		<category><![CDATA[librairie]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/</guid>
		<description><![CDATA[Dans cette article nous allons voir comment procéder pour dézippé le contenu d'une archive directement sur son FTP free. Ceci peut être très intéressant si on a plusieurs (beaucoup) fichiers à envoyer sur le ftp, parfois ce genre d'upload peut s'avérer très difficile en fonction de la connexion, du logicile client FTP, mais aussi de [...]]]></description>
			<content:encoded><![CDATA[<p>Dans cette article nous allons voir comment procéder pour dézippé le contenu d'une archive directement sur son FTP free. Ceci peut être très intéressant si on a plusieurs (beaucoup) fichiers à envoyer sur le ftp, parfois ce genre d'upload peut s'avérer très difficile en fonction de la connexion, du logicile client FTP, mais aussi de l'humeur du serveur FTP de chez free. On peut se retrouver avec un certain nombre de fichiers qui ne seront pas envoyé (perdus en route ?!).</p>
<p>L'astuce consiste à mettre tous ses fichiers dans ZIP, uploader le zip sur le FTP et l'extraire sur place avec script PHP. Parce que envoyer UN SEUL fichier quelque soit sa taille, est toujours plus simple que d'en envoyer 36 000.</p>
<p>Pour commencer il faut savoir que Free ne propose aucune librairie PHP pour gérer les archives, donc nous utiliserons une classe de substitution, pour l'exemple, on va utiliser <a href="http://www.phpconcept.net/pclzip/index.php" target="_blank"><font color="#206033" face="Comic Sans MS">pclzip</font></a>.</p>
<p>Maintenant, il faut créer un fichier ZIP (test.zip pour l'exemple) dans lequel on mettra tous nos fichiers à uploader sur le FTP.</p>
<p>Ensuite, il faut créer un fichier php (extract.php pour l'exemple) dans lequel on mettra le code suivant (à adapter selon votre cas) :</p>

<div class="wp_codebox"><table><tr id="p4922"><td class="code" id="p49code22"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Extrait de la documentation de la class.</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pclzip.lib.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$archive</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PclZip<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'test.zip'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//METTRE LE VRAI NOM DU ZIP ;)</span>
<span style="color: #666666; font-style: italic;">//Extrait dans le repertoire courant.</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">extract</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error : &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$archive</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>maintenant on se retrouve avec 3 fichiers :</p>
<ol>
<li>extract.php</li>
<li> pclzip.lib.php</li>
<li>test.zip</li>
</ol>
<p>On peut maintenant envoyer nos 3 fichiers dans le répertoire sensé accueillir les fichiers finaux (contenus dans le zip) sur le FTP.</p>
<p>maintenant prendre son navigateur et aller à l'url http://adresse_du_site.free.fr/repertoire/extract.php</p>
<p>et le tour est joué :-)</p>
<p>N.B. Cette procédure et valable pour tout hébergement mutualisé (ou pas) ne proposant pas les extensions PHP Zlib ou équivalent.</p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/extraire-le-contenu-dun-zip-directement-sur-son-ftp-chez-free/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>L&#8217;internationalisation en extension PHP</title>
		<link>http://naeh.net/linternationalisation-en-extension-php/</link>
		<comments>http://naeh.net/linternationalisation-en-extension-php/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 18:52:45 +0000</pubDate>
		<dc:creator>Naeh</dc:creator>
				<category><![CDATA[PHP / MySQL]]></category>
		<category><![CDATA[développement]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[internationalisation]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[langue]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://naeh.net/index.php/linternationalisation-en-extension-php/</guid>
		<description><![CDATA[L'extension d'internationalisation est de localisation de PHP vient d'être annoncée en version Bêta, elle sera incluse dans PHP 5.3 (encore en développement).
Voici les premières classes disponibles :

Collator : Manipulation de chaînes ;
NumberFormatter : Manipulation de nombres ;
Locale : Informations sur la Locale ;
Normalizer : Uniformisation de texte en fonction de la locale ;
MessageFormatter : Construction [...]]]></description>
			<content:encoded><![CDATA[<p>L'extension d'internationalisation est de localisation de PHP vient d'être annoncée en version Bêta, elle sera incluse dans PHP 5.3 (encore en développement).</p>
<p>Voici les premières classes disponibles :</p>
<ul>
<li><strong>Collator</strong> : Manipulation de chaînes ;</li>
<li><strong>NumberFormatter</strong> : Manipulation de nombres ;</li>
<li><strong>Locale</strong> : Informations sur la Locale ;</li>
<li><strong>Normalizer</strong> : Uniformisation de texte en fonction de la locale ;</li>
<li><strong>MessageFormatter</strong> : Construction abstraite de texte à partir des autres objets de l'extension.</li>
</ul>
<p>Collator et FormatNumber permettent de travailler avec des chaînes et avec des nombres, de manière indépendante de la langue (ex : "français") et de la localisation (ex : "fr-CA" ou "fr-FR").<br />
Locale et Normalizer permettent d'intéragir plus en détail avec la localisation et avec du texte <em>localisé</em>.<br />
MessageFormatter est le maître d'orchestre, un nouveau sprintf() en quelque sorte.</p>
<p>L'annonce : <a href="http://php100.wordpress.com/2007/12/12/icuphplove/">http://php100.wordpress.com/2007/12/12/icuphplove/</a><br />
La documentation : <a href="http://docs.php.net/manual/en/book.intl.php">http://docs.php.net/manual/en/book.intl.php</a><br />
Téléchargement : <a href="http://pecl.php.net/package/intl">http://pecl.php.net/package/intl</a></p>
<p>Source : <a href="http://blog.developpez.com/index.php?blog=102&amp;title=l_internationalisation_arrive_enfin_en_e&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1" target="_blank">Developpez.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naeh.net/linternationalisation-en-extension-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
