Ok Pieter, if you'd like a hand, send me your email address via private message, and I'll drop you a line in the morning (it's midnight here in Australia, and I'm heading to bed).
N
Pieter Willemsen said:hi Nick, I have installed:
Joomla! 1.5.20
k2 2.4.1
K2mart 1.2
VirtueMart 1.1.5
JCE 1.5.7.4
NinjaXplorer 1.0.5
I Attach the file class.upload.php in the post.
I undo all changes i made, but it does not work ..
p
Nick Texidor said:Hi Pieter, What version of K2 do you have installed?
There are two options that have resolved the problem for me, the first, and quickest is to simply edit the /administrator/components/com_k2/lib/class.upload.php file. Look for the init() function, and then change the following 3 lines:
BEFORE:
$this->mime_fileinfo = true; // MIME detection with Fileinfo PECL extension
$this->mime_file = true; // MIME detection with UNIX file() command
$this->mime_magic = true; // MIME detection with mime_magic (mime_content_type())
AFTER:
$this->mime_fileinfo = false; // MIME detection with Fileinfo PECL extension
$this->mime_file = false; // MIME detection with UNIX file() command
$this->mime_magic = false; // MIME detection with mime_magic (mime_content_type())
The method I mentioned in the other post, where you edit the class.upload.php file to add in a new function, and then edit the /administrator/components/com_k2/models/item.php file is something that should be looked at for a more longer term fix. The code you just posted really needs to have the class.upload.php file edited as mentioned in the other discussion.
For now, undo any changes you made in the item.php file, and the class.upload.php file. Then make the changes I've copied above. Hopefully this will fix it. If you are still having problems, send me your email address via a private message, and I'll contact you off-forum to try and resolve it.
N
Pieter Willemsen said:Hi Nick, both ways did not work: ( but I could find this rule in the itum.php ($ handle = new upload ($ file );) to change it in,
$ Handle = new upload ();
$ Handle-> mime_fileinfo = false;
$ Handle-> doUpload ($ file );
Best Regards