When trying to import images, I get this error for each image:
# warning: filesize() [function.filesize]: stat failed for /var/www/html/sites/default/files/images/temp/events-bg.png in /var/www/html/sites/all/modules/image/contrib/image_import/image_import.pages.inc on line 23.
# warning: filesize() [function.filesize]: stat failed for /var/www/html/sites/default/files/images/temp/events-bg.png in /var/www/html/sites/all/modules/image/contrib/image_import/image_import.pages.inc on line 108.
and the table lists the file names, but says:
events-bg.png bytes 0x0 Not a JPG, GIF or PNG file.
when I try to import, it says "importing 0 of 0" and does nothing.
I'm using red hat enterprise, and tried php 5.1.6 and 5.2.
I checked php info and with php 5.1 made sure that mime_magic was working, but that didn't help.
The permissions are all correct, I even tried 777. The files are all owner and group apache.
The files are the correct size, same on my local drive as on the server, uploaded with scp.
I tried a local path and an absolute path, both have the same behaviour. I tried a directory outside of the regular images directory, it didn't help. I checked the max image size, its over the size of those images. I set the php timeout to 400 that didn't help.
please help.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | events-bg.png | 44.84 KB | azdelslade |
Comments
Comment #1
joachim commentedCan you attach the png file here please?
Also, I'd recommend you try uploading the file to your server again, and try some different images too.
Comment #2
azdelslade commentedHere's the image. It happens for a whole list of 100 images, though, jpg and png.
Comment #3
azdelslade commentedI was able to get this to work using just "tmp" as my import dir setting. It was just a permission problem. I have to set the files to 777 before import, but then everything works fine.
Comment #4
joachim commentedI just imported your image in my test site for image module and it worked fine.
> stat failed for /var/www/html/sites/default/files/images/temp/events-bg.png
Sounds like it can't actually find the file. Got symlinks? Weird permissions stuff? What if you try to stat the file by hand in the Exec PHP block?
Comment #5
sunSorry, without further information this issue can only be closed as not reproducible.
Feel free to re-open this issue if you want to provide further information. Thanks.