Fork me on GitHub




« 1 2 3 (4) 5 »


Re: Erreur suite à une migration
Aspirant
Inscrit: 30/04/2015 15:27
Messages: 22
Oui, il est bien présent

Posté le : 07/05/2015 15:50
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Admin Frxoops
Inscrit: 04/03/2011 09:10
De Lot
Messages: 2837
Je prend au vol, je lis le site date de 2002, donc

Qu'as tu fais lors de ta migration d'infomaniak vers OVH ?

C'est une simple migration ou une mise à jour de Xoops a été effectué.

Je fais ce genre de migration très souvent et j'ai jamais de problème (sauf parfois une incompatibilité avec la version de PHP) mais c'est un autre problème.

En anticipant la réponse, c'est une simple migration, pointe tu vers les bon répertoire xoops_lib et xoops_data. La personne qui a fait la mise à jour a peut être tous simplement mis le contenu de ces 2 répertoires ailleurs, ce qui fait qu'on se retrouve avec des xoops_lib et xoops_data imbriqué les uns dans les autres, et lors de la migration on pointent vers les anciens et là, sa plante.
Pour ma part, je te conseillerai de prendre le contenu de xoops_libs et xoops_data d'une version neuve de xoops 2.5.6, de les installer sur l'hébergement, puis de modifier le mainfile.php vers ses nouveaux répertoires.




Posté le : 08/05/2015 00:10
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Aspirant
Inscrit: 30/04/2015 15:27
Messages: 22
Suite aux conseil de Montuy337513, les modifications ont été effectuer.
Voici les erreurs lorsque j'essaye d'accèdes au menu module :

Citation :
Message: File Path Error: var/configs/xoopsconfig.php does not exist. dans le fichier /include/common.php - ligne 130
Avertissement(s): include_once(/home/meganefrwr/xoops_data/modules/protector/class/registry.php): failed to open stream: No such file or directory dans le fichier /modules/protector/mytrustdirname.php - ligne 7
Avertissement(s): include_once(): Failed opening '/home/meganefrwr/xoops_data/modules/protector/class/registry.php' for inclusion (include_path='.:/usr/local/php5.4/lib/php') dans le fichier /modules/protector/mytrustdirname.php - ligne 7

Posté le : 18/06/2015 10:01
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Admin Frxoops
Inscrit: 04/03/2011 09:10
De Lot
Messages: 2837
le premier indique que Xoops n'arrive pas a acceder au fichier xoops_data/configs/xoopsconfig.php.

Et les deux autres, c'est de même acabit.

Il y a de grande chance pour que ton fichier mainfile.php ne soit pas complet ou que tu as mal renseigné certains renseignements

Il doit ressembler à ceci :

/**
 * XOOPS main configuration file
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * 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.
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @version     $Id: mainfile.dist.php 12033 2013-09-14 03:16:44Z beckmi $
 */

