Keyword

Unable to upload images using the "Image" tab

  • 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 4 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 4 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 4 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.

More
14 years 4 months ago #89608 by Triumvirato
Replied by Triumvirato on topic Unable to upload images using the "Image" tab
Nick,

 

Many thanks for your help. I try to do that, but i don´t see anything, the log is not displayed in anywhere, and the error occurs as always, at the end i get a blank navigator screen and the image is not uploaded.

 

Peter,

 

May be a problem server, but i'd like to solve it in that case with my host provider but i need to know what to disclaim him.

 

Many thanks to you.

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

More
14 years 4 months ago #89609 by peter cowen
Replied by peter cowen on topic Unable to upload images using the "Image" tab
OK from what I can remember I think it was image buffer sizes...?

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

More
14 years 3 months ago #89610 by Nolix
I'm tired about this issue: the item image upload in image tab not show in the item... I resolve only reinstalling a fresh joomla and k2 versions... and restore the database... and all working fine by now... All post about this issue not working for me... Thanks a lot for this help forum...

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

More
14 years 1 month ago #89611 by Jock
@nick

 

Can you help me over here please, I have a similar issue:

 

community.getk2.org/forum/topics/images-field-not-working

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

More
14 years 1 month ago #89612 by Nolix
I solved the problem temporarily, moving images folder /media/k2/items/cache and /media/k2/items/src to another folder. I'm still waiting for an update to resolve this incident, k2 apparently can only handle a certain amount of images

Jock said:
@nick

 

Can you help me over here please, I have a similar issue:

 

community.getk2.org/forum/topics/images-field-not-working

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

More
14 years 1 month ago #89613 by Jock
Hi Nolix,

 

Can I ask where you moved them to ? And the reason for doing this?

 

Thanks

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

More
14 years 1 month ago #89614 by BBC
Strange.  I never had such problems. Installed K2 at plenty of servers.

So i doubt it is something wrong in K2.

 

Sometimes new images don´t appear unless i make refresh 2-5 times.

 

Delete all Cache, check that you don´t have header expires set in .htaccess, disable plugin Cache (if it is activated), check that you don´t upload some strange extension as .tiff, bitmap, psd.

 

If you have .htaccess activated disable it and test without.

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 1 month ago #89615 by Nick Texidor
Replied by Nick Texidor on topic Unable to upload images using the "Image" tab
@BBC, there IS an issue with image uploading that I've documented across these forums, however, it is more related to the server in most instances.  Most of the sites I've setup have issues with the PECL mime checking, and so I have to over-ride the class.upload.php file with a modified version because there is a problem with the initialize routine in that file (i.e. it doesn't get run until the upload function is called, meaning that any values you try setting before the upload is called in item.php just gets reset).

In Jock's situation, as posted in another thread, his server has fopen disabled, and I suspect that's the first thing to address before going any further.

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

More
14 years 1 month ago #89616 by Nolix
Ok. I moved them to another folder like /elements/cache and elements/src. That's the only way I can continue loading more photos. But this is a temporary solution because I did everything suggested and it did not work.  Please check the Nick Texidor post Are you experiencing Image Uploading and Resizing Problems?

Jock said:
Hi Nolix,

 

Can I ask where you moved them to ? And the reason for doing this?

 

Thanks

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

More
12 years 8 months ago #89617 by Ranjit
Try to give 777 write permission to your below folder:

/media/k2/items/cache

It worked for me..

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


Powered by Kunena Forum