Fork me on GitHub




(1) 2 »


l’instruction php <?php print getcwd();?>
Aspirant
Inscrit: 12/02/2007 15:42
Messages: 43
bonjour, je crois que le seul problème qu'il me reste, c'est le chemin physique du serveur. On ma dit d'utiliser l’instruction php <?php print getcwd();?>. Mais je sais pas c'est quoi, pouvez vous m'aider?

Posté le : 22/06/2007 04:44
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Régulier
Inscrit: 28/10/2005 17:17
De Switzerland
Messages: 350
Slt,

Cette instruction va te donner le chemin physique de ton site, sur le serveur de ton hébergeur, que tu pourras ainsi reporter dans ton fichier mainfile.php


Pour ce faire,

Crée un fichier MyPath.php ou tu colleras ce code dedans :
<?php
 
print getcwd();
?>


Transfert via ftp ce fichier à la racine de ton site et exécute le -> http://{MonSite.com}/MyPath.php

En retour tu obtiendras quelque chose qui varie d'un hébergeru à un autre. Exemple '/home/www/dd147e743f81/web'

C'est ton chemin physique (ou est ton site réellement), alors que ton chemin virtuel c'est http://www.monsite.com

Ensuite tu ouvres ton fichier manifile.dist.php et tu insères ces deux valeurs ici
// XOOPS Physical Path
    // Physical path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_ROOT_PATH', '/path/to/xoops/directory');
    
define('XOOPS_ROOT_PATH''/home/www/dd147e743f81/web');

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


Tu n'as plus qu'a retrsnférer ce fichier à la racine de ton site, le renommer en enlevant le '.dist' et écraser le mainfile.php existant (qui est la config locale) et surtout effacer le fichier MyPath.php de la racine de ton site.

Si tu as des problèmes, n'hésite pas

Posté le : 22/06/2007 07:46

Le savoir ne peut progresser que s'il est partagé - Share your knowledge
Documentation, suivi et tutorial sur la réalisation d'un module ici
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Aspirant
Inscrit: 12/02/2007 15:42
Messages: 43
merci

Posté le : 22/06/2007 15:06
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Newbie
Inscrit: 15/06/2007 11:50
Messages: 6
juste pour dire merci pour ce post très clair, qui m'a permis de résoudre le problème de la modification de l'emplacement physique de mon site.

Posté le : 10/07/2008 00:50

L'arbre íƒÂ  Palabre - Lieu d'échange d'idées & de beauté...
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Régulier
Inscrit: 23/06/2004 17:28
Messages: 311
bonjour, free m'a égélement déménagé de serveur et je suis en galère !

l'ajout du fichier MyPath.php ùe fournit les nouvelles indications que voici : /mnt/171/sdc/d/7/thermomixer

j'ai donc édité mon mainfile.dist.php comme suit :

<?php
// $Id: mainfile.dist.php 506 2006-05-26 23:10:37Z skalpa $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>   ... nbsp;   //
//  ------------------------------------------------------------------------ //
//  This program is free software; 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 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  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.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

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

    
// XOOPS Physical Path
    // Physical path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_ROOT_PATH', '/path/to/xoops/directory');
    
define('XOOPS_ROOT_PATH''mnt/171/sdc/d/7/thermomixer'); 

    
// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_URL', 'http://url_to_xoops_directory');
    
define('XOOPS_URL''http://thermomixer.free.fr');

    
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_replacestrpos$xoopsScriptPath'\\') ? '\\' DIRECTORY_SEPARATOR'/'$xoopsScriptPath);
        }
        if ( 
strcasecmpsubstr($xoopsScriptPath0strlen(XOOPS_ROOT_PATH)), str_replaceDIRECTORY_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');

    
// 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''localhost');

    
// 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'0);

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

    foreach ( array(
'GLOBALS''_SESSION''HTTP_SESSION_VARS''_GET''HTTP_GET_VARS''_POST''HTTP_POST_VARS''_COOKIE''HTTP_COOKIE_VARS''_REQUEST''_SERVER''HTTP_SERVER_VARS''_ENV''HTTP_ENV_VARS''_FILES''HTTP_POST_FILES''xoopsDB''xoopsUser''xoopsUserId''xoopsUserGroups''xoopsUserIsAdmin''xoopsConfig''xoopsOption''xoopsModule''xoopsModuleConfig''xoopsRequestUri') as $bad_global ) {
        if ( isset( 
$_REQUEST[$bad_global] ) ) {
            
header'Location: '.XOOPS_URL.'/' );
            exit();
        }
    }

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