if (!defined("XOOPS_MAINFILE_INCLUDED")) {
    
define("XOOPS_MAINFILE_INCLUDED"1);

    
// XOOPS Physical Paths

    // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
    
define('XOOPS_ROOT_PATH''/var/www/'); // Chemin où se trouve la racine de Xoops (l'endroit où se trouve mainfile.php)

    // For forward compatibility
    // Physical path to the XOOPS library directory WITHOUT trailing slash
    
define('XOOPS_PATH''/var/www/xoops_lib'); // L'endroit où se trouve le répertoire xoops_lib
    // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
    
define('XOOPS_VAR_PATH''/var/www/xoops_data'); // L'endroit où se trouve le répertoire xoops_data
    // Alias of XOOPS_PATH, for compatibility, temporary solution
    
define("XOOPS_TRUST_PATH"XOOPS_PATH);

    
// URL Association for SSL and Protocol Compatibility
    
$http 'http://';
    if (!empty(
$_SERVER['HTTPS'])) {
        
$http = ($_SERVER['HTTPS']=='on') ? 'https://' 'http://';
    }
    
define('XOOPS_PROT'$http);

    
// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_URL', 'http://www.tonsite.com');
    
define('XOOPS_URL''http://www.ton_site.com');

    
// Shall be handled later, don't forget!
    
define("XOOPS_CHECK_PATH"0);
    
// Protect against external scripts execution if safe mode is not enabled
    
if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) {
        if (
function_exists("debug_backtrace")) {
            
$xoopsScriptPath debug_backtrace();
            if (!
count($xoopsScriptPath)) {
                 die(
"XOOPS path check: this file cannot be requested directly");
            }
            
$xoopsScriptPath $xoopsScriptPath[0]["file"];
        } else {
            
$xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] :  $_SERVER["SCRIPT_FILENAME"];
        }
        if (
DIRECTORY_SEPARATOR != "/") {
            
// IIS6 may double the  chars
            
$xoopsScriptPath str_replace(strpos($xoopsScriptPath"\"2) ? "\" DIRECTORY_SEPARATOR"/"$xoopsScriptPath);
        }
        if (
strcasecmp(substr($xoopsScriptPath0strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR"/"XOOPS_ROOT_PATH))) {
             exit(
"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
        }
    }

    
// Secure file
    
require XOOPS_VAR_PATH '/data/secure.php';

    
define('XOOPS_GROUP_ADMIN''1');
    
define('XOOPS_GROUP_USERS''2');
    
define('XOOPS_GROUP_ANONYMOUS''3');

    if (!isset(
$xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
        include 
XOOPS_ROOT_PATH."/include/common.php";
    }

}

Posté le : 18/06/2015 10:54
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Aspirant
Inscrit: 30/04/2015 15:27
Messages: 22
Voici mon mainfile :

<?php
/**
 * XOOPS main configuration file
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * 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.
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     http://www.fsf.org/copyleft/gpl.html& ...  public license
 * @version     $Id: mainfile.dist.php 3580 2009-09-05 23:38:38Z trabis $
 */

if (!defined("XOOPS_MAINFILE_INCLUDED")) {
    
define'XOOPS_MAINFILE_INCLUDED');

    
// XOOPS Physical Paths

    // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
    
define'XOOPS_ROOT_PATH''/home/meganefrwr/www/xoops' );

    
// For forward compatibility
    // Physical path to the XOOPS library directory WITHOUT trailing slash
    
define'XOOPS_PATH''/home/meganefrwr/xoops_data' );
    
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
    
define'XOOPS_VAR_PATH''/home/meganefrwr/xoops_lib' );
    
// Alias of XOOPS_PATH, for compatibility, temporary solution
    
define("XOOPS_TRUST_PATH"XOOPS_PATH);

    
// URL Association for SSL and Protocol Compatibility
    
$http 'http://';
    if (!empty(
$_SERVER['HTTPS'])) {
        
$http = ($_SERVER['HTTPS']=='on') ? 'https://' 'http://';
    }
    
define('XOOPS_PROT'$http);

    
// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define( 'XOOPS_URL', 'http://www.megane-france.net/xoops' );
    
define'XOOPS_URL''http://www.megane-france.net/xoops' );

    
// Shall be handled later, don't forget!
    
define'XOOPS_CHECK_PATH');
    
// Protect against external scripts execution if safe mode is not enabled
    
if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) {
        if (
function_exists("debug_backtrace")) {
            
$xoopsScriptPath debug_backtrace();
            if (!
count($xoopsScriptPath)) {
                 die(
"XOOPS path check: this file cannot be requested directly");
            }
            
$xoopsScriptPath $xoopsScriptPath[0]["file"];
        } else {
            
$xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] :  $_SERVER["SCRIPT_FILENAME"];
        }
        if (
DIRECTORY_SEPARATOR != "/") {
            
// IIS6 may double the  chars
            
$xoopsScriptPath str_replace(strpos($xoopsScriptPath"\"2) ? "\" DIRECTORY_SEPARATOR"/"$xoopsScriptPath);
        }
        if (
strcasecmp(substr($xoopsScriptPath0strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR"/"XOOPS_ROOT_PATH))) {
             exit(
"XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
        }
    }

    
// Database
    // Choose the database to be used
    
define'XOOPS_DB_TYPE''mysql' );

    
// Set the database charset if applicable
    
if (defined("XOOPS_DB_CHARSET")) die('Restricted Access');
    
define'XOOPS_DB_CHARSET''utf8' );

    
// Table Prefix
    // This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default "xoops".
    
define'XOOPS_DB_PREFIX''xoops' );

    
// Database Hostname
    // Hostname of the database server. If you are unsure, "localhost" works in most cases.
    
define'XOOPS_DB_HOST''*******************' );

    
// Database Username
    // Your database user account on the host
    
define'XOOPS_DB_USER''*****************' );

    
// Database Password
    // Password for your database user account
    
define'XOOPS_DB_PASS''***************' );

    
// Database Name
    // The name of database on the host. The installer will attempt to create the database if not exist
    
define'XOOPS_DB_NAME''*****************' );

    
// Use persistent connection? (Yes=1 No=0)
    // Default is "Yes". Choose "Yes" if you are unsure.
    
define'XOOPS_DB_PCONNECT');

    
define'XOOPS_GROUP_ADMIN''1' );
    
define'XOOPS_GROUP_USERS''2' );
    
define'XOOPS_GROUP_ANONYMOUS''3' );

    if (!isset(
$xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") {
        include 
XOOPS_ROOT_PATH."/include/common.php";
    }

}

?>

Posté le : 18/06/2015 14:23
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Admin Frxoops
Inscrit: 04/03/2011 09:10
De Lot
Messages: 2837
Ta version de mainfile.php est ancienne, c'est pour cela que tu as ces messages d'erreur, a mon avis, lors de la mise à jour tu as oublié d'autoriser l'écriture sur mainfile.php.

Sinon reprends le modèle comme ci-dessus, pour les données MySQL, ils sont stocké dans le fichier ./xoops_data/data/secure.php, ce fichier sera donc aussi a modifier

Posté le : 18/06/2015 14:59
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Aspirant
Inscrit: 30/04/2015 15:27
Messages: 22
J'ai bien fais les deux modifications, mais j'ai au final page blanche.
Lors que j'essayer d'activer le mode debug sur PhpMyAdmin, il ne se passe rien non plus ...

Posté le : 22/06/2015 11:25
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Admin Frxoops
Inscrit: 04/03/2011 09:10
De Lot
Messages: 2837
une page blanche, c'est souvent dû a une erreur fatale de PHP.

Avec ce bout de code coller au début du mainfile.php te permettra de faire apparaître les erreurs PHP de type "fatal error".
if (PHP_VERSION_ID 50400error_reporting (E_ALL E_STRICT);
        else 
error_reporting (E_ALL);      
  
ini_set('display_errors'true);     
  
ini_set('html_errors'false);       
  
ini_set('display_startup_errors',true);    
  
ini_set('log_errors'false);       
  
ini_set('error_prepend_string','<span style="color: red;">'); 
  
ini_set('error_append_string','<br /></span>');   
  
ini_set('ignore_repeated_errors'true);


Si tu reste avec un écran blanc, vérifie les chemins que tu as modifié (ainsi que les droit en lectures sur ces fichiers)

Posté le : 22/06/2015 11:58
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Admin Frxoops
Inscrit: 04/03/2011 09:10
De Lot
Messages: 2837
D'ailleurs as-tu penser a mettre les données de la base de données dans ./xoops_data/data/secure.php ?

Au pire le modèle est dans ./xoops_data/data/secure.dist.php

Posté le : 22/06/2015 11:59
Partager Twitter Partagez cette article sur GG+
Re: Erreur suite à une migration
Aspirant
Inscrit: 30/04/2015 15:27
Messages: 22
J'ai bien mis le bout de code au début du mainfile.php, mais toujours page blanche...
Oui, j'ai bien rentrer toutes les informations dans le secure.php avec comme modele le secure.dist.php

Posté le : 22/06/2015 14:11
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant
« 1 2 3 (4) 5 »



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

43 Personne(s) en ligne (36 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 43 | Plus ...