Topic: Upload error.

Just install 1.9nb, remote upload works fine, but when I select "local" I always get "Invalid file type, allowed JPG, PNG, GIF and BMP". Already reinstall cheverto, aleady set 0777 to all folders, but nothing helps sad

My config:

<?

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

  Chevereto - Script de hosting de imagenes
  Nightly Build 1.9 (11/04/2010)
  http://www.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)

// App
define('APP_NAME', 'ishoo.ru image hosting'); // Your image hosting name
define('TAG_LINE', 'Image Hosting'); // Your tagline (for doctitles and logo)
define('DESCRIPTION', 'ishoo.ru image hosting'); // For meta description
define('KEYWORDS', 'images, photos, image hosting, photo hosting, free image hosting'); // For meta keywords

// 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) ////
///////////////////////////////////////////////////////////////////

/* We get this value with $_SERVER. If your server doesn't resolve this value, the script will not work.
   If the script doesn't work, you must manually set this value. (look the example) */

$DOM_SCRIPT = $_SERVER['SERVER_NAME']; // --> EXAMPLE: $DOM_SCRIPT = 'mysite.com';

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

?>

url:

http://ishoo.ru/photo

Debug info:

-bash-3.2# tail -50 /var/www/httpd-logs/ishoo.ru.error.log
[Fri Apr 16 17:01:58 2010] [error] [client 212.57.104.169] File does not exist: /var/www/ishooru/data/www/ishoo.ru/favicon.ico
[Fri Apr 16 17:02:04 2010] [error] [client 212.57.104.169] File does not exist: /var/www/ishooru/data/www/ishoo.ru/favicon.ico
[Fri Apr 16 17:02:09 2010] [error] [client 212.57.104.169] File does not exist: /var/www/ishooru/data/www/ishoo.ru/favicon.ico
[Fri Apr 16 17:02:16 2010] [error] [client 212.57.104.169] File does not exist: /var/www/ishooru/data/www/ishoo.ru/favicon.ico
[Fri Apr 16 17:02:24 2010] [error] [client 212.57.104.169] File does not exist: /var/www/ishooru/data/www/ishoo.ru/favicon.ico
[Fri Apr 16 17:02:29 2010] [error] [client 212.57.104.169] File does not exist: /var/www/ishooru/data/www/ishoo.ru/favicon.ico
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  url in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 76, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  urlrez in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 77, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  v in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 78, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  p in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 79, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  folder in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 80, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  ancho in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 81, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: ref2 in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 108, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Use of undefined constant size - assumed 'size' in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 207, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Warning:  copy() [<a href='function.copy'>function.copy</a>]: open_basedir restriction in effect. File(/tmp/phpHSOnlj) is not within the allowed path(s): (/var/www/ishooru/data:.) in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 310, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Use of undefined constant name - assumed 'name' in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 311, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Warning:  getimagesize(up/working/2.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 354, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Warning:  unlink(up/working/2.jpg) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 388, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: peso in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 393, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: peso in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 396, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:19:18 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: up in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 409, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:32:16 2010] [error] [client 207.46.13.54] File does not exist: /var/www/ishooru/data/www/ishoo.ru/robots.txt
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  fileup in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 73
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  remota in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 74
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  resize in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 75
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  url in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 76
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  urlrez in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 77
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  v in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 78
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  p in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 79
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  folder in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 80
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  ancho in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 81
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  HTTP_REFERER in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 100
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: ref2 in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 111
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: spit in /var/www/ishooru/data/www/ishoo.ru/photo/index.php on line 49
[Fri Apr 16 17:37:54 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: spit in /var/www/ishooru/data/www/ishoo.ru/photo/index.php on line 70
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  url in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 76, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  urlrez in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 77, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  v in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 78, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  p in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 79, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  folder in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 80, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined index:  ancho in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 81, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: ref2 in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 108, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Use of undefined constant size - assumed 'size' in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 207, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Warning:  copy() [<a href='function.copy'>function.copy</a>]: open_basedir restriction in effect. File(/tmp/phpGYSPzf) is not within the allowed path(s): (/var/www/ishooru/data:.) in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 310, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Use of undefined constant name - assumed 'name' in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 311, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Warning:  getimagesize(up/working/1.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 354, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Warning:  unlink(up/working/1.jpg) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 388, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: peso in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 393, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: peso in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 396, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Undefined variable: up in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 409, referer: http://ishoo.ru/photo/

Plz help smile

Thumbs up

Re: Upload error.

Chmod /images and /up to 0775 or if that doesn't work 0777.

Thumbs up

Re: Upload error.

gamerlv wrote:

Chmod /images and /up to 0775 or if that doesn't work 0777.

As I already said - "aleady set 0777 to all folders". But doesn't matter - remote upload works perfect. I think it's server problem, but don't know how to fix, all other scripts, cms's works fine sad

Thumbs up

Re: Upload error.

Shoo wrote:
gamerlv wrote:

Chmod /images and /up to 0775 or if that doesn't work 0777.

As I already said - "aleady set 0777 to all folders". But doesn't matter - remote upload works perfect. I think it's server problem, but don't know how to fix, all other scripts, cms's works fine sad

Sorry my bad. Didn't read that bit of you post. I see the problem in your error log :

[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Use of undefined constant size - assumed 'size' in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 207, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Warning:  copy() [<a href='function.copy'>function.copy</a>]: open_basedir restriction in effect. File(/tmp/phpGYSPzf) is not within the allowed path(s): (/var/www/ishooru/data:.) in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 310, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Notice:  Use of undefined constant name - assumed 'name' in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 311, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Warning:  getimagesize(up/working/1.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 354, referer: http://ishoo.ru/photo/
[Fri Apr 16 17:38:13 2010] [error] [client 212.57.104.169] PHP Warning:  unlink(up/working/1.jpg) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /var/www/ishooru/data/www/ishoo.ru/photo/engine.php on line 388, referer: http://ishoo.ru/photo/

Thumbs up

Re: Upload error.

What php version? I ask becasuse of the Use of undefined constant size
Secondly, what do you have in open_basedir in php.ini? Because that is the real problem here because the script can't handle the file among pahts or folders.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: Upload error.

Rodolfo wrote:

What php version? I ask becasuse of the Use of undefined constant size
Secondly, what do you have in open_basedir in php.ini? Because that is the real problem here because the script can't handle the file among pahts or folders.

1)

-bash-3.2# php -v
PHP 5.1.6 (cli) (built: Apr  7 2009 08:00:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

2)

-bash-3.2# cat /etc/php.ini|grep open_basedir
; open_basedir, if set, limits all file operations to the defined directory
;open_basedir =

Thx for reply and any help.

PS. Sry for bad English and hello from Russia smile

Thumbs up

Re: Upload error.

You should use a newer version of php but that should not limit the script functionality. The basedir config is correct so, I'm presuming that is the php version (and perhaps old libraries)

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!