Parse error: prestashop

hackutt Messages postés 32 Statut Membre -  
hackutt Messages postés 32 Statut Membre -
Bonjour,
J'ai hébergé mon site chez 1and1. Quand j'essaie d'installer prestashop dans mon site, en tapant http://africonline.biz/africonline/install/ je reçois l'erreur suivante:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/31/d294898241/htdocs/africonline/install/classes/LanguagesManager.php on line 7

Merci de votre solution.
Merci,
Configuration: Windows XP
Firefox 2.0.0.20

2 réponses

  1. hackutt Messages postés 32 Statut Membre
     
    voici le contenu du fichier africonline/install/classes/LanguagesManager.php on line 7:

    <?php

    include_once("../classes/Validate.php");

    class LanguageManager {

    private $url_xml;
    private $lang;
    private $xml_file;

    function __construct ($url_xml){
    $this->loadXML($url_xml);
    $this->setLanguage();
    $this->getIncludeTradFilename();

    }

    private function loadXML($url_xml){
    global $errors;
    if(!$this->xml_file = simplexml_load_file($url_xml))
    $errors = "Error when loading XML language file : $url_xml";
    }

    public function getIdSelectedLang(){
    return $this->lang['id'];
    }

    public function getIsoCodeSelectedLang(){
    return $this->lang->idLangPS;
    }

    public function countLangs(){
    return sizeof($this->xml_file);
    }

    public function getAvailableLangs(){
    return $this->xml_file;
    }

    public function getSelectedLang(){
    return $this->lang;
    }

    private function getIdByHAL(){

    $iso = false;

    if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {

    $FirstHAL = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
    $iso = $FirstHAL[0];

    if ( $iso != "en-us" ) {
    foreach ($this->xml_file as $lang){
    foreach ($lang->isos->iso as $anIso){
    if ($anIso == $iso) return $lang['id'];
    }
    }
    }

    } else return 0;

    }

    private function setLanguage(){
    if( isset($_GET['language']) AND Validate::isInt($_GET['language'])){
    $id_lang = intval($_GET['language']);
    }
    if (!isset($id_lang)) {
    $id_lang = ($this->getIdByHAL());
    }

    $this->lang = $this->xml_file->lang[intval($id_lang)];

    }

    public function getIncludeTradFilename(){
    return ($this->lang == NULL) ? false : dirname(__FILE__).$this->lang['trad_file'];
    }

    }

    ?>
    0
  2. hackutt Messages postés 32 Statut Membre
     
    ça y est j'ai trouvé la reponse! il suffit de de rajouter la dernière ligne “AddType x-mapp-php5 .php” et ça marche!
    voici le contenu du fichier “.htaccess“ qui se trouve dans la racine:

    # URL rewriting module activation
    RewriteEngine on

    # URL rewriting rules
    RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
    RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
    RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
    RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]
    RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
    RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

    # Catch 404 errors
    ErrorDocument 404 /404.php
    AddType x-mapp-php5 .php
    0