Keyword

Unable to upload images using the "Image" tab

  • Pieter Willemsen
  • Pieter Willemsen's Avatar Topic Author
  • Offline
  • New Member
  • Owner, Senseven Reclame & Webdesign Bureau
More
13 years 7 months ago #89588 by Pieter Willemsen
Unable to upload images using the "Image" tab was created by Pieter Willemsen
Hi,I'm Unable to upload images using the "Image" tab!I try to upload images in the k2 items & category , I get the "item saved successfully" message. But the image isn't showing up in the item and I can't find it anywhere on the server.I tried giving the media/k2 folder 777 permission and it did not work.in the
form of joomla works, I just asked the same question I get the remark:
IMPORTANT NOTE: Please search before posting a question!forum.joomlaworks.gr/simple-image-gallery-pro-%28plugin%29/unable-to-upload-images/?topicseenI'm sorry but I did, I hope someone is able to help me here

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #89589 by william white
Replied by william white on topic Unable to upload images using the "Image" tab
sigpro isnt required to use the k2 image upload, only to upload galleries
are you getting any sort of error?
try turning error reporting on highest in global settings server tab and see what you get
also, how big are the files that you are trying to upload with the image tab
Were you able to upload images, and now you cannot? --- what have you installed lately

Please Log in or Create an account to join the conversation.

  • Pieter Willemsen
  • Pieter Willemsen's Avatar Topic Author
  • Offline
  • New Member
  • Owner, Senseven Reclame & Webdesign Bureau
More
13 years 7 months ago #89590 by Pieter Willemsen
Replied by Pieter Willemsen on topic Unable to upload images using the "Image" tab
Thanks for your reply,

I did not use sigpro , I've only tried to upload single image.

I have in the global settings put the error reporting to maximum.

the only message I get is: Changes to Item saved

The image I'm trying to upload is my avatar :) robinenpieter.jpg and the size is 139kb

It is a new installation and I got the problem from the beginning.

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

and the standard modules k2/VirtueMart

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 7 months ago #89591 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
I've posted the fix for this in another thread.. and I've posted a message for the K2 guys, but yet to hear anything (and we've gone through K2 2.3 & 2.4 since then).

I'll dig my post out, and paste it here

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 7 months ago #89592 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
Hey Pieter, check out Page 3 of this thread... community.getk2.org/forum/topics/content-module-image-resizing?xg_source=activity&id=3536014:Topic:7369&page=3#comments

In there I've documented the problems. I've had to change about 6 installations of K2 to make the uploads work, so something isn't working correctly somewhere, and it would be really nice if the K2 Devs could make this work without having to hack core files.

Hope this helps anyway!
N

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 7 months ago #89593 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
OPTIONALLY.... if you want a quick hack, as opposed to fixing the problem, then edit the /administrator/components/com_k2/lib/class.upload.php file, and change the following:

$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())

in the init() function. They are roughly on line 1955. Change the true's to false's and you'll be good to go.

Please Log in or Create an account to join the conversation.

  • Pieter Willemsen
  • Pieter Willemsen's Avatar Topic Author
  • Offline
  • New Member
  • Owner, Senseven Reclame & Webdesign Bureau
More
13 years 7 months ago #89594 by Pieter Willemsen
Replied by Pieter Willemsen on topic Unable to upload images using the "Image" tab
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

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 7 months ago #89595 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
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

Please Log in or Create an account to join the conversation.

  • Pieter Willemsen
  • Pieter Willemsen's Avatar Topic Author
  • Offline
  • New Member
  • Owner, Senseven Reclame & Webdesign Bureau
More
13 years 7 months ago #89596 by Pieter Willemsen
Replied by Pieter Willemsen on topic Unable to upload images using the "Image" tab
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

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 7 months ago #89597 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
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

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum