Keyword

No image upload

More
14 years 10 months ago #78854 by Bernd
Replied by Bernd on topic No image upload
root/media/K2/

Pierre Cornelissen said:Where does K2 save the Category and Item Image Files?
Bernd said:Yes and check the files. The files must be your FTP user not wwwrun or nobody. Ala Makota said:Do you mean wrong chmod on image folder? Still I can't figure it out... Bernd said:wwwrun is a preference/user problem on a host. Check your files on your server.

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

More
14 years 10 months ago #78855 by Lefteris
Replied by Lefteris on topic No image upload
Thanks very much. As stated in another thread, I did found it and set the security to 777 which I think is a bit dangerous. Will look into security settings and set accordingly.

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

More
14 years 9 months ago #78856 by Gijs Scholman
Replied by Gijs Scholman on topic No image upload
Hey, I have exact the same problem. If I add a picture and save the article it says "Changes to item saved", but then there is no picture there. The picture is .JPG of 600x600 pixels and 40kb (also tried other pictures), so that could not be the problem, also root/media/k2 and all the subfolders are on CHMOD 777 also Group and owner are both set to FTP. I use the latest K2 v2.4.1 and Joomla 1.5.20. Can someone please help me out here?

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

More
14 years 9 months ago #78857 by Gideon Larionov
Replied by Gideon Larionov on topic No image upload
Similar problem... if i add picture to item, got blank screen after Save/Apply and no image added.

Also using the latest K2 v2.4.1 and Joomla 1.5.20.

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #78858 by Nick Texidor
Replied by Nick Texidor on topic No image upload
For those people having problems with the uploading of files, and have already ruled out a problem with permissions, I have a solution....

The quick fix is to edit /administrator/components/com_k2/lib/class.upload.php. Go to the init() function, and change the following variables from true to false:

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

You are 'SUPPOSED' to be able to override these settings in the calling script, however, because of a fundamental flaw in the design, it doesn't actually work :^)

I have documented the flaw in another post, but the above should at least get you working!

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

More
14 years 8 months ago #78859 by Gideon Larionov
Replied by Gideon Larionov on topic No image upload
Nick Texidor said:For those people having problems with the uploading of files, and have already ruled out a problem with permissions, I have a solution....


Let`s try it out :-)

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #78860 by Nick Texidor
Replied by Nick Texidor on topic No image upload
So, did it work? :^)


Gideon Larionov said:
Nick Texidor said:For those people having problems with the uploading of files, and have already ruled out a problem with permissions, I have a solution....


Let`s try it out :-)

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

More
14 years 8 months ago #78861 by Gideon Larionov
Replied by Gideon Larionov on topic No image upload
Woks fine... now i can fully use this awesome K2 component :-) Thanx

Nick Texidor said:So, did it work? :^)

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

More
14 years 8 months ago #78862 by Lefteris
Replied by Lefteris on topic No image upload
Since as an admin I upload the images to the folder via cPanel, but have not tried this one; what will happen if an upgrade from K2 arrives - will they have fixed this problem in the meantime?

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #78863 by Nick Texidor
Replied by Nick Texidor on topic No image upload
Considering I found this problem in K2 2.2, and K2 2.4.1 still hasn't fixed it... you'll probably have to update the class.upload.php script again to turn off the MIME checking as I mentioned above.


Pierre Cornelissen said:Since as an admin I upload the images to the folder via cPanel, but have not tried this one; what will happen if an upgrade from K2 arrives - will they have fixed this problem in the meantime?

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

More
14 years 8 months ago #78864 by Angelo
Replied by Angelo on topic No image upload
big hello from Greece!!!this is my first post here.my poblem is i join on k2 folder/lib but i dont have a file name class.upload.php the only file on folder is recaptchalib.php...can any one help me pls???
thx and sry for my bad english

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 8 months ago #78865 by Nick Texidor
Replied by Nick Texidor on topic No image upload
Hey Angelo! :^)

Are you looking in the /components/com_k2/lib folder by any chance? It should be in the /administrator/components/com_k2/lib folder.




