Posted by nighthawk117 on May 1, 2009 at 7:28pm
Jump to:
| Project: | Image FUpload |
| Version: | 6.x-3.0-rc2 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I've used IE8 and Flash 10 on my computer to test image_fupload on my site and everything works smoothly.
However, when I try to upload the same file using Firefox 3.0.10 on Windows XP and Flash version WIN 10,0,22,87 I receive the following error:
* warning: filesize() [function.filesize]: stat failed for /tmp/nameofuploadedfile.jpg in /path/to/sites/all/modules/filefield/field_file.inc on line 152.
* The selected file nameofuploadedfile.jpg could not be saved. The file is not a known image format.
While visually everything goes smoothly, it doesn't appear that the file is actually being uploaded to my server. Any idea what's going on?
Comments
#1
Some configuration things are wrong on your server. I think it's a file-owner issue. Please try to connect your server's administrator in order to fix it: php has no access to move the temp file.
#2
That doesn't seem to make sense, given that the same PHP code and server configuration is working fine when I test it with IE8. It seems like there's something going wrong on the client side under my Firefox, Flash configuration.
#3
I'm getting a similar error message:
* warning: filesize() [function.filesize]: stat failed for /tmp/HPIM4412.JPG in [...]/sites/all/modules/filefield/field_file.inc on line 154.
* The selected file HPIM4412.JPG could not be saved. The file is not a known image format.
Module version is: 6.x-3.0-rc2
field_file.inc version is: // $Id: field_file.inc,v 1.33 2009/04/28 04:03:24 quicksketch Exp $
Unlike the OP, the problem occurs for me in both IE and Firefox.
The problem only occurs when I try to upload a file with an upper case file extension (JPG). When I upload a file with a lower case file extension, even though it has a mixed-case file basename, it works.
Please let me know what I can do to further diagnose this problem.
#4
OK, after several retries, I'm not sure what's changed, but now I'm getting a popup with the following poorly formatted text. The file, error and line number buried in there look the same, however.
An error occurred.
/fupload/js/imagefield
{ "status": true, "data": "\x3cinput type=\"hidden\" name=\"num_queued_images\" id=\"num_queued_images\" value=\"0\" /\x3e\x3cinput type=\"hidden\" name=\"form_errors\" id=\"form_errors\" value=\"2\" /\x3e\x3cdiv class=\"messages status\"\x3e\nPhoto show \x3cem\x3eyyy\x3c/em\x3e has been created.\x3c/div\x3e\n\x3cdiv class=\"messages error\"\x3e\n \x3cul\x3e\n \x3cli\x3ewarning: filesize() [\x3ca href=\'function.filesize\'\x3efunction.filesize\x3c/a\x3e]: stat failed for /tmp/HPIM4396.JPG in [...]/sites/all/modules/filefield/field_file.inc on line 154.\x3c/li\x3e\n \x3cli\x3eThe selected file \x3cem\x3eHPIM4396.JPG\x3c/em\x3e could not be saved. The file is not a known image format.\x3c/li\x3e\n \x3c/ul\x3e\n\x3c/div\x3e\n" }SMTP -> get_lines(): $data was ""
I'm using multiple images per node, and it turns out that the node is getting created, sometimes with just one of the images in it. I didn't look for the page before, as after the error occurred, it left me on the create page for the node and the Save button wasn't enabled because the image list had been cleared out.
Also, the "lower case works" comment before was a red herring. I think it was an instance of the "sometimes just one image works" issue above.
#5
OK, the major problem seems to have been that I had a Notification setting "Notify poster of own posts" enabled. I turned this off and the popups stopped. I got a clue from the SMTP reference in the popup message shown above. I was indeed getting the emails; I'd been using this to debug when the nodes were actually created (or not).
I don't think this was the only thing going on. I changed my tmp directory somewhere along the line to see if that was the problem. The popups (and email notifications) continued, so I dismissed the tmp directory as a cause. However, now I see that the text in the poorly formatted popup message changed from "stat failed" to "node created", probably when I changed my tmp directory. However, I think it was the notification itself, not the fact that the message was a success or failure message, that was causing the file upload to fail with the popup.
The bulk of the popup text, by the way, only displayed in Firefox. IE shows a popup, but with only the first two lines: "An error occurred." and "/fupload/js/imagefield".
Sorry for rambling, but perhaps this will help someone else who may have this problem someday.
Now if I could just get the filefield_paths module to work correctly and put the images where I want them...
#6
Same problem. It was due to the /tmp folder not being properly writeable.
#7
That's right! After digging and trying almost every piece of advice I found in posts regarding this problem, the only thing that solved it for me was manually creating a tmp dir inside my files directory, then in Administer > Site configuration > File System I changed the Temporary directory path to sites/default/files/tmp
Now Image FUpload is working so fine! Thanks for this module which is a great Time Saver!!!
#8
okay I have the same problem with the migration module. I get the error modules/filefield/field_file.inc on line 154 unknown file format image cannot be saved. I changed the tmp directory, made sure that it is writeable and still have that same message when trying to import an image into that filefield.
#9
Did you change the field for the temp path from /tmp to sites/default/files/tmp or change the file-system path from sites/default/files and then the temp field to /tmp. Are the files handled via http or privately. I'm haveing the same problem.