Topic: Tipo de archivo invalido, soportamos JPG, PNG, G

les pido ayuda necesito solucionar esto.

mi direccion es http://subirfotos.webuda.com/

mi problema es que no puedo subir fotos ni local ni remota ni redimensionar

Como puedo solucionar???

ya tengo chmod 777 en todas las carpetas y el problema persiste.

Estuve leyendo otro tema similar y los link a los manuales no andan

Agradeceria su ayuda

tengo chevereto 1.6 rev 2
para instalarlo segui el thread
http://chevereto.com/foro/topic87-updat … bhost.html

Por las dudas les dejo mi config.php

<?

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

  Chevereto - Script de hosting de imagenes
  Nightly Build 1.6, rev 2 (29/08/2009)
  http://www.chevereto.com/

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

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

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

define('APP_NAME', 'SUBIRFOTOS'); // 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 //
$max_mb = '2.0'; // 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 = false; // 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['SERVER_NAME']; // --> mysite.com
$PATH_SERVER = $_SERVER['/public_html']; // --> /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 (http://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 wink */
$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 = 'ftp.mysite.com';
$ftp_user = 'a7679926'; // 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://'.$DOM_SCRIPT.PATH_SCRIPT);

?>

Last edited by biochelo (2010-01-28 14:58:56)

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

Do you speak english ?

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

yes

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

Try changing this:
$DOM_SCRIPT = $_SERVER['SERVER_NAME']; // --> mysite.com
$PATH_SERVER = $_SERVER['/public_html']; // --> /public_html (pssst.. NO ENDING SLASH!)

to this:
$DOM_SCRIPT = 'subirfotos.webuda.com/'; // --> mysite.com
$PATH_SERVER = ''; // --> /public_html (pssst.. NO ENDING SLASH!)

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

mmm show me
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a7679926/public_html/config.php on line 85

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

sorry for that, restore as you had.
And when it comes to this error checking for extension is the extension takes place in the file engine.php


if (isset($urlrez)) {
    if (!empty($urlrez)) {
        // veamos la extension...
        $urlrez3 = substr($urlrez, -3);
        if ($urlrez3=='jpg' || $urlrez3=='peg' || $urlrez3=='gif' || $urlrez3=='bmp' || $urlrez3=='png') {
            unset($modo);
            $modo = 'rr';
            $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;
    }
}


Maybe try to change hosting. I recommend the free, for example http://www.000a.biz/

Last edited by ThaMCW (2010-01-28 15:27:45)

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

the Parse error

mmm show me 
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a7679926/public_html/config.php on line 85

has finished

but i continue with the problem of the invalid file

my config php now is
$DOM_SCRIPT = 'subirfotos.webuda.com'; // --> mysite.com
$PATH_SERVER = ''; // --> /public_html (pssst.. NO ENDING SLASH!)

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

Maybe try to change hosting. I recommend  for example, free hosting http://www.000a.biz/

Last edited by ThaMCW (2010-01-28 15:36:38)

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

i will tray with 000a.biz wink

Thumbs up

Re: Tipo de archivo invalido, soportamos JPG, PNG, G

problema solucionado . lo deje por defecto como lo tenia ,lo unico que le modifique es $use_ftp = false
// Language //
define('LANG', 'es'); // en - English | es - Español | fa - Farsi | fr - Français | nl - Dutch | cn - ZH-CN (Chinese)

define('APP_NAME', 'SUBIRFOTOS'); // 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 //
$max_mb = '2.0'; // 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 = false; // 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['SERVER_NAME']; // --> mysite.com
$PATH_SERVER = $_SERVER['/public_html']; // --> /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 (http://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 = $DOM_SCRIPT; // Change this if your ftp host is not the same as your mysite.com -- example: $ftp_host = 'ftp.mysite.com';
$ftp_user = 'a7679926'; // 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://'.$DOM_SCRIPT.PATH_SCRIPT);

Thumbs up