Angelo said:big hello from Greece!!!this is my first post here.my poblem is i join on k2 folder/lib but i dont have a file name class.upload.php the only file on folder is recaptchalib.php...can any one help me pls??? thx and sry for my bad english

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

More
14 years 8 months ago #78866 by Angelo
Replied by Angelo on topic No image upload
ok thx i delete the folder and unzip again and upload folder again and i can see the file now!!!thx its works fine..thx for help Nick


Angelo said:big hello from Greece!!!this is my first post here.my poblem is i join on k2 folder/lib but i dont have a file name class.upload.php the only file on folder is recaptchalib.php...can any one help me pls??? thx and sry for my bad english

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

More
14 years 7 months ago #78867 by Vicente Gavara
Replied by Vicente Gavara on topic No image upload
Ten thousand thanks to Nick Texidor, his solution works!!!!

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

  • Smart Guy Computing
  • Smart Guy Computing's Avatar
  • Offline
  • New Member
More
14 years 7 months ago #78868 by Smart Guy Computing
Replied by Smart Guy Computing on topic No image upload
Hi Nick! I just wanted to say that I was having the exact same problem and your solution worked like a charm! thanks a million!!!



Nick Texidor said:For those people having problems with the uploading of files, and have already ruled out a problem with permissions, I have a solution....
The quick fix is to edit /administrator/components/com_k2/lib/class.upload.php. Go to the init() function, and change the following variables from true to false:

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

You are 'SUPPOSED' to be able to override these settings in the calling script, however, because of a fundamental flaw in the design, it doesn't actually work :^)

I have documented the flaw in another post, but the above should at least get you working!

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 7 months ago #78869 by Nick Texidor
Replied by Nick Texidor on topic No image upload
No worries... glad it's all working for you! :^)



Mark Bolden said:Hi Nick! I just wanted to say that I was having the exact same problem and your solution worked like a charm! thanks a million!!!

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

More
14 years 7 months ago #78870 by ledouble
Replied by ledouble on topic No image upload
Hi all,

I tried the following solution kindly proposed by Nick Texidor (below), but it don't work. Did someone have a solution to enable the upload of images in the "Edit Item" - Image tab. Thank you in advance for your Help. Bill

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

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

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 7 months ago #78871 by Nick Texidor
Replied by Nick Texidor on topic No image upload
Hi Bill,

If changing the MIME type settings didn't work for you, there are a couple of other things you can try... first off, are the permissions on the /media/k2 folder set correctly? I usually set /media/k2 and all sub-directories to 777 to make sure that's not the problem.

If they're all ok, the other thing you could try is displaying the upload log to see if it shows any kind of problem: Edit the file /administrator/components/com_k2/models/item.php, and search for //image. About 9 or 10 lines down from that, you should see the following:

$handle = new Upload($image);

under that, add:

echo $handle->log;

Next, try and add an image to an item. You should see some debug output on the screen Have a quick scan and see if it shows anything obvious. If you're not sure, send me the text in a PM and I'll have a look for you.

Hope this helps a little
N



bill said:Hi all,
I tried the following solution kindly proposed by Nick Texidor (below), but it don't work. Did someone have a solution to enable the upload of images in the "Edit Item" - Image tab. Thank you in advance for your Help. Bill

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

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

More
14 years 6 months ago #78872 by ledouble
Replied by ledouble on topic No image upload
Hi,

 

Thank you very much for the suggestions and tips. I apologize but I had no time to try out your all the tips you gave to me. I will do it tomorrow and give you a feedbak about the results of it.

Thanks again, ciao

 

Bill

Nick Texidor said:

No worries... glad it's all working for you! :^) Mark Bolden said:Hi Nick! I just wanted to say that I was having the exact same problem and your solution worked like a charm! thanks a million!!!

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

More
14 years 5 months ago #78873 by william white
Replied by william white on topic No image upload
Filenames ! again - This is unixalmost like the power cable

Remember check file names, turn off sef, set error reporting to highest, power must be plugged in because i can see the screen! been there, done that

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


Powered by Kunena Forum