vue Probléme "parse error"
Kommunauty
Connexion
Inscription

Probléme "parse error"


waloudu93 Messages : 6

bonjour j'ai un problème une fois que tous les fichier sont transférer quand j'accède à mon site pour installer

il me met sa :

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/39/d308547143/htdocs/includes/debug.class.php on line 38

je suis chez l'hébergeur 1and1

pouvez vous m'aider svp

mardi 6 avril 2010

Anonyme Messages : 0

tu a quel version de XNova ???

mardi 6 avril 2010

waloudu93 Messages : 6

j ai cette version xnova-legacies_2009.2

mardi 6 avril 2010

Anonyme Messages : 0

peut-être le syntaxe demande a SimAX

mardi 6 avril 2010

SiMax Messages : 7572

Bonjour,

As-tu modifié des pages du jeu avant de l'envoyer en ligne ?

mardi 6 avril 2010

waloudu93 Messages : 6

non j'ai rien modifier j'ai dézippé le rar et j'ai tout envoyé par ftp

mardi 6 avril 2010

SiMax Messages : 7572

Bizarre

Tu pourrais copier-coller sur le forum le fichier includes/debug.class.php stp ?

mardi 6 avril 2010

waloudu93 Messages : 6

voila le code source de debug.class.php

<?php
/**
 * Tis file is part of XNova&#58;Legacies
 *
 * @license http&#58;//www&#46;gnu&#46;org/licenses/gpl-3&#46;0&#46;txt
 * @see http&#58;//www&#46;xnova-ng&#46;org/
 *
 * Copyright (c) 2009-Present, XNova Support Team <http&#58;//www&#46;xnova-ng&#46;org>
 * All rights reserved&#46;
 *
 * This program is free software&#58; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version&#46;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE&#46;  See the
 * GNU General Public License for more details&#46;
 *
 * You should have received a copy of the GNU General Public License
 * along with this program&#46;  If not, see <http&#58;//www&#46;gnu&#46;org/licenses/>&#46;
 *
 *                                --> NOTICE <--
 *  This file is part of the core development branch, changing its contents will
 * make you unable to use the automatic updates manager&#46; Please refer to the
 * documentation for further information about customizing XNova&#46;
 *
 */

/**
 * Debug class
 *
 * @todo Clean up source code
 */
class Nova_Core_Debug
{
    const CRITICAL      = 0x80;
    const ERROR         = 0x40;
    const WARNING       = 0x20;
    const INFO          = 0x10;
    const MESSAGE       = 0x08;
    const AUDIT_FAILED  = 0x04;
    const AUDIT_SUCCESS = 0x02;
    const DEBUG         = 0x01;

    const DEFAULT_LOGFILE = 'var/log/system&#46;log';

    protected $_logLevelNames = array(
        self&#58;&#58;CRITICAL      => 'CRITICAL',
        self&#58;&#58;ERROR         => 'ERROR',
        self&#58;&#58;WARNING       => 'WARNING',
        self&#58;&#58;INFO          => 'INFO',
        self&#58;&#58;MESSAGE       => 'MESSAGE',
        self&#58;&#58;AUDIT_FAILED  => 'AUDIT_FAILED',
        self&#58;&#58;AUDIT_SUCCESS => 'AUDIT_SUCCESS',
        self&#58;&#58;DEBUG         => 'DEBUG'
        );

