1
McDonald
Can't upload - get strange error
  • 2006/8/31 0:04

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


When I try to upload an image (gif or jpg) I get the following error:

Could not get uploaded file 0
Invalid file content


I've checked the settings of XOOPS Imagemanager for the different categories but these seem all the be alright.
In the past I didn't have this problem.

Does anybody have an idea what is causing this error and how it can be solved?


2
technigrafa
Re: Can't upload - get strange error

I am getting this exact same error. Anyone know what's going on?

3
jensclas
Re: Can't upload - get strange error

This is happening here with a XOOPS 2.0.14 install too - would love to be able to help these people but we need someone whose good at the troubleshooting

perhaps anther here?

4
m0nty
Re: Cant upload - get strange error
  • 2006/10/6 23:13

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


maybe there's a problem with getimagesize function, some compatibility with your version of php or php configuration.. i'm not sure..

the only thing i can suggest is to disable getimagesize function, but it can be a potential security issue!

to disable >

open class/uploader.php

find (line 442 or thereabouts):

function checkImageType()
    {
        if(empty(
$this->checkImageType)) return true;

        if( (
"image" == substr($this->mediaType0strpos($this->mediaType"/"))) || 
            (!empty(
$this->mediaRealType) && "image" == substr($this->mediaRealType0strpos($this->mediaRealType"/")))
        ){
            if ( ! ( 
$info = @getimagesize$this->mediaTmpName ) ) ) {
                return 
false;
            }
        }
        return 
true;
    }


change 'return false' to 'return true' as below

function checkImageType()
    {
        if(empty(
$this->checkImageType)) return true;

        if( (
"image" == substr($this->mediaType0strpos($this->mediaType"/"))) || 
            (!empty(
$this->mediaRealType) && "image" == substr($this->mediaRealType0strpos($this->mediaRealType"/")))
        ){
            if ( ! ( 
$info = @getimagesize$this->mediaTmpName ) ) ) {
                [
b][color=CC0000]return true[/color][/b];
            }
        }
        return 
true;
    }


hopefully that may solve it.

Login

Who's Online

142 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 142


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits