Problème Script Hébergeur Image (Chevretto)

Résolu/Fermé
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 - Modifié par Warryur le 16/05/2010 à 15:58
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 - 8 févr. 2010 à 18:47
Bonjour,
Je viens de télécharger Chevretto pour créer un hébergeur d'image avec ma session dediée mais j'ai un problème avec le script.
En effet, après avoir configuré "config.php" à ma guise, ce message s'affiche :

Critital error: Invalid $DOM_SCRIPT, edit it manually in config.php

Voici donc ce que j'ai mit dans $DOM_SCRIPT :

$DOM_SCRIPT = $_SERVER['http://site.net/'];


Je vous joins aussi tout le script au cas où :

// PATH // 
/* Uhhh.. Can't touch this!. */ 
$path = dirname($_SERVER['PHP_SELF']); 
if (strlen($path)>1) { 
    define('PATH_SCRIPT', $path.'/'); 
} else { 
    define('PATH_SCRIPT', $path); 
} 

// URL // 
/* Uhhh... Uhhh.. Can't touch this!. */ 
define('URL_SCRIPT', 'http://'.$DOM_SCRIPT.PATH_SCRIPT); 

?>


WaRRyuR!
Tout le monde veut sauver la planètre mais personne ne veut sortir les poubelles...Les papillotes ont du bon ;)
A voir également:

12 réponses

avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
6 févr. 2010 à 18:32
Essaye avec ça :
$DOM_SCRIPT = 'lord-eraldhas.net'; // --> mysite.com
$PATH_SERVER = '/pubilc_html/hebergimage'; // --> /public_html
Ton site est-il bien dans un dossier "public_html" sur dans ton FTP ?
1
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
6 févr. 2010 à 18:11
Tu avais quoi à la place de $_SERVER['http://lord-eraldhas.net/'] ?
Je ne pense pas que cette ligne doit être modifiée.
0
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
Modifié par Warryur le 26/08/2010 à 17:44
Merci de ta réponse
A la place je crois que je n'avais rien du tout, quelque chose comme ça : $_SERVER['']

Voici le script en entier je me suis trompé :

<?  

/* -----------------------------------------  

  Chevereto - Script de hosting de imagenes  
  Nightly Build 1.7 (29/10/2009)  
  https://chevereto.com/  

  Released under the GPL 2.0  
  Copyright (C) 2008 by Rodolfo Berrios  
  <inbox at rodolfoberrios dot com>  

  ----------------------------------------- */  

// Language //  
define('LANG', 'en'); // en - English | es - Español | fa - Farsi | fr - Français | nl - Dutch | cn - ZH-CN (Chinese)  

define('APP_NAME', 'Site - Hebergement Images'); // Your image hosting name  
define('TAG_LINE', 'Image Hosting'); // Your tagline (for doctitles and logo)  

// Folders //  
/* If you change this, you also must change the folders name. */  
define('DIR_UP','up/');  
define('DIR_IM','images/'); // Change this to have something like /X/filename.jpg - where "X/" is the folder name.  
define('DIR_WORKING',DIR_UP.'working/');  
define('DIR_TEMP',DIR_UP.'temp/');  
define('DIR_TH','thumbs/');  

// Min-Max values -> php.ini rules the nation... //  
$max_mb = '2'; // Max. image size (Mbytes)  
$max_by = $max_mb*1048576; // (bytes)  
$max_name = '10'; // Max. file name lenght.  

// Thumbs //  
$mini_ancho = '150'; // Thumb width (pixels)  
$mini_alto = '150'; // Thumb height (pixels)  

// Resize //  
$lowres = '16'; // Min. resize value (pixels)  
$higres = '1280'; // Max. resize value (pixels)  

// Options //  
$lim_act = true; // true: Allows uploading just for your domain - false: Allows upload from anywhere (post from another website)  
$debug_mode = true; // false: Debug OFF - true: Debug ON.  
$cut_url = true; // true: Short URLs (TinyURL tr.im etc.) - false: normal url (http://mysite.com/images/image.jpg).  
$cut_url_service = 'tinyurl'; // tinyurl  
$cut_url_user = true; // If $cut_url = true -> true: Allows your users to cut their urls (preference) - false: Users can't choose to cut or not.  
$allow_over_resize = false; // true: Allows over resize images - false: Don't allow over resize.  


///////////////////////////////////////////////////////////////////  
///// DO NOT EDIT BELOW THIS - (do it if the script can't run) ////  
///////////////////////////////////////////////////////////////////  

// SERVER ///  
/* We get this values with $_SERVER. If your server doesn't resolve this values The script will not work.  
   If the script doesn't work, you must change this values to be like values in the comments (see the exaple below) */  

$DOM_SCRIPT = $_SERVER['http://site.net/']; // --> mysite.com  
$PATH_SERVER = $_SERVER['/pubilc_html/hebergimage']; // --> /public_html (pssst.. NO ENDING SLASH!)  

    // example:  
    # $DOM_SCRIPT = 'mysite.com';  
    # $PATH_SERVER = '/public_html';  
    /* Btw, you can check this values by uncommenting this: */  
    // echo 'DOM: '.$DOM_SCRIPT.' - PATH: '.$PATH_SERVER;  

// FTP MODE //  
/* Use this if you want to upload the files through ftp php (https://www.php.net/ftp This is handly when your server config don't  
   allow to upload files without CHMOD 777, like almost all the cPanel. Using this, you can forget the CHMOD ;) */  
$use_ftp = false; // true: Uses ftp to upload files - false: Upload without ftp.  
$ftp_host ='ftp.site.net'; // Change this if your ftp host is not the same as your mysite.com -- example: $ftp_host = 'ftp.mysite.com';  
$ftp_user = 'site@site.net'; // valid username.  
$ftp_pass = '*********'; // Valid password.  
// NOTICE: FTP user must have access to the script folder.  


///////////////////////////////  
/// DO NOT TOUCH BELOW THIS ///  
///////////////////////////////  

// PATH //  
/* Uhhh.. Can't touch this!. */  
$path = dirname($_SERVER['PHP_SELF']);  
if (strlen($path)>1) {  
    define('PATH_SCRIPT', $path.'/');  
} else {  
    define('PATH_SCRIPT', $path);  
}  

// URL //  
/* Uhhh... Uhhh.. Can't touch this!. */  
define('URL_SCRIPT', 'http://site.net'.$DOM_SCRIPT.PATH_SCRIPT);  

?>

WaRRyuR!
Tout le monde veut sauver la planètre mais personne ne veut sortir les poubelles...Les papillotes ont du bon ;)
0
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
6 févr. 2010 à 18:33
Je vais essayer et oui il est ici : public_html/hebergimage/
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
6 févr. 2010 à 18:35
Euh je vais essayer mais je vois pas la différence à part que tu as mis "pubilc" ...
0
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
6 févr. 2010 à 18:37
Je n'ai fait qu'un copier/coller et j'ai modifié ce qu'il fallait.
0
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
6 févr. 2010 à 18:46
Ah oui escuses moi ^^
J'ai fait ce que tu m'as dit et le message à changer pour :

Critital error: Invalid $PATH_SERVER, edit it manually in config.php
0
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
6 févr. 2010 à 18:59
Tu veux obligatoirement "Chevretto" ou je peux te trouver un autre script ?
0
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
7 févr. 2010 à 12:36
Bonjour,
Je veux bien un autre script ! Volontier ! Si il n'y a pas de design ce n'est pas grave mais je m'y connais pas super bcp en PHP.

Merci

Wr!
0
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
7 févr. 2010 à 13:43
Essaye avec ça :
$DOM_SCRIPT = $_SERVER['SERVER_NAME'];
$PATH_SERVER = $_SERVER['DOCUMENT_ROOT'];
C'est ce qu'il y a par défaut.
Si ça ne marche pas, alors je regarderai après un équivalent.
0
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
7 févr. 2010 à 19:13
Oh ! Un changement ! La page apparait avec ce message :
Warning: ftp_close() expects parameter 1 to be resource, null given in /home/lorderal/public_html/hebergimage/engine.php on line 725 en haut.

Il faut juste que je change les identifiants ?
0
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 4 497
8 févr. 2010 à 17:44
Oui, si tu actives la fonctionnalité avec FTP.
0
Warryur Messages postés 97 Date d'inscription mardi 3 novembre 2009 Statut Membre Dernière intervention 28 mai 2011 1
8 févr. 2010 à 18:47
Okay j'essayarait mercredi ;) et merci !
0