1. cck-6.x-2.2
2. imagefield-6.x-3.0-beta3
3. not sure
4. download method for what?
5. set up to allow all supported file types, spaces used to separate extensions, everything else is default
6. Uploading an image should return a thumbnail (i guess, its never worked yet)

7. After selecting an image to upload and clicking upload the error message "The selected file whater.jpg could not be uploaded. The file is not a known image format." is returned every file type returns this message (gif and png)

8. running drupal 6.10 on windows IIS6 - modules installed are cck, fckeditor, nice menus, header image, filefield, imagefield

I just want damn header image to work.... and it seems I need this to work first =' (

Thanks for any help!

Comments

quicksketch’s picture

ImageField uses the PHP function getimagesize to check if a file is an image. If this function fails, then you get the error you described, "The file is not a known image format." I'm not sure why this would fail on your server, since I'm not aware of any particular problems with IIS and imagegetsize().

munkeyxis’s picture

are there any recommendations for what I can do to resolve this?

quicksketch’s picture

An alternative (not a great one) would be to change your field type from "Image" to "File", which doesn't use this check.

Other than that, I'd ensure that you have GD2 installed (even though its not needed for getimagesize() it is needed to create the thumbnail). Try to switch to an Apache/Unix web server if at all possible, since that's the most common configuration and what nearly all developers use to test their modules.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after 2 weeks with no response.

the_g_bomb’s picture

It could be a permissions problem. I just enabled write on the root folder from within IIS control panel and the problem went away. If I can figure out how to solve it on the files folder only without having to enable write on the whole directory and we will be sorted.

Yuri Ingultsov’s picture

this is an issue of image module (see image.inc line 116 image_get_info($file) {..... } ) the issues caused by is_file($file) call. see http://ua2.php.net/manual/en/function.is-file.php for details

fallsemo’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

I want to bump and open this issue again as I am having this issue after upgrading to the latest 6.15 release on Microsoft-IIS/7.0.
It was working fine before on 6.14

The error reads: The selected file [filename].jpg could not be uploaded. The file is not a known image format.

NOTE: I am using the latest 3.dev release of CCK if that possibly has anything to do with it.

I will change status if I can track the root of the problem.

fallsemo’s picture

I just want to confirm that this is a problem with the latest 6.15 Drupal release on Microsoft-IIS/7.0.
If I roll back to 6.14 there's no problem.

There is no problem with both releases on a linux machine :)

weirdnwise’s picture

+1 subscribe

apostlen712’s picture

Has anyone found a fix for this? I am having the same issue using Views Gallery.

klas.lundberg’s picture

Version: 6.x-3.0-beta3 » 6.x-3.2

I'm having the same issue as #7 fallsemo. I just upgraded drupal from 6.13 to 6.15 on Microsoft-IIS/7.0.

smsearcy’s picture

The fix posted in #307636: image_get_info() fails on IIS on new uploads worked for me with Drupal 6.15 on IIS 6.0. I just had to change the line in image.inc (but I had already done some tests to verify permissions were working).

smyleeface’s picture

thank you smsearcy! that fix worked for me...

Drupal 6.16
IIS 6
php 5.2.13

quicksketch’s picture

Status: Active » Closed (fixed)

See #307636: image_get_info() fails on IIS on new uploads, this is a Drupal core issue. Thanks everyone for the sleuthing.

gilbertmarvin’s picture

If it helps anyone;

I encountered this problem and traced it to the Temporary Directory (as set in admin/settings/file-system) being full.

I guess this error can occur for a multitude of reasons on the server config. I was originally suspecting permissions.

gdsoe’s picture

For me, the issue was caused by having two load balanced servers and the load server doing load-balancing in round robin method. The multiple image upload will then result in uploading to two servers and then some of the images can't be found for processing. We have to configure the load balancer to use session affinity based on cookie.

AswathyAjish’s picture

Issue summary: View changes

Me facing the same issue in drupal 7 site.

Error message displayed while uploading an image : The file could not be saved. An unknown error has occurred.

Any solution for this?

My php version is 7.2