I can't seem to get basic file uploading to work. Anyone know what to do to fix this?
Here's what happens:
When editing a page, I open the 'File attachments' section.
I find my file and hit the attach buton
I see the 'Uploading File' progress bar, and then the file appears in the list.
If I attach a new file, it replaces the original.
The file doesn't exist at the url it displays or in the drupal/files directory on the filesystem. It doesn't exist in /tmp either.
It still doesn't exist when I hit submit for the page.
About my setup:
Size of the file I'm trying to upload: 4.30KB
Server: Fedora Core 4 running Apache-2.0.54
File uploads work in my installation of WordPress (so the problem doesn't seem to be Apache or PHP)
I'm using user #1, so I should have full access to stuff
Drupal version 4.7.0
Attachments are enabled on the 'page' content type
settings > upload > 'Maximum resolution for uploaded images:' is set to 0
settings > upload > 'List files by default:' is set to 'Yes'
Ideas anyone?
Thanks for your help!
Brian
Comments
An issue that I experienced
I'm not sure this is what is happening to your files, but this had me stumped for a while. See the following link for a discussion of a problem with uploading files (this was for 4.6, but I imagine it could happen in 4.7):
http://drupal.org/node/45597
Well, I checked that out and
Well, I checked that out and set full permissions on all the ancestor directories. It didn't seem to solve the problem though. I did also try the example script from the php website for fwrite (http://us3.php.net/manual/en/function.fwrite.php). That worked fine in the drupal/files directory with my original permission settings (If I comment out the is_writable() of course - the file didn't exist yet). So I doubt it's a permissions problem.
It looks like I'm going to have to start looking through the upload.module code. :(
Thanks for the idea to try though!
Brian
chmod settings?
Hey bmaddy
What permissions do you have on the 'files' folder? I think it should be set to 755.
Also, have you given yourself access control to the upload module under administer>access control? I know you're the top user, but I'm pretty sure you still need to give your role access. Anyway, worth checking.
Shayne
Ahh, yes, I should have
Ahh, yes, I should have mentioned that before.
permissions are 777 on the drupal/files folder.
I was able to successfully write to that folder using php's fwrite() function (in a test script).
I also should have mentioned that I am running PHP version 5.0.4
If anyone has any more ideas, plese let me know. If I figure it out, I'll be sure to post the solution here too.
Thanks,
Brian
I found a workaround, it's weird though...
Yeah, this is strange. I am able to get uploads to work if I do the following to the theme I am using:
Go to the theme's configuration,
make sure the 'Use the default shortcut icon.' option is checked.
And then, uploading seems to work fine. Weird. I have no idea why there would be a dependancy between the shortcut icons and file uploading. Sounds like a strange bug somewhere, but I don't really have time to figure it out right now. I'll try to look into it if I get some time in the future.
Thanks, bomarmonk and shayne, for the ideas to try.
See ya,
Brian
Oddly enough...
Upload.module was exhibiting the same symptoms to me (seemed to work fine with no errors, except that the image was not uploaded), until I enabled the Drupal favicon.ico file.
Wierd. Has anybody opened an issue for this one?
--
Matt Koglin, Antinomia Solutions
Just to say this problem still exists
I ran into this (and thankfully this solution) with Drupal 4.7.6 (accessed with Firefox 1.5.0.9 on Ubuntu 6.10)
It was on the chameleon and marvin themes if that makes any difference.
Agree - wierd and athough the discussion on the related node is interesting - it's obviously not been fixed in the newer releases.
Still, good work everyone!
yes- it's a bug
see this issue, with details and patch. I think (though I'm not 100% sure) that this patch is included in 4.7.1.
http://drupal.org/node/65153
---
Work: BioRAFT
Ok, I solved the problem by
Ok, I solved the problem by install the patch at #15 of url http://drupal.org/node/65153 . The patch is http://drupal.org/files/issues/favicon_state_0.txt
Now the problem is, I can not see my favicon at all. I tried all possible combo of admin->themse (I am using bluemarine) but it seems they have been disabled by this patch. I am looking to use bannter module for which I really need upload.module with images working but I also want favicon to work :)
Any solution ?
Boat Dealers | Looser Who