Joomla
Procédure pour l'installation de Joomla
3.0.1 sur mon site Internet hébergé par Godaddy
1. Je dézippe le fichier provenant de la version française dans un répertoire
Joomla_3.0.1-Stable-Full_Package_FRv2.zip
2. Je télécharge tous les fichier de ce répertoire dans un répertoire de mon
site web disons /joomla
3. Chez mon fournisseur Internet je cré une base de données disons bdjoomla
4. Pour l'instant chez Godaddy pour mon site j'ai la version PHP 5.3.1 ce qui est suffisant pour Joomla 3, mais j'ai la fonction
Magic Quotes GPC activé alors que Joomla 3.0.1 requiert qu'elle soit déactivée et il refuse alors de s'installé. Je contourne le problème en appliquant la méthode décrite dans un forum, décrite ci-ba.
Site: The Joomla! Forum
http://forum.joomla.org/viewtopic.php?f=707&t=759993 Auteur : 3rdlion 9 oct 2012 Mise engarde par un Joomla Virtuoso, alikon : @3rdlion. your proposal is a core hack and maybe expose joomla to high security risk. it is a bad pratice to hack core code. Je donne suite quand même, voici la procédure. |
3rdlion Post subject: a
workaround Magic Quotes and Joomla 3.0 Posted:
Fri Oct 12, 2012 2:08 am I decided to move this into its own thread. Hopefully this saves some other people time in getting their Joomla 3.0 site up and running. Preamble I've been seeing quite a few questions relating to Magic Quotes needing to be turned off in order to install Joomla 3.0 Many of the responses ask you to alter the php.ini or edit other high level server config. All of this unnecessary server tinkering is just madness! You can't even install Joomla 3.0 without turning off Magic Quotes. And its these kind of UX blocks that put Joomla so far backwards it's not even funny. In many cases altering php.ini is just not possible (shared hosting etc). Magic Quotes Enable sites have existed no problem alongside Anti Magic Quotes sites, so what changed in Joomla 3.0? Why should you alter your server config? With some careful editing, you can turn the clock back to the way things used to be and use Joomla 3.0 with Magic Quotes turned ON! |
Here's how to do it: PART 1 Step 1 Download the latest Joomla 3.0 Step 2 Extract the files on your server Step 3 Open your favourite PHP editor Step 4 Navigate and open installation/models/setup.php Step 5 Scroll down to find line 234 Code: // Check for magic quotes gpc. $option = new stdClass; $option->label = JText::_('INSTL_MAGIC_QUOTES_GPC'); $option->state = (ini_get('magic_quotes_gpc') == false); $option->notice = null; $options[] = $option; Step 6 Comment out the code above and save the file Now you can install Joomla 3.0 no problem. |
IMPORTANT However, Magic Quotes and Joomla's new special character escaping will cause duplicate escaping when editing/creating content. This renders anything that's not plain text incorrectly. So, we need to add one small condition to the core (this used to exist pre Joomla 3.0) PART 2 Step 1 Navigate and open libraries/joomla/filter/input.php Step 2 Scroll down to find line 261 Code: public function clean($source, $type = 'string') { // Handle the type constraint switch (strtoupper($type)) {... } // -- ADD THIS CODE HERE [note de Marcel: après le "return $result;" de la ligne 262] // Handle magic quotes compatibility if(get_magic_quotes_gpc()) $result = self::_stripSlashesRecursive($result); } Step 3 Add the code marked above to the clean function Step 4 You may have noticed we're only running this when Magic Quotes is set to ON and referring to a new function called _stripSlashesRecursive. Now, we need to add that function to the class. Scroll to line 755 and add the following function: [note de Marcel: juste avant le dernier "}"] Code: /** * Strips slashes recursively on an array. * * @param array $value Array or (nested arrays) of strings. * * @return array The input array with stripslashes applied to it. * * @deprecated 12.1 - Sanctioned on 2012-10-09 thanks to Anton Wintergerst * @since 11.1 */ protected static function _stripSlashesRecursive($value) { $value = is_array($value) ? array_map(array('JFilterInput', '_stripSlashesRecursive'), $value) : stripslashes($value); return $value; } |
If you want to learn about
why Joomla is trying to force us to disable
Magic Quotes then check out this link: http://www.php.net/manual/en/security.magicquotes.whynot.php |
Commentaire
pertinant de de alikon
un Joomla! Virtuoso @3rdlion your proposal is a core hack and maybe expose joomla to high security risk is a bad pratice to hack core code |
5. Je procède alors à l'installation en exécutant avec mon navigateur le fichier
index.php dans le répertoire où j'ai installé Joomla
Dans Configuration je choisi
-français
Nom du site : Marcel
Description : Site général, photos, technologie, aide
E-mail : mwl101ca@yahoo.ca
Identifiant : xxxxxxxxxxxx
Mot de passe : xxxxxxxxxxx
Dans Base de données
Type de la base de données. Je laisse MySQLi
Nom du serveur (Hostname) : xxxxxxxxxxxx
Nom d'utilisateur :xxxxxxx
Mot de passer : xxxxxxxxxxxxx
Nom de la base de données :
Préfixe des tables : Je choisi xxx_
Finalisation
Je conserve le choix : Données exemples pour apprendre Joomla, en français
Vue d'ensemble
Oui et oui
Et je clique sur installer
6. J'entre dans le site en tant qu'Administrateur et
On va dans Système -- Panneau d'administration - Configuration
globale
Changer la ligne Réécriture d'URL en clair (SEF) de OUI à NON. Enregistrer.
Au besoin Cliques ici pour m'envoyer un courriel.
Dernière modification : 12 janvier 2017.