    /**
     * Clean logging method
     *
     * @param string $message
     * @param string $resource
     * @param int $level
     * @return unknown_type
     */
    public function log($message, $resource = self&#58;&#58;DEFAULT_LOGFILE, $level = self&#58;&#58;DEBUG)
    {
        if(!($fp = fopen($resource, 'a'))) {
            trigger_error('Unable to open logs&#46;', E_USER_ERROR);
            trigger_error($message, E_USER_ERROR);
            return false;
        }
        fprintf($fp, '&#91;%s&#93; | %s - %s', $this->_logLevelNames&#91;$level&#93;, date('r'), $message);
        fclose($fp);
        return true;
    }
}

/**
 * @deprecated
 * @todo Clean up source code
 */
class Debug
    extends Nova_Core_Debug
{
    protected $_logMessages = array();

/**
     * @deprecated
     * @param string $message
     * @return void
     */
    function add($message)
    {
        $this->log($message);
        $this->_logMessages&#91;&#93; = $message;
    }

    /**
     * @deprecated
     * @return void
     */
    function echo_log()
    {
        $messages = implode(PHP_EOL, $this->_logMessages);
        echo  <<<EOF
<dl class="k">
  <dt>
    <a href="admin/settings&#46;php">Debug Log</a>&#58;
  </dt>
  <dd>
    <pre><code>{$messages}</code></pre>
  </dd>
</dl>
EOF;
        die();
    }

    /**
     * @deprecated
     * @todo Clean up source code
     * @param $message
     * @param $title
     * @return unknown_type
     */
    function error($message, $title)
    {
        global $link, $game_config;

        if($game_config&#91;'debug'&#93;==1){
            echo "<h2>$title</h2><br><font color=red>$message</font><br><hr>";
            echo  "<table>"&#46;$this->log&#46;"</table>";
        }

        global $user;
        $config = include ROOT_PATH &#46; 'config&#46;' &#46; PHPEXT;
        if(!$link) die('La base de donnee n est pas disponible pour le moment, desole pour la gene occasionnee&#46;&#46;&#46;');
        $query = "INSERT INTO {{table}} SET
            `error_sender` = '{$user&#91;'id'&#93;}' ,
            `error_time` = '"&#46;time()&#46;"' ,
            `error_type` = '{$title}' ,
            `error_text` = '"&#46;mysql_escape_string($message)&#46;"';";
        $sqlquery = mysql_query(str_replace("{{table}}", $dbsettings&#91;"prefix"&#93;&#46;'errors',$query))
            or die('error fatal');
        $query = "explain select * from {{table}}";
        $q = mysql_fetch_array(mysql_query(str_replace("{{table}}", $dbsettings&#91;"prefix"&#93;&#46;
            'errors', $query))) or die('error fatal&#58; ');

        if (!function_exists('message')) {
            echo "Erreur, merci de contacter l'admin&#46; Erreur n�&#58; <b>"&#46;$q&#91;'rows'&#93;&#46;"</b>";
        } else {
            message("Erreur, merci de contacter l'admin&#46; Erreur n�&#58; <b>"&#46;$q&#91;'rows'&#93;&#46;"</b>", "Erreur");
        }
    }
}
mardi 6 avril 2010

SiMax Messages : 7572

Bizarre, essaye de désactiver le mode "debuggage" si tu l'as activé.

Sinon essaye de remplacer le code de la page par celui-ci :

    <?php
    /**
    * Tis file is part of XNova&#58;Legacies
    *
    * @license http&#58;//www&#46;gnu&#46;org/licenses/gpl-3&#46;0&#46;txt
    * @see http&#58;//www&#46;xnova-ng&#46;org/
    *
    * Copyright (c) 2009-Present, XNova Support Team <http&#58;//www&#46;xnova-ng&#46;org>
    * All rights reserved&#46;
    *
    * This program is free software&#58; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version&#46;
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE&#46;  See the
    * GNU General Public License for more details&#46;
    *
    * You should have received a copy of the GNU General Public License
    * along with this program&#46;  If not, see <http&#58;//www&#46;gnu&#46;org/licenses/>&#46;
    *
    *                                --> NOTICE <--
    *  This file is part of the core development branch, changing its contents will
    * make you unable to use the automatic updates manager&#46; Please refer to the
    * documentation for further information about customizing XNova&#46;
    *
    */

    /**
    * Debug class
    *
    * @todo Clean up source code
    */
    class Nova_Core_Debug
    {
        const CRITICAL      = 0x80;
        const ERROR         = 0x40;
        const WARNING       = 0x20;
        const INFO          = 0x10;
        const MESSAGE       = 0x08;
        const AUDIT_FAILED  = 0x04;
        const AUDIT_SUCCESS = 0x02;
        const DEBUG         = 0x01;

        const DEFAULT_LOGFILE = 'var/log/system&#46;log';

        protected $_logLevelNames = array(
            self&#58;&#58;CRITICAL      => 'CRITICAL',
            self&#58;&#58;ERROR         => 'ERROR',
            self&#58;&#58;WARNING       => 'WARNING',
            self&#58;&#58;INFO          => 'INFO',
            self&#58;&#58;MESSAGE       => 'MESSAGE',
            self&#58;&#58;AUDIT_FAILED  => 'AUDIT_FAILED',
            self&#58;&#58;AUDIT_SUCCESS => 'AUDIT_SUCCESS',
            self&#58;&#58;DEBUG         => 'DEBUG'
            );

        /**
         * Clean logging method
         *
         * @param string $message
         * @param string $resource
         * @param int $level
         * @return unknown_type
         */
        public function log($message, $resource = self&#58;&#58;DEFAULT_LOGFILE, $level = self&#58;&#58;DEBUG)
        {
            if(!($fp = fopen($resource, 'a'))) {
                trigger_error('Unable to open logs&#46;', E_USER_ERROR);
                trigger_error($message, E_USER_ERROR);
                return false;
            }
            fprintf($fp, '&#91;%s&#93; | %s - %s', $this->_logLevelNames&#91;$level&#93;, date('r'), $message);
            fclose($fp);
            return true;
        }
    }

    /**
    * @deprecated
    * @todo Clean up source code
    */
    class Debug
        extends Nova_Core_Debug
    {
        protected $_logMessages = array();

       /**
         * @deprecated
         * @param string $message
         * @return void
         */
        function add($message)
        {
            $this->log($message);
            $this->_logMessages&#91;&#93; = $message;
        }

        /**
         * @deprecated
         * @return void
         */
        function echo_log()
        {
            $messages = implode(PHP_EOL, $this->_logMessages);
            echo  '<<<EOF
    <dl class="k">
      <dt>
        <a href="admin/settings&#46;php">Debug Log</a>&#58;
      </dt>
      <dd>
        <pre><code>{$messages}</code></pre>
      </dd>
    </dl>
    EOF';
            die();
        }

        /**
         * @deprecated
         * @todo Clean up source code
         * @param $message
         * @param $title
         * @return unknown_type
         */
        function error($message, $title)
        {
            global $link, $game_config;

            if($game_config&#91;'debug'&#93;==1){
                echo "<h2>$title</h2><br><font color=red>$message</font><br><hr>";
                echo  "<table>"&#46;$this->log&#46;"</table>";
            }

            global $user;
            $config = include ROOT_PATH &#46; 'config&#46;' &#46; PHPEXT;
            if(!$link) die('La base de donnee n est pas disponible pour le moment, desole pour la gene occasionnee&#46;&#46;&#46;');
            $query = "INSERT INTO {{table}} SET
                `error_sender` = '{$user&#91;'id'&#93;}' ,
                `error_time` = '"&#46;time()&#46;"' ,
                `error_type` = '{$title}' ,
                `error_text` = '"&#46;mysql_escape_string($message)&#46;"';";
            $sqlquery = mysql_query(str_replace("{{table}}", $dbsettings&#91;"prefix"&#93;&#46;'errors',$query))
                or die('error fatal');
            $query = "explain select * from {{table}}";
            $q = mysql_fetch_array(mysql_query(str_replace("{{table}}", $dbsettings&#91;"prefix"&#93;&#46;
                'errors', $query))) or die('error fatal&#58; ');

            if (!function_exists('message')) {
                echo "Erreur, merci de contacter l'admin&#46; Erreur n?&#58; <b>"&#46;$q&#91;'rows'&#93;&#46;"</b>";
            } else {
                message("Erreur, merci de contacter l'admin&#46; Erreur n?&#58; <b>"&#46;$q&#91;'rows'&#93;&#46;"</b>", "Erreur");
            }
        }
    }
mardi 6 avril 2010

waloudu93 Messages : 6

c'est ou qu'on peut désactiver le mode débuggage??

sur Fillezilla car c'est avec sa que je transfert mes fichier

mardi 6 avril 2010

Page suivante »