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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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
14 years 8 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.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #89598 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
Actually, there is one further thing you could do... in the /administrator/components/com_k2/models/item.php file, search for //image, and then find the line that says:

$handle = new upload($image);

add a line under this as follows:

echo $handle->log; exit;

Now go and try to add an image to a K2 page. You should see the output of the log file that class.upload.php creates. Hopefully this might give you another clue.

Remember to remove that line once you've seen the log and whether it contains any errors.

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
14 years 8 months ago #89599 by Pieter Willemsen
Replied by Pieter Willemsen on topic Unable to upload images using the "Image" tab
This is the log I got when uploading an image.



system information
- class version : 0.29
- operating system : Linux
- PHP version : 5.2.12
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Fileinfo PECL extension deactivated
- UNIX file() command is deactivated
- mime.magic file (mime_content_type()) is deactivated
- Checking MIME type with getimagesize()
MIME type detected as image/jpeg by PHP getimagesize() function
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : robinenpieter.jpg
file_src_name_body : robinenpieter
file_src_name_ext : jpg
file_src_pathname : /tmp/phpMjFQ5v
file_src_mime : image/jpeg
file_src_size : 138294 (max= 0)
file_src_error : 0
- source file is an image
image_src_x : 400
image_src_y : 400
image_src_pixels : 160000
image_src_type : jpg
image_src_bits : 8

my email is This email address is being protected from spambots. You need JavaScript enabled to view it. thanks again for your help


Nick Texidor said:Actually, there is one further thing you could do... in the /administrator/components/com_k2/models/item.php file, search for //image, and then find the line that says:
$handle = new upload($image);

add a line under this as follows:

echo $handle->log; exit;

Now go and try to add an image to a K2 page. You should see the output of the log file that class.upload.php creates. Hopefully this might give you another clue.

Remember to remove that line once you've seen the log and whether it contains any errors.

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #89600 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
Hmmm, that seems to show that the upload is going through ok. 
I know it's a silly question, but when you gave the /media/k2 folder 777 permissions, did you also choose to give all folders IN that folder the same 777 permissions? :)Pieter Willemsen said:This is the log I got when uploading an image.


system information
- class version : 0.29
- operating system : Linux
- PHP version : 5.2.12
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Fileinfo PECL extension deactivated
- UNIX file() command is deactivated
- mime.magic file (mime_content_type()) is deactivated
- Checking MIME type with getimagesize()
MIME type detected as image/jpeg by PHP getimagesize() function
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : robinenpieter.jpg
file_src_name_body : robinenpieter
file_src_name_ext : jpg
file_src_pathname : /tmp/phpMjFQ5v
file_src_mime : image/jpeg
file_src_size : 138294 (max= 0)
file_src_error : 0
- source file is an image
image_src_x : 400
image_src_y : 400
image_src_pixels : 160000
image_src_type : jpg
image_src_bits : 8

my email is This email address is being protected from spambots. You need JavaScript enabled to view it. thanks again for your help


Nick Texidor said:Actually, there is one further thing you could do... in the /administrator/components/com_k2/models/item.php file, search for //image, and then find the line that says: $handle = new upload($image);

add a line under this as follows:

echo $handle->log; exit;

Now go and try to add an image to a K2 page. You should see the output of the log file that class.upload.php creates. Hopefully this might give you another clue.

Remember to remove that line once you've seen the log and whether it contains any errors.

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
14 years 8 months ago #89601 by Pieter Willemsen
Replied by Pieter Willemsen on topic Unable to upload images using the "Image" tab
jes :) all sub folders are on 777

I can give you the login codes if you have time?



Nick Texidor said:Hmmm, that seems to show that the upload is going through ok.  I know it's a silly question, but when you gave the /media/k2 folder 777 permissions, did you also choose to give all folders IN that folder the same 777 permissions? :)Pieter Willemsen said:This is the log I got when uploading an image.
system information
- class version : 0.29
- operating system : Linux
- PHP version : 5.2.12
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Fileinfo PECL extension deactivated
- UNIX file() command is deactivated
- mime.magic file (mime_content_type()) is deactivated
- Checking MIME type with getimagesize()
MIME type detected as image/jpeg by PHP getimagesize() function
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : robinenpieter.jpg
file_src_name_body : robinenpieter
file_src_name_ext : jpg
file_src_pathname : /tmp/phpMjFQ5v
file_src_mime : image/jpeg
file_src_size : 138294 (max= 0)
file_src_error : 0
- source file is an image
image_src_x : 400
image_src_y : 400
image_src_pixels : 160000
image_src_type : jpg
image_src_bits : 8

my email is This email address is being protected from spambots. You need JavaScript enabled to view it. thanks again for your help


Nick Texidor said:Actually, there is one further thing you could do... in the /administrator/components/com_k2/models/item.php file, search for //image, and then find the line that says: $handle = new upload($image); add a line under this as follows:

echo $handle->log; exit;

Now go and try to add an image to a K2 page. You should see the output of the log file that class.upload.php creates. Hopefully this might give you another clue.

Remember to remove that line once you've seen the log and whether it contains any errors.

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #89602 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
Hi Pieter, did you make any progress? I sent you an email last night, let me know if you didn't receive it.


Pieter Willemsen said:jes :) all sub folders are on 777
I can give you the login codes if you have time?



Nick Texidor said:Hmmm, that seems to show that the upload is going through ok.  I know it's a silly question, but when you gave the /media/k2 folder 777 permissions, did you also choose to give all folders IN that folder the same 777 permissions? :)Pieter Willemsen said:This is the log I got when uploading an image. system information
- class version : 0.29
- operating system : Linux
- PHP version : 5.2.12
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Fileinfo PECL extension deactivated
- UNIX file() command is deactivated
- mime.magic file (mime_content_type()) is deactivated
- Checking MIME type with getimagesize()
MIME type detected as image/jpeg by PHP getimagesize() function
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : robinenpieter.jpg
file_src_name_body : robinenpieter
file_src_name_ext : jpg
file_src_pathname : /tmp/phpMjFQ5v
file_src_mime : image/jpeg
file_src_size : 138294 (max= 0)
file_src_error : 0
- source file is an image
image_src_x : 400
image_src_y : 400
image_src_pixels : 160000
image_src_type : jpg
image_src_bits : 8

my email is This email address is being protected from spambots. You need JavaScript enabled to view it. thanks again for your help


Nick Texidor said:Actually, there is one further thing you could do... in the /administrator/components/com_k2/models/item.php file, search for //image, and then find the line that says: $handle = new upload($image); add a line under this as follows:
echo $handle->log; exit;

Now go and try to add an image to a K2 page. You should see the output of the log file that class.upload.php creates. Hopefully this might give you another clue.

Remember to remove that line once you've seen the log and whether it contains any errors.

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

More
14 years 8 months ago #89603 by peter cowen
Replied by peter cowen on topic Unable to upload images using the "Image" tab
Hi,

I've got a similar problem uploading images anywhere around K2 and getting a blank screen. I've seen half a dozen other threads and posted two of my own and they get the same reply and then the thread dies.

If you guys find a solution (and I hope you do otherwise I have to stop using K2) then hopfeully it will sort out my problems as well. Just as a bit of a background I'm now using a clean install with minimal other components (just JCE and Akeeba) and I can't get an error message despite having all error reporting on. I'm not very PHP savvy like you gentleman but I'll follow this with interest.

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #89604 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
Hi Peter,

Have you tried any of the suggestions I mentioned above? The first being to edit the class.upload.php file and change the MIME check variables to false.

If that doesn't work, I'd be adding in the line that displays the log file.

I've helped Pieter resolve his problem, it turns out his php.ini file was setting the maximum file upload size to 0MB, meaning nothing would upload. Adding the bit of code that displays the log file as I mentioned in an earlier message would hopefully show whether the problem lies in the uploading.

If you'd like a hand trying to resolve it, please send me a private message with your email address and we can go from there.

N



peter cowen said:Hi,
I've got a similar problem uploading images anywhere around K2 and getting a blank screen. I've seen half a dozen other threads and posted two of my own and they get the same reply and then the thread dies.

If you guys find a solution (and I hope you do otherwise I have to stop using K2) then hopfeully it will sort out my problems as well. Just as a bit of a background I'm now using a clean install with minimal other components (just JCE and Akeeba) and I can't get an error message despite having all error reporting on. I'm not very PHP savvy like you gentleman but I'll follow this with interest.

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

More
14 years 3 months ago #89605 by Triumvirato
Replied by Triumvirato on topic Unable to upload images using the "Image" tab
hello!

 

Is this solved?

i´m newbie in joomla and have the same problem. I'm not able to upload images from the image tab, and cannot select an image from the server, which was uploaded by ftp. In either cases, i recived a navigator blank screen when push apply or save button.

In my page information about K2, all the permissions directory are "writable". Also the directory "cache" and subdirectories. In image GD library is set to bundled (2.0.34 compatible).


Web Server
Apache

Version PHP
5.2.17

Version MySQL
5.0.68

Libreria imagen GD
bundled (2.0.34 compatible)

Multibyte string support
Habilitado

Limit upload
16M

Limite memory
64M

Abrir archivos remotos (permitir url fopen)
Yes

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 3 months ago #89606 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
There are a couple of things it can be related to, so the best thing to do is to display the log created by the upload class, and go from there:

 

in the /administrator/components/com_k2/models/item.php file, search for //image, and then find the line that says:

$handle = new upload($image);add a line under this as follows:echo $handle->log; exit;Now go and try to add an image to a K2 page. You should see the output of the log file that class.upload.php creates. Hopefully this might give you another clue, but post it here if you aren't sure.Remember to remove that line once you've seen the log and whether it contains any errors. 

N

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

More
14 years 3 months ago #89607 by peter cowen
Replied by peter cowen on topic Unable to upload images using the "Image" tab
Hey,

 

I didn't actually solve that, a web designer and web host solved it for me.  Christiaan from Spiders Web Design determined that it was a problem with my server.  I could have contacted my host to change the server appropriately (or he would have done it for me) but I opted for a much easier option, I transferred my hosting package over to him and the problem was solved straight away.

 

It was a good choice.  I've got my hands so full of just trying to learn how to design websites (doing great though I think) that I really didn't want to start learning about the various server problems I might come across.

 

Cheers.

Pete

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


Powered by Kunena Forum