<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Chevereto Forums - Installation issue]]></title>
	<link rel="self" href="http://chevereto.com/forums/feed-atom-topic237.xml"/>
	<updated>2009-06-28T01:24:07Z</updated>
	<generator>PunBB</generator>
	<id>http://chevereto.com/forums/topic237-installation-issue.html</id>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1360.html#p1360"/>
			<content type="html"><![CDATA[<p><img src="http://chevereto.com/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[Rodolfo]]></name>
				<uri>http://chevereto.com/forums/user2.html</uri>
			</author>
			<updated>2009-06-28T01:24:07Z</updated>
			<id>http://chevereto.com/forums/post1360.html#p1360</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1357.html#p1357"/>
			<content type="html"><![CDATA[<p>ok,<br />with this parameters i have seen the error ;-) thx</p><p>Now its gone, problem was that ftp upload on true was, but i have change the settings.</p><p>I thank for help</p>]]></content>
			<author>
				<name><![CDATA[fl4t]]></name>
				<uri>http://chevereto.com/forums/user449.html</uri>
			</author>
			<updated>2009-06-27T11:45:15Z</updated>
			<id>http://chevereto.com/forums/post1357.html#p1357</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1355.html#p1355"/>
			<content type="html"><![CDATA[<p>lol, use this:<br /></p><div class="codebox"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div>]]></content>
			<author>
				<name><![CDATA[Rodolfo]]></name>
				<uri>http://chevereto.com/forums/user2.html</uri>
			</author>
			<updated>2009-06-27T04:26:18Z</updated>
			<id>http://chevereto.com/forums/post1355.html#p1355</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1352.html#p1352"/>
			<content type="html"><![CDATA[<p>Hello,<br />i have the same problem</p><div class="quotebox"><blockquote><p>error_reporting(E_ERROR);</p></blockquote></div><p>I have this type into engine.php</p><p>but i doesnt become a errorcode</p><p>It show fine, but when I upload an image then he work and at the end i doesn´t see a pic because a yellow box without a pic</p><p>You can tested it self: <a href="http://picupload.nitro4gamer.com/">http://picupload.nitro4gamer.com/</a></p><p>Here the screenshot, when the image is uploaded:<br /><span class="postimg"><img src="http://picupload.nitro4gamer.com/image.PNG" alt="http://picupload.nitro4gamer.com/image.PNG" /></span></p><p>I hope you can help me</p>]]></content>
			<author>
				<name><![CDATA[fl4t]]></name>
				<uri>http://chevereto.com/forums/user449.html</uri>
			</author>
			<updated>2009-06-26T15:22:52Z</updated>
			<id>http://chevereto.com/forums/post1352.html#p1352</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1329.html#p1329"/>
			<content type="html"><![CDATA[<p>I&#039;ll try to help with my french language.</p><p>tux60, Rodolfo a besoin de savoir l&#039;erreur exacte, donc nul ne sert de détailler ton config.php, active juste le debug va sur ta page et note le problème <img src="http://chevereto.com/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[Gomah]]></name>
				<uri>http://chevereto.com/forums/user423.html</uri>
			</author>
			<updated>2009-06-14T15:12:04Z</updated>
			<id>http://chevereto.com/forums/post1329.html#p1329</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1318.html#p1318"/>
			<content type="html"><![CDATA[<p>Change this: </p><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$debug_mode</span><span style="color: #339933;">==</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">E_ERROR</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span></pre></div><p>to this: </p><div class="codebox"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/error_reporting"><span style="color: #990000;">error_reporting</span></a><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">E_ERROR</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div><p>And paste the fucking errors that the php sends.</p>]]></content>
			<author>
				<name><![CDATA[Rodolfo]]></name>
				<uri>http://chevereto.com/forums/user2.html</uri>
			</author>
			<updated>2009-06-12T03:07:37Z</updated>
			<id>http://chevereto.com/forums/post1318.html#p1318</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1312.html#p1312"/>
			<content type="html"><![CDATA[<p>I upload files in: httpdocs/pic, here is my config.php<br /></p><div class="codebox"><pre><code>&lt;?

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

  Chevereto - Script de hosting de imagenes
  Nightly Build 1.5 (31/05/2009)
  http://www.chevereto.com/

  Released under the GPL 2.0
  Copyright (C) 2008 by Rodolfo Berrios
  &lt;inbox at rodolfoberrios dot com&gt;

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

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

define(&#039;APP_NAME&#039;, &#039;Demo Chevereto&#039;); // Your image hosting name
define(&#039;TAG_LINE&#039;, &#039;Image Hosting&#039;); // Your tagline (for doctitles and logo)

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

// Min-Max values //
$max_mb = &#039;2.0&#039;; // Max. image size (Mbytes)
$max_by = $max_mb*1048576; // (bytes)
$max_name = &#039;10&#039;; // Max. file name lenght.

// Thumbs //
$mini_ancho = &#039;150&#039;; // Thumb width (pixels)
$mini_alto = &#039;150&#039;; // Thumb height (pixels)

// Resize //
$lowres = &#039;16&#039;; // Min. resize value (pixels)
$higres = &#039;1280&#039;; // 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 = &#039;snurl&#039;; // tinyurl | tr.im | snurl
$cut_url_user = true; // If $cut_url = true -&gt; true: Allows your users to cut their urls (preference) - false: Users can&#039;t choose to cut or not.
$allow_over_resize = false; // true: Allows over resize images - false: Don&#039;t allow over resize.


///////////////////////////////////////////////////////////////////
///// DO NOT EDIT BELOW THIS - (do it if the script can&#039;t run) ////
///////////////////////////////////////////////////////////////////

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

$DOM_SCRIPT = &#039;mysite.fr&#039;; // --&gt; mysite.com
$PATH_SERVER = &#039;/httpdocs/pic&#039;;  // --&gt; /public_html

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

// FTP MODE //
/* Use this if you want to upload the files through ftp php (http://php.net/ftp). This is handly when your server config don&#039;t
   allow to upload files withput chmod 777. Using this, you can forget the chmod ;) */
$use_ftp = true; // true: Uses ftp to upload files - false: Upload without ftp.
$ftp_host = $DOM_SCRIPT; // Change this if your ftp host is not the same as your mysite.com -- example: $ftp_host = &#039;ftp.mysite.com&#039;;
$ftp_user = &#039;okbapics&#039;; // valid username.
$ftp_pass = &#039;passsss&#039;; // Valid password.
// NOTICE: FTP user must have access to the script folder.


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

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

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

?&gt;</code></pre></div><p>My engine.php:<br /></p><div class="codebox"><pre><code>&lt;?

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

  Chevereto - Script de hosting de imagenes
  Nightly Build 1.5 (31/05/2009)
  http://www.chevereto.com/

  Released under the GPL 2.0
  Copyright (C) 2008 by Rodolfo Berrios
  &lt;inbox at rodolfoberrios dot com&gt;

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

// VERSION DEL SCRIPT
define(&#039;SC_VERSION&#039;,&#039;NB1.5&#039;);

// Config
require(&#039;config.php&#039;);

if ($debug_mode==false) { error_reporting(0); } else { error_reporting(E_ERROR); }

// Critital error box
$o_errorbox = &#039;&lt;div style=&quot;background: #F00; color: #FFF; font-family: Courier, monospace; font-weight: bold; padding: 1em; text-align: center;&quot;&gt;&#039;;
$c_errorbox = &#039;&lt;/div&gt;&#039;;

// CH-CH-Check config //
if ($use_ftp == false) {
    if (!is_writable(DIR_IM)) {
        echo $o_errorbox.&#039;Critital error: Chevereto can\&#039;t upload files. Please enable FTP mode in config.php&#039;.$c_errorbox;
        die();
    }
} else {
    $check_ftp_con = ftp_connect($ftp_host);
    $check_ftp_log = ftp_login($check_ftp_con, $ftp_user, $ftp_pass);
    if (!$check_ftp_con || !$check_ftp_log) {
        echo $o_errorbox.&#039;Critital error: Wrong FTP values in config.php&#039;.$c_errorbox;
        die();
    }
}

// DOCTITLE
define(&#039;ESP_TITULO&#039;,&#039; | &#039;);

// VARIABLES
$lup = $_FILES[&#039;fileup&#039;];
$remota = $_POST[&#039;remota&#039;];
$resizf = str_replace(&#039; &#039;, &#039;&#039;, $_POST[&#039;resize&#039;]); // Resize via POST
$url = $_GET[&#039;url&#039;];
$urlrez = $_GET[&#039;urlrez&#039;];
$v = $_GET[&#039;v&#039;];  if ($v==&#039;.htaccess&#039;) { unset($v); $v=&#039;&#039;; }
$page = $_GET[&#039;p&#039;];
$view_fld = $_GET[&#039;folder&#039;];
$resizr = $_GET[&#039;ancho&#039;]; // Resize via GET

// SHORT URL SERVICE
switch($cut_url_service) {
    case &#039;tinyurl&#039;:
        $tiny_api = &#039;http://tinyurl.com/api-create.php?url=&#039;;
        $tiny_service = &#039;TinyURL&#039;;
        break;
    case &#039;tr.im&#039;:
        $tiny_api = &#039;http://api.tr.im/api/trim_simple?url=&#039;;
        $tiny_service = &#039;tr.im&#039;;
        break;
    case &#039;snurl&#039;:
        $tiny_api = &#039;http://snurl.com/site/snip?r=simple&amp;link=&#039;;
        $tiny_service = &#039;Snurl&#039;;
        break;
    default:
        $tiny_api = &#039;http://tinyurl.com/api-create.php?url=&#039;;
        $tiny_service = &#039;TinyURL&#039;;
        break;
}

// LANGUAGE
include(&#039;lang/&#039;.LANG.&#039;.php&#039;);
if (LANG!==&#039;es&#039;) { $lang = LANG; }

// DE DONDE VIENES?
$referer = parse_url($_SERVER[&#039;HTTP_REFERER&#039;]);
if (empty($referer[&#039;host&#039;]) &amp;&amp; !isset($referer[&#039;host&#039;])) {
    $referido = $DOM_SCRIPT;
} else {
    $referido = $referer[&#039;host&#039;];
}

if (isset($remota)) {
    $ref3 = explode(&#039;?&#039;,$ref2); // img.godlike.cl?urlrez=http:
    $refok = $ref3[&#039;0&#039;];
} else {
    $refok = $ref2;
}

// Limite de actividad
if (isset($lup) || isset($remota)) {
    if ($referido !== $DOM_SCRIPT &amp;&amp; $lim_act==true) {
        if (!isset($url)) {
            echo $o_errorbox.ERROR_REF.$c_errorbox;
            die;
        }
    }
}

// EL REZ
if (isset($resizr)) {
        $resize = str_replace(&#039; &#039;, &#039;&#039;, $resizr);
    } else {
        $resize = str_replace(&#039; &#039;, &#039;&#039;, $resizf);
    }

// SET Modo default
$modo = 1;

// MANEJEMOS LA RUP
if (isset($url)) {
        $rup = str_replace(&#039; &#039;, &#039;&#039;, $url);
    } else {
        $rup = str_replace(&#039; &#039;, &#039;&#039;, $remota);
    }

// DETERMINAMOS QUE MOSTRAMOS Y HACEMOS
    //  1 = Mostrar formulario.
    //  2 = Muetsra el visualizador
    //  3 = Sube un archivo
    //  4 = muestra la pag del error de redimensionamiento
    //  5 = Muestra una pag. estatica
    //  spit = devuelve los mensajes de error.

// Modo pagina
if (isset($page)) {
    unset($modo);
    $modo = 5;
    // haga el switch
    switch ($page) {
        // Los errores
        case &#039;400&#039;:
            $h1 = TITLE_400;
            $explained = DESC_400;
        break;
        case &#039;401&#039;:
            $h1 = TITLE_401;
            $explained = DESC_401;
        break;
        case &#039;403&#039;:
            $h1 = TITLE_403;
            $explained = DESC_403;
        break;
        case &#039;404&#039;:
            $h1 = TITLE_404;
            $explained = DESC_404;
        break;
        case &#039;500&#039;:
            $h1 = TITLE_500;
            $explained = DESC_500;
        case &#039;503&#039;:
            $h1 = TITLE_503;
            $explained = DESC_503;
        break;
        // Los directorios
        case &#039;up&#039;:
            $h1 = TITLE_DIR_NO;
            $explained = DESC_DIR_NO;
        break;
        case &#039;up/temp&#039;:
            $h1 = TITLE_DIR_NO;
            $explained = DESC_DIR_NO;
        break;
        case &#039;up/working&#039;:
            $h1 = TITLE_DIR_NO;
            $explained = DESC_DIR_NO;
        break;
        case &#039;images&#039;:
            $h1 = TITLE_DIR_NO;
            $explained = DESC_DIR_NO;
        break;
        default:
            $h1 = TITLE_404;
            $explained = DESC_404;
            $page = &#039;generico&#039;;
        break;
    }
    $titulo = $h1.ESP_TITULO;
}

// Si hay posteo / urleo
if (isset($lup) || isset($remota) || isset($url)) {
    if ($lup[size] ==! null || !empty($remota) || !empty($url)) {
        unset($modo);
        $modo = 3;
    } else {
        unset($modo);
        $modo = 1;
        $spit = true;
        $errormsg = FORM_INCOMPLETE;
        $titulo = TITLE_FORM_INCOMPLETE.ESP_TITULO;
    }
}

// SI HAY DOBLE POSTEO...
if (!empty($rup) &amp;&amp; !empty($lup[&#039;type&#039;])) {
    unset($modo);
    $modo = 1;
    $spit = true;
    $errormsg = DOBLE_POSTED;
    $titulo = FATAL_ERROR_TITLE.ESP_TITULO;
}

// Si hay urlrez, seteamos el modo rr
if (isset($urlrez)) {
    if (!empty($urlrez)) {
        // veamos la extension...
        $urlrez3 = substr($urlrez, -3);
        if ($urlrez3==&#039;jpg&#039; || $urlrez3==&#039;peg&#039; || $urlrez3==&#039;gif&#039; || $urlrez3==&#039;bmp&#039; || $urlrez3==&#039;png&#039;) {
            unset($modo);
            $modo = &#039;rr&#039;;
            $titulo = ENTER_WIDTH.ESP_TITULO;
        } else {
            $spit = true;
            $errormsg = INVALID_EXT;
            $titulo = INVALID_TITLE.ESP_TITULO;
        }
    } else {
        $spit = true;
        $errormsg = NOTHING_TO_RESIZE;
        $titulo = INPUT_ERROR.ESP_TITULO;
    }
}

// Si hay V, seteamos el modo 2
if (isset($v)) {
    if (!empty($v)) {
        unset($modo);
        $modo = 2;
        $name = $v;
    } else {
        $spit = true;
        $errormsg = NO_ID;
        $titulo = NO_ID_TITLE.ESP_TITULO;
    }
}

$string = $rup.$urlrez;

if (preg_match(&quot;@&quot;.$DOM_SCRIPT.&quot;/(site-img|js)/@&quot;, $string)) {
    unset($modo);
    $modo = 1;
    $spit = true;
    $errormsg = NO_SELF_UPLOAD;
    $titulo = CANT_UPLOAD_TITLE.ESP_TITULO;    
}

/* HAGAMOS EL UPLOADING ---MODO 3--- */
if ($modo==3) {

    // Primer filtro (LOCAL)
    function checklocal($lup) {    
        if (preg_match(&quot;@image/(gif|pjpeg|jpeg|png|x-png|bmp)$@&quot;, $lup[&#039;type&#039;])) { return true; }
        if ($lup[&#039;size&#039;]&lt;$max_by) { return true; }
        return false;
    }
    
    // Filtro (REMOTO)
    function checkremota($rup) {
        if (!empty($rup)) {
            $rup3 = substr($rup, -3);
            if ($rup3==&#039;bmp&#039;) {
                return true;
            } else {
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL,$rup); 
                curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); 
                curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,100);
                $result = curl_exec($ch); 
                $imgstr = imagecreatefromstring($result);
                curl_close($ch);
                if ($imgstr==true) {
                    return true;
                }
                imagedestroy($imgstr);
            }
        }
        return false;
    }

    if (checklocal($lup) || checkremota($rup)) {
        
        // FTP
        if ($use_ftp==true) {
            $FTP_connect = ftp_connect($ftp_host);
            $FTP_login = ftp_login($FTP_connect, $ftp_user, $ftp_pass);
                    
            // Veamos si conectamos..
            if (!$FTP_connect || !$FTP_login) {
                echo $o_errorbox.CANT_RUN.$c_errorbox;
                die();
            }
            ftp_pasv($FTP_connect, true);
            ftp_chdir($FTP_connect, PATH_SERVER);
        }
        
        // LA SUBIDA LOCAL
        if ($lup[&#039;size&#039;] ==! null) {
            
            if ($use_ftp==true) {
                ftp_put($FTP_connect, &#039;./&#039;.DIR_WORKING.$lup[&#039;name&#039;], $lup[&#039;tmp_name&#039;], FTP_BINARY);
            } else {
                copy($lup[&#039;tmp_name&#039;], DIR_WORKING.$lup[&#039;name&#039;]);
            }
            
            $tmp_name = $lup[name]; // Temp name
        }
        // LA SUBIDA REMOTA
        if (!empty($rup)) {
            // Veamos si viene del resize
            $grabname = substr(&quot;$rup&quot;, -21); // up/temp/000000000.jpg
            if (file_exists($grabname)) {
                $tmp_name = substr(&quot;$rup&quot;, -13);
                rename($grabname, DIR_WORKING.$tmp_name);
            } else {
                // GET A NAME
                $partes = explode(&#039;/&#039;, $rup);
                $rname = $partes[count($partes) - 1];        
                // Conectando
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL,$rup);
                curl_setopt($ch, CURLOPT_HEADER, false);
                curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                set_time_limit(300); // 5 Min. PHP
                curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,300); // 5 Min.cURL
                curl_setopt($ch, CURLOPT_USERAGENT, &#039;Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6&#039;);
                
                $rup_parse = parse_url($rup);
                $rup_temp = substr($rup_parse[&#039;path&#039;], 1);
                
                if (preg_match(&quot;@&quot;.DIR_TEMP.&quot;@&quot;, $rup_temp)) {
                    $delete_temp = true;
                }
                
                if ($use_ftp==true) {
                    ftp_put($FTP_connect, DIR_WORKING.$rname, &#039;site-img/canvas.gif&#039;, FTP_BINARY);
                    ftp_chmod($FTP_connect, 0777, DIR_WORKING.$rname);
                }
                
                $out = fopen(DIR_WORKING.$rname, &#039;wb&#039;);
                curl_setopt($ch, CURLOPT_FILE, $out);
                // grab
                $resultado = curl_exec($ch);
                fclose($out);
                curl_close($ch);
                $tmp_name = $rname;
                }
        } // remota
            
        // Manejemos la temporal
        $handlework = DIR_WORKING.$tmp_name;
        
        $info = getimagesize($handlework);
        
        // Otras lecturas
        $statinfo = @stat($handlework);
        $tamano = $statinfo[&#039;size&#039;]; // BYTES
        $tamano_kb = round($tamano/1024,2);
        $mimosa = $info[&#039;mime&#039;]; // SI POR LA CONCHETUMADRE
        $ancho = $info[0]; // Fijate en esto!
        $alto = $info[1];
        $mime = $info[&#039;mime&#039;];

        if (!$ancho || !$alto || !$mime || !$tamano) { // Fallan esas leseras
            $invalida = true;
            $inv_txt = INVALID_CORRUPT;
            $no = true; 
        }
        if ($tamano &gt; $max_by) { // Muy pesada
            $peso = true;
            $no = true;
        }
            
        // Manejemos el mime tipe para los &quot;amigos&quot; que usan otras extensiones...
        if ($mimosa==&quot;image/gif&quot;) { $exten = &#039;gif&#039;; }
        if ($mimosa==&quot;image/pjeg&quot;) { $exten = &#039;jpg&#039;; }
        if ($mimosa==&quot;image/jpeg&quot;) { $exten = &#039;jpg&#039;; }
        if ($mimosa==&quot;image/png&quot;) { $exten = &#039;png&#039;; }
        if ($mimosa==&quot;image/bmp&quot;) { $exten = &#039;bmp&#039;; }
        
        if (!isset($no)) {
            $up = true;
        }
        
        if ($no==true) {
            // Eliminamos la imagen del up/working..
            if ($use_ftp==true) {
                ftp_delete($FTP_connect, $handlework);
            } else {
                unlink($handlework);
            }
            unset($modo);
            $spit = true;
            if ($peso==true) {
                $pes_txt = TOO_HEAVY.&#039; (&#039;.$max_mb.&#039;MB max.)&#039;;
            }
            if ($peso==true &amp;&amp; $invalida==true) {
                $ademas = &#039; &#039;.ANDTEXT.&#039; &#039;;
            }
        } // no!
        
        // Hay subida compadre...
        if ($up) {
            
            // Limpiemos el nombre
            // --&gt; Tambien me quedo &quot;super rico&quot;.
            $lower = strtolower($tmp_name); // Solo minusculas
            $alnum = ereg_replace(&quot;[^[:alnum:]]&quot;,&quot;&quot;,$lower); // Solo alfanumericos
            if ($exten==peg) { unset($exten); $exten = &#039;jpg&#039;; }
            $clear = substr_replace($alnum, &#039;&#039;, -3); // sin extension ni punto
            // Cortemos el nombre (si hace falta)
            $conteo = strlen($clear);
            
            // Random
            $ch_1 = chr(rand(ord(&quot;a&quot;), ord(&quot;z&quot;)));
            $ch_2 = chr(rand(ord(&quot;z&quot;), ord(&quot;a&quot;)));
            
            if ($conteo&gt;$max_name) {
                $renombre = substr(&quot;$clear&quot;, 0, $max_name);
            } else {
                if (empty($clear)) {
                    $renombre = $ch_1.$ch_2.$ch_1;
                } else {
                    $renombre = $clear;
                }
            }
                
            // Si existe el nombre, renombramos el que estamos subiendo.
            if (file_exists(DIR_IM.$renombre.&#039;.&#039;.$exten)) {
                if ($conteo&gt;$totalchars) { 
                    // Si el nombre es muy largo, corta
                    $renombra = substr(&quot;$renombre&quot;, 0, $max_name-4); // 4 -&gt; El remplazo de mas abajo            
                } else { 
                    $renombra = $renombre;    
                }
                // Vamos a darle caracteres aleatorios.            
                $name = $renombra.$ch_1.$ch_2.$ch_1.&#039;.&#039;.$exten;
            } else { 
                $name = $renombre.&#039;.&#039;.$exten;
            }        
            
            // Setiemos el redimensionamiento
            if (!empty($resize)) {                
                if(preg_match(&quot;/[^0-9\.]/&quot;,$resize)) { // Queremos solo numeros!
                    $errormsg = JUST_NUMBERS;
                    $titulo = UPLOADED_BUT_NOT_RESIZED.ESP_TITULO;
                    $spit = true;
                    $red = 2;
                } else {
                    if($allow_over_resize==false &amp;&amp; $resize&gt;$ancho) {
                        $errormsg = OVER_RESIZE_ERROR.&#039; (&#039;.$ancho.&#039;px)&#039;;
                        $titulo = UPLOADED_BUT_NOT_RESIZED.ESP_TITULO;
                        $spit = true;
                        $red = 2;                
                    } else {
                        if ($resize&lt;=$higres &amp;&amp; $resize&gt;=$lowres) {
                            $new_alto = round($resize*$alto/$ancho);
                            // Seteamos el nuevo alto y ancho
                            unset($ancho);
                            unset($alto);
                            $ancho = $resize;
                            $alto = $new_alto;
                            $red = 1;
                        } else {
                            $errormsg = RESIZE_LIMITS.&#039; &#039;.$lowres.&#039; &#039;.ANDTEXT.&#039; &#039;.$higres.&#039; (pixels)&#039;;
                            $titulo = UPLOADED_BUT_NOT_RESIZED.ESP_TITULO;
                            $spit = true;
                            $red = 2;
                        }
                    }
                }
            }
            
            // Target -&gt; Archivo a redimensionar (handlework)
            // Archivo -&gt; Archivo work (DIR_WORKING.$name)
            function redimensionar($tipo,$target,$archivo,$ancho_n,$alto_n) {
                global $use_ftp, $FTP_connect;
                            
                if ($tipo==gif) {
                    $src = imagecreatefromgif($target);
                }
                if ($tipo==png) {
                    $src = imagecreatefrompng($target);
                }
                if ($tipo==jpg) {
                    $src = imagecreatefromjpeg($target);
                }
                        
                $era_x = imageSX($src);
                $era_y = imageSY($src);
                $destino = imagecreatetruecolor($ancho_n,$alto_n);
                
                // gif
                if ($tipo==gif) {
                    $transparente = imagecolortransparent($src);
                    imagepalettecopy($src, $destino);
                    imagefill($destino, 0, 0, $transparente);
                    imagecolortransparent($destino, $transparente);
                    imagetruecolortopalette($destino, true, 256);
                } else {
                    imagecolortransparent($destino, imagecolorallocate($destino, 0, 0, 0) );
                }            
                
                imagealphablending($destino, false);
                imagesavealpha($destino, true);
                
                imagecopyresampled($destino,$src,0,0,0,0,$ancho_n,$alto_n,$era_x,$era_y);
                
                // Si esta por FTP, otorgar permiso
                if ($use_ftp==true) { ftp_chmod($FTP_connect, 0777, PATH_SERVER.$archivo); }
                
                if ($tipo==gif) { imagegif($destino, $archivo); }
                if ($tipo==png) { imagepng($destino, $archivo); }
                if ($tipo==jpg) { imagejpeg($destino, $archivo, 86); }
                if ($tipo==bmp) { imagewbmp($destino, $archivo); }
                
                imagedestroy($destino); 
                imagedestroy($src);    
                
                // Si esta por FTP, quitar permiso
                if ($use_ftp==true) { ftp_chmod($FTP_connect, 0644, PATH_SERVER.$archivo); }
                
            } // La funcion
            
            if (empty($resize)) {
                // Haga como si nada...
                if ($use_ftp==true) {
                    ftp_put($FTP_connect, DIR_IM.$name, $handlework, FTP_BINARY); // COPIA -&gt; ADONDE, QUEARCHIVO
                    ftp_put($FTP_connect, DIR_TH.$name, $handlework, FTP_BINARY); // Lo debemos hacer para que exista un archivo en thumbs para chmodear.
                } else {
                    copy($handlework, DIR_IM.$name);
                }
                $titulo = UPLOAD_OK.ESP_TITULO;
            }
            if ($red==1) {
                // Correr la funcion redimensionamiento *img en el working
                
                if ($use_ftp==true) {
                    ftp_put($FTP_connect, DIR_WORKING.$name, $handlework, FTP_BINARY);
                }
                
                redimensionar($exten,$handlework,DIR_WORKING.$name,$ancho,$alto);
                        
                    // Mover la redimensionada
                    if ($use_ftp==true) {
                        ftp_put($FTP_connect, DIR_IM.$name, DIR_WORKING.$name, FTP_BINARY);
                        ftp_put($FTP_connect, DIR_TH.$name, DIR_WORKING.$name, FTP_BINARY);
                    } else {
                        copy(DIR_WORKING.$name, DIR_IM.$name);
                    }
                    
                    $titulo = UPLOAD_AND_RESIZED.ESP_TITULO;
                                
                // Borramos
                if ($use_ftp==true) {
                    ftp_delete($FTP_connect, DIR_WORKING.$name);
                    if($delete_temp) { ftp_delete($FTP_connect, $rup_temp); }
                } else {
                    unlink(DIR_WORKING.$name);
                    if($delete_temp==true) { unlink($rup_temp); }
                }

            }
            if ($red==2) {
                // No red correcto, renombra la temp (vea si esta)
                $tname = DIR_TEMP.$name;            
                if (file_exists(DIR_TEMP.$name)) {
                    $numletra = ereg_replace(&quot;[^[:alnum:]]&quot;,&quot;&quot;,$name);
                    $cleartemp = substr_replace($numletra, &#039;&#039;, -3); // sin extension ni punto
                    $randtemp = rand(000,999);
                    $tname = DIR_TEMP.$cleartemp.$randtemp.&#039;.&#039;.$exten;                        
                } else {
                    $tname = DIR_TEMP.$name;
                }
                if ($use_ftp==true) {
                    ftp_put($FTP_connect, $tname, $handlework, FTP_BINARY);
                } else {
                    rename($handlework, $tname);
                }
                $URLrdn = URL_SCRIPT.$tname;
                // Setea el modo 4!
                unset($modo);
                $modo = 4;
            }
            
            // si se sube algo creemos el thumb
            if ((empty($resize) || $red==1)) {
                // thumb
                if ($ancho&gt;$alto) {
                    unset($mini_alto);
                    $mini_alto = round($mini_ancho*$alto/$ancho);    
                }
                if ($ancho&lt;$alto) {
                    unset($mini_ancho);
                    $mini_ancho = round($mini_alto*$ancho/$alto);
                }
                // Thumb
                redimensionar($exten,$handlework,DIR_TH.$name,$mini_ancho,$mini_alto);    
                // Chao work
                if ($use_ftp==true) {
                    ftp_delete($FTP_connect, $handlework);
                } else {
                    unlink($handlework);
                }                
            }
            
        }
    
    } else { // Check local + remote 
        unset($modo);
        $modo = 1;
        $spit = true;
        $errormsg = CRITIC_ERROR_INPUT;
        $titulo = ERROR_UPLOADING.ESP_TITULO;
    }
        
}

if ($modo==2 || $modo==3) {
    // INFORMACION (ANCHO, ALTO y PESO)
    if ($modo==2) {
        if ($_GET[&#039;v&#039;]) {
            $id = $_GET[&#039;v&#039;];
            $imagen = DIR_IM.$id;
            if (file_exists($imagen)==true) {
                $title = SEEING.&#039; &#039;.$id; 
                $titulo = $id.&#039; &#039;.AT.&#039; &#039;;
                $info = getimagesize($imagen); //Obtenemos la informacion
                $statinfo = @stat($imagen);
                    $ancho = $info[0];
                    $alto = $info[1];    
                    $mime = $info[&#039;mime&#039;]; 
                        $tamano = $statinfo[&#039;size&#039;]; //Bytes
                        $tamano_kb = round($tamano*0.0009765625, 2);
                    $canales = $info[&#039;channels&#039;];
            } else {
                unset($modo);
                $modo = 1;
                $spit = true;
                $errormsg = NOT_EXISTS;
                $titulo = NOT_EXISTS_TITLE.ESP_TITULO;
            }
        }
    }
    
    // LAS URL
    $URLimg = URL_SCRIPT.DIR_IM.$name;
    $URLthm = URL_SCRIPT.DIR_TH.$name;
    $URLvim = URL_SCRIPT.&#039;?v=&#039;.$name;
    $URLshr = $URLvim; // Para no cambiar mas abajo
    $eu_img = urlencode($URLimg);
    
    // Short URL using services like TinyURL.com        
    function cortar_url($url) {    
        global $tiny_api;
        $tiny = $tiny_api.$url;
        $chtny = curl_init();
        curl_setopt($chtny, CURLOPT_URL, $tiny);
        curl_setopt($chtny, CURLOPT_RETURNTRANSFER, 1);
        $ShortURL = curl_exec($chtny);
        curl_close($chtny);
        return $ShortURL;
    }
    
    // SI esta habilitado cortar url.. hagamolo.
    if ($cut_url==true) {
        
        // Si se da a elegir al usuario, cortemos si el quiere.
        if ($cut_url_user==true) {
            // El usuario quiere cortar url...
            if (isset($_COOKIE[&#039;prefurl&#039;])) {
                $ShortURL = cortar_url($URLimg);
            }
        // Cortamos si o si ya que la prefencia es de script y no de usuario.
        } else {
            $ShortURL = cortar_url($URLimg);
        }

    }

}

// Esto debria preguntar si hay ftp abierto y ahi cerrar.
if ($use_ftp==true) {
    ftp_close($FTP_connect);
}

if (!isset($titulo)) {
    $titulo = WELCOME;
}

?&gt;</code></pre></div><p>And my phpinfo: <a href="http://tinyhost.sportcadeaux.com/info.php">here</a></p><p>thank&#039;s</p>]]></content>
			<author>
				<name><![CDATA[tux60]]></name>
				<uri>http://chevereto.com/forums/user347.html</uri>
			</author>
			<updated>2009-06-11T16:18:57Z</updated>
			<id>http://chevereto.com/forums/post1312.html#p1312</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1310.html#p1310"/>
			<content type="html"><![CDATA[<p>Hi, i don&#039;t understand what you say.<br />&nbsp; &nbsp; <br />I found nothing on the forumabout&nbsp; to force the debug mode.</p>]]></content>
			<author>
				<name><![CDATA[tux60]]></name>
				<uri>http://chevereto.com/forums/user347.html</uri>
			</author>
			<updated>2009-06-11T15:49:20Z</updated>
			<id>http://chevereto.com/forums/post1310.html#p1310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1306.html#p1306"/>
			<content type="html"><![CDATA[<p>Dude, send the debug. Look in the forum... force the debug in engine.php</p>]]></content>
			<author>
				<name><![CDATA[Rodolfo]]></name>
				<uri>http://chevereto.com/forums/user2.html</uri>
			</author>
			<updated>2009-06-10T16:44:00Z</updated>
			<id>http://chevereto.com/forums/post1306.html#p1306</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1305.html#p1305"/>
			<content type="html"><![CDATA[<p>No one???!!!</p>]]></content>
			<author>
				<name><![CDATA[tux60]]></name>
				<uri>http://chevereto.com/forums/user347.html</uri>
			</author>
			<updated>2009-06-10T10:27:25Z</updated>
			<id>http://chevereto.com/forums/post1305.html#p1305</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1295.html#p1295"/>
			<content type="html"><![CDATA[<p>I have already do it, look:<br /></p><div class="quotebox"><cite>tux60 wrote:</cite><blockquote><p>Yes i have try but always the yellow square.<br />&nbsp; &nbsp; <br />in my ftp I do upload my files in folder named: /httpdocs<br />Here is my new config.php: <br /></p><div class="codebox"><pre><code>&lt;?

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

  Chevereto - Script de hosting de imagenes
  Nightly Build 1.5 (31/05/2009)
  http://www.chevereto.com/

  Released under the GPL 2.0
  Copyright (C) 2008 by Rodolfo Berrios
  &lt;inbox at rodolfoberrios dot com&gt;

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

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

define(&#039;APP_NAME&#039;, &#039;Demo Chevereto&#039;); // Your image hosting name
define(&#039;TAG_LINE&#039;, &#039;Image Hosting&#039;); // Your tagline (for doctitles and logo)

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

// Min-Max values //
$max_mb = &#039;2.0&#039;; // Max. image size (Mbytes)
$max_by = $max_mb*1048576; // (bytes)
$max_name = &#039;10&#039;; // Max. file name lenght.

// Thumbs //
$mini_ancho = &#039;150&#039;; // Thumb width (pixels)
$mini_alto = &#039;150&#039;; // Thumb height (pixels)

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

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


///////////////////////////////////////////////////////////////////
///// DO NOT EDIT BELOW THIS - (do it if the script can&#039;t run) ////
///////////////////////////////////////////////////////////////////

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

$DOM_SCRIPT = $_SERVER[&#039;SERVER_NAME&#039;]; // --&gt; mysite.com
$PATH_SERVER = $_SERVER[&#039;/httpdocs&#039;]; // --&gt; /public_html

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

// FTP MODE //
/* Use this if you want to upload the files through ftp php (http://php.net/ftp). This is handly when your server config don&#039;t
   allow to upload files withput chmod 777. Using this, you can forget the chmod ;) */
$use_ftp = true; // true: Uses ftp to upload files - false: Upload without ftp.
$ftp_host = $DOM_SCRIPT; // Change this if your ftp host is not the same as your mysite.com -- example: $ftp_host = &#039;ftp.mysite.com&#039;;
$ftp_user = &#039;ftpuser&#039;; // valid username.
$ftp_pass = &#039;ftppass&#039;; // Valid password.
// NOTICE: FTP user must have access to the script folder.


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

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

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

?&gt;</code></pre></div><p>thank&#039;s</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[tux60]]></name>
				<uri>http://chevereto.com/forums/user347.html</uri>
			</author>
			<updated>2009-06-07T09:49:18Z</updated>
			<id>http://chevereto.com/forums/post1295.html#p1295</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1292.html#p1292"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>tux60 wrote:</cite><blockquote><p>I don&#039;tunderstand. How to know it?</p></blockquote></div><p>You must enable the debug mode! in config.php</p>]]></content>
			<author>
				<name><![CDATA[Rodolfo]]></name>
				<uri>http://chevereto.com/forums/user2.html</uri>
			</author>
			<updated>2009-06-06T20:17:45Z</updated>
			<id>http://chevereto.com/forums/post1292.html#p1292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1290.html#p1290"/>
			<content type="html"><![CDATA[<p>I don&#039;tunderstand. How to know it?</p>]]></content>
			<author>
				<name><![CDATA[tux60]]></name>
				<uri>http://chevereto.com/forums/user347.html</uri>
			</author>
			<updated>2009-06-06T05:34:29Z</updated>
			<id>http://chevereto.com/forums/post1290.html#p1290</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1289.html#p1289"/>
			<content type="html"><![CDATA[<p>i need to know the debug!</p>]]></content>
			<author>
				<name><![CDATA[Rodolfo]]></name>
				<uri>http://chevereto.com/forums/user2.html</uri>
			</author>
			<updated>2009-06-06T00:37:05Z</updated>
			<id>http://chevereto.com/forums/post1289.html#p1289</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Installation issue]]></title>
			<link rel="alternate" href="http://chevereto.com/forums/post1285.html#p1285"/>
			<content type="html"><![CDATA[<p>Yes i have try but always the yellow square.<br />&nbsp; &nbsp; <br />in my ftp I do upload my files in folder named: /httpdocs<br />Here is my new config.php: <br /></p><div class="codebox"><pre><code>&lt;?

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

  Chevereto - Script de hosting de imagenes
  Nightly Build 1.5 (31/05/2009)
  http://www.chevereto.com/

  Released under the GPL 2.0
  Copyright (C) 2008 by Rodolfo Berrios
  &lt;inbox at rodolfoberrios dot com&gt;

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

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

define(&#039;APP_NAME&#039;, &#039;Demo Chevereto&#039;); // Your image hosting name
define(&#039;TAG_LINE&#039;, &#039;Image Hosting&#039;); // Your tagline (for doctitles and logo)

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

// Min-Max values //
$max_mb = &#039;2.0&#039;; // Max. image size (Mbytes)
$max_by = $max_mb*1048576; // (bytes)
$max_name = &#039;10&#039;; // Max. file name lenght.

// Thumbs //
$mini_ancho = &#039;150&#039;; // Thumb width (pixels)
$mini_alto = &#039;150&#039;; // Thumb height (pixels)

// Resize //
$lowres = &#039;16&#039;; // Min. resize value (pixels)
$higres = &#039;1280&#039;; // 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 = &#039;snurl&#039;; // tinyurl | tr.im | snurl
$cut_url_user = true; // If $cut_url = true -&gt; true: Allows your users to cut their urls (preference) - false: Users can&#039;t choose to cut or not.
$allow_over_resize = false; // true: Allows over resize images - false: Don&#039;t allow over resize.


///////////////////////////////////////////////////////////////////
///// DO NOT EDIT BELOW THIS - (do it if the script can&#039;t run) ////
///////////////////////////////////////////////////////////////////

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

$DOM_SCRIPT = $_SERVER[&#039;SERVER_NAME&#039;]; // --&gt; mysite.com
$PATH_SERVER = $_SERVER[&#039;/httpdocs&#039;]; // --&gt; /public_html

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

// FTP MODE //
/* Use this if you want to upload the files through ftp php (http://php.net/ftp). This is handly when your server config don&#039;t
   allow to upload files withput chmod 777. Using this, you can forget the chmod ;) */
$use_ftp = true; // true: Uses ftp to upload files - false: Upload without ftp.
$ftp_host = $DOM_SCRIPT; // Change this if your ftp host is not the same as your mysite.com -- example: $ftp_host = &#039;ftp.mysite.com&#039;;
$ftp_user = &#039;ftpuser&#039;; // valid username.
$ftp_pass = &#039;ftppass&#039;; // Valid password.
// NOTICE: FTP user must have access to the script folder.


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

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

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

?&gt;</code></pre></div><p>thank&#039;s</p>]]></content>
			<author>
				<name><![CDATA[tux60]]></name>
				<uri>http://chevereto.com/forums/user347.html</uri>
			</author>
			<updated>2009-06-05T15:43:20Z</updated>
			<id>http://chevereto.com/forums/post1285.html#p1285</id>
		</entry>
</feed>