puis renommé ce dernier en mainfile.php

depuis je me retrouve avec la page suivante :

Warningmain(mnt/171/sdc/d/7/thermomixer/include/common.php) [function.main]: failed to open streamNo such file or directory in /mnt/171/sdc/d/7/thermomixer/mainfile.php on line 102

Warning
main() [function.include]: Failed opening 'mnt/171/sdc/d/7/thermomixer/include/common.php' for inclusion (include_path='/mnt/171/sdc/d/7/thermomixer/include:.:/usr/php4/lib/php'in /mnt/171/sdc/d/7/thermomixer/mainfile.php on line 102

Warning
main(mnt/171/sdc/d/7/thermomixer/class/xoopsblock.php) [function.main]: failed to open streamNo such file or directory in /mnt/171/sdc/d/7/thermomixer/header.php on line 29

Warning
main() [function.include]: Failed opening 'mnt/171/sdc/d/7/thermomixer/class/xoopsblock.php' for inclusion (include_path='/mnt/171/sdc/d/7/thermomixer/include:.:/usr/php4/lib/php'in /mnt/171/sdc/d/7/thermomixer/header.php on line 29

Fatal error
Call to a member function on a non-object in /mnt/171/sdc/d/7/thermomixer/header.php on line 35


bref, je suis dans le caca pour le coup

Si vous pouviez me venir en aide, ce serait super sympa, merci.

Posté le : 06/12/2010 15:20
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Xoops accro
Inscrit: 20/02/2008 20:27
De Belgium
Messages: 2708
Il faut simplement adapter les définitions pour les paths du mainfile.php originale!
Votre hébergeur n'a pas communiquée le nouvelle path?
Vérifiez que ca correspond avec votre résultat.
Vérifiez également avec le file check que tous les fichiers sont présent (faites aussi attention au xoops_lib et xoops_path, qu'ils sont bien déménagé avec.

Posté le : 06/12/2010 16:19

Salutations, Gerard.
PS: Excusez mon mauvais français.
De la bonne manière de poser les questions
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Régulier
Inscrit: 23/06/2004 17:28
Messages: 311
bonjour et merci de votre réponse.

effectivement, avec le md5; il semble qu'il me manque des fichiers :-o

Néanmoins, j'ai pas l'impression que cela corresponde aux erreurs de ma page d'accueil http://thermomixer.free.fr

Vous pensez que c'est en rapport ou bien ceux sont 2 soucis différents?

./class/module.textsanitizer.php contenu invalide
./class/xoopsform/themeform.php contenu invalide
./favicon.ico contenu invalide
./images/logo.gif contenu invalide
./install/class/cachemanager.php manquant !
./
install/class/dbmanager.php manquant !
./
install/class/index.html manquant !
./
install/class/installwizard.php manquant !
./
install/class/pathcontroller.php manquant !
./
install/common.inc.php manquant !
./
install/img/bghead.png manquant !
./
install/img/bullet-current.png manquant !
./
install/img/bullet-disabled.png manquant !
./
install/img/bullet.png manquant !
./
install/img/contexthelp.png manquant !
./
install/img/document.png manquant !
./
install/img/folder.png manquant !
./
install/img/form-input.png manquant !
./
install/img/hbar.gif manquant !
./
install/img/index.html manquant !
./
install/img/logo.png manquant !
./
install/img/no.png manquant !
./
install/img/table-caption-grey.png manquant !
./
install/img/title.png manquant !
./
install/img/wizard_bg.png manquant !
./
install/img/yes.png manquant !
./
install/include/checklogin.php manquant !
./
install/include/config.php manquant !
./
install/include/createconfigform.php manquant !
./
install/include/functions.php manquant !
./
install/include/index.html manquant !
./
install/include/install.js manquant !
./
install/include/login.php manquant !
./
install/include/modulesadmin.php manquant !
./
install/index.php manquant !
./
install/install_tpl.php manquant !
./
install/jseffects/index.html manquant !
./
install/jseffects/mootools/img/bubble-blue.gif manquant !
./
install/jseffects/mootools/img/bubble-green.gif manquant !
./
install/jseffects/mootools/img/index.html manquant !
./
install/jseffects/mootools/index.html manquant !
./
install/jseffects/mootools/mootools-1.11.js manquant !
./
install/jseffects/mootools/mootools-tips.css manquant !
./
install/jseffects/others/index.html manquant !
./
install/jseffects/others/rel.js manquant !
./
install/jseffects/prototype.js manquant !
./
install/language/english/finish.php manquant !
./
install/language/english/index.html manquant !
./
install/language/english/install.php manquant !
./
install/language/english/install2.php manquant !
./
install/language/english/mysql.lang.data.sql manquant !
./
install/language/english/welcome.php manquant !
./
install/language/french/finish.php manquant !
./
install/language/french/index.html manquant !
./
install/language/french/install.php manquant !
./
install/language/french/install2.php manquant !
./
install/language/french/mysql.lang.data.sql manquant !
./
install/language/french/welcome.php manquant !
./
install/language/index.html manquant !
./
install/makedata.php manquant !
./
install/page_configsave.php manquant !
./
install/page_configsite.php manquant !
./
install/page_dbsettings.php manquant !
./
install/page_end.php manquant !
./
install/page_langselect.php manquant !
./
install/page_modcheck.php manquant !
./
install/page_moduleinstaller.php manquant !
./
install/page_pathsettings.php manquant !
./
install/page_siteinit.php manquant !
./
install/page_start.php manquant !
./
install/page_tablescreate.php manquant !
./
install/page_tablesfill.php manquant !
./
install/page_theme.php manquant !
./
install/passwd.php manquant !
./
install/sql/index.html manquant !
./
install/sql/mysql.data.sql manquant !
./
install/sql/mysql.structure.sql manquant !
./
install/style.css manquant !
./
mainfile.dist.php contenu invalide
./modules/system/templates/blocks/system_block_online.html contenu invalide
Fin du contrôle des fichiers
.



Posté le : 07/12/2010 09:37
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Semi pro
Inscrit: 08/06/2005 17:15
De Where ?
Messages: 513
hello,

Php 4 ou 5 ?
Warningmain() [function.include]: Failed opening 'mnt/171/sdc/d/7/thermomixer/class/xoopsblock.php' for inclusion (include_path='/mnt/171/sdc/d/7/thermomixer/include:.:/usr/php4/lib/php'in /mnt/171/sdc/d/7/thermomixer/header.php on line 29


et pour le chemin, essayes avec cette ligne, tu auras moins de souci dans le futur avec les changements de serveur :
define('XOOPS_ROOT_PATH'str_replace("""/",dirname __FILE__)) );

Posté le : 07/12/2010 10:32
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Xoops accro
Inscrit: 20/02/2008 20:27
De Belgium
Messages: 2708
Citation :
./class/module.textsanitizer.php contenu invalide
./class/xoopsform/themeform.php contenu invalide

Ce deux doivent être corrigée (au moins que vous avez faites des modifications dedans)Citation :
./favicon.ico contenu invalide
./images/logo.gif contenu invalide
Probablement des adaptations au site.
Citation :
./install/* manquant !
Normale, car le dossier est renommée après installation.
Citation :
./mainfile.dist.php contenu invalide
Bizarre, probablement éditer en erreur. Pas d'influence sur le site et le problème
Citation :
./modules/system/templates/blocks/system_block_online.html contenu invalide
Probablement des adaptations au site, si non, à corriger.

Il me semble aussi que PHP 4 est utilisée. Dépendent la version de XOOPS et du modules, PHP 5 peut être requis.

Posté le : 07/12/2010 10:50

Salutations, Gerard.
PS: Excusez mon mauvais français.
De la bonne manière de poser les questions
Partager Twitter Partagez cette article sur GG+
Re: l’instruction php <?php print getcwd();?>
Régulier
Inscrit: 23/06/2004 17:28
Messages: 311
Merci à vous 2, c'est du PHP 4 avec une vieille version de xoops, de mémoire du 2.16...

vais voir ça de plus près.

Posté le : 07/12/2010 11:27
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant
(1) 2 »



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

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