I am new to Drupal, and has installed it at two sites. At one of them it won't upload images either at the "Upload" module or, more important, the "Acidfree Photoalbum". It works at the other site, so I must have done a small mistake. Could you explain me what it is? I may give you admin-access to check my settings, if needed...

Comments

WillieBHines’s picture

I don't have time to debug it, but my first guess would be permissions. Have you let the /files directory be writable? Chmod it to 0777 at least to test so you know that permissions aren't the problem.

Ørjan’s picture

But I already have CHMOD /files. When I try to upload, I get the following error log:

warning: fopen(private/filemanager.lck) [function.fopen]: failed to open stream: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 849. 
warning: flock(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 850. 
warning: mkdir(private/working) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828. 
warning: mkdir(private/working/0) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828. 
The selected file /tmp/tmp_KgVcjV could not be uploaded, because the destination private/working/0/tmp577167205_large.jpg is not properly configured. 
warning: flock(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 855. 
warning: fclose(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 856. 
warning: fopen(private/filemanager.lck) [function.fopen]: failed to open stream: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 849. 
warning: flock(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 850. 
warning: mkdir(private/working) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828. 
warning: mkdir(private/working/0) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828. 
The selected file /tmp/tmp_KgVcjV could not be uploaded, because the destination private/working/0/tmp577167205_small.jpg is not properly configured. 
warning: flock(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 855. 
warning: fclose(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 856. 
warning: fopen(private/filemanager.lck) [function.fopen]: failed to open stream: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 849. 
warning: flock(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 850. 
warning: mkdir(private/working) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828. 
warning: mkdir(private/working/0) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828. 
The selected file /tmp/tmp_KgVcjV could not be uploaded, because the destination private/working/0/tmp577167205_thumb.jpg is not properly configured. 
warning: flock(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 855. 
warning: fclose(): supplied argument is not a valid stream resource in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 856. 
Your acidfree photo was created.
WillieBHines’s picture

Hmm. All these things:
warning: mkdir(private/working/0) [function.mkdir]: No such file or directory in /home/dyrepass/public_html/modules/filemanager/filemanager.module on line 828.

Have you tried under admin-settings-->file system settings -- -choosing "public" instead of "private." Maybe there's a problem keeping these downloads private. Even if you eventually WANT things private maybe you could do this just to test if that's the problem.

Ørjan’s picture

Thats not the problem either, I have at ?q=admin/settings (wich you refer to), the Download Method set to "Public". File system path is /files and it is CHMOD 777... its got to be something else...

Noticed now that when opening the Acidfree Admin module, it says in the top these warnings:

Neither exiftran nor jpegtran are available — lossy jpeg rotation will be used instead
The configuration options have been reset to their default values.
Neither exiftran nor jpegtran are available — lossy jpeg rotation will be used instead

dale42’s picture

How large is the file you're trying to upload?

Maybe your php.ini max file upload parameter isn't large enough for the file. Try a very small file and see if it works.

Ørjan’s picture

* I have tried to upload a VERY small .gif, and it doesnt work either...
* By the way, what does the "Throttle"-function mean? I have it at admin settings for blocks.
* And how do I control what is public for anonymous users/not logged in? I want to change the front page to something else, and "hide" some of my blocks, wich are visible for anyone.

Ørjan’s picture

It works for me to upload the pictures now, though I still get a whole page with error messages right after uploading, all seems fine in the album. How could I get rid of the error messages....?

casperl’s picture

I have had a LOT of problems getting this to work, and I got the same errors in Acidfree mass import as on the top post.

There is a remaining problem where I get this error x 4 times on the page after saving settings under > admin > settings > filemanager while simply displaying this page creates this error x 2 time:

warning: Invalid argument supplied for foreach() in /home/sitename/
public_html/testdir/includes/form.inc on line 459.

After lots of fiddling the following worked for me:

(Assuming a Linux host, Drupal 4.7.3 or 4.7.4, Filemanager and Acidfree installed from the current 4.7 modules)

1) File System Settings (> Administer > Settings > File System Settings > Download Method)
* Private file transfers enabled
* File system path set to "files"
* Temporary directory set to /tmp

2) Filemanager settings (> Administer > Settings > File Manager)
* Public file system path: "files"
* Public file system URL: "files"
* Private file system path: "private"

3) Directories
* The dir mywebsite/files has to exist and be world writable (chmod 0777 mywebsite/files)
* Private dir placed as mywebsitedir/private and NOT world accessable as "chmod 0760 mywebsitedir/private" although I initially set this dir as 0777 in order to get AcidFree up and running. Ideally this dir has to be outside of mywebsite/files
* Once AcidFree works, a number of additional directories will be created inside of mywebsite/files - if those dirs are not being created, something is not right yet!

4) Schizophrenia
* All the above steps still did not work, no matter how many times I tried. No matter what I did.
* But, the next day, it worked - after I did it again. I have no idea why. This could be related to the fact that I run in a virtualized account at the hosting co, it could be that the hosting co has a caching scheme or something else!

And, for the record, I prepared a different post to this thread and tested again before posting that info, and Acidfree suddenly worked! But this is the sequence of things I have tried sans success from the cancelled post.

* Have tried with/without .htaccess under ./sitedir/files
* Sites that run in a subdir (http://mysite.com/anothersite) and a root site (http://mysite.com/)
* Placed a full url (mysite.com/files) vs just (files) in > admin > settings > filemanager > Public file system url. Ditto for public and private system URL's
* Created dirs under files and applied chmod 0777 to the dirs, copied working files structure from working site on same server etc
* Created a brand new site with the same error
* Loaded acidfree / filemanager on an existing, working site with the same problem
* Removed the acidfree module with the same filemanager problem
* Howled at the moon in frustration!
* Changed the attribs of the ./private dir to chmod 0600 to make it inaccessible over the web and tried chmod 0777 to see if that maybe works and had ./private alternate under ./files/private and under ./siteroot/private
* Tried letting Drupal handle file transfer (> administer > settings > File system settings > Download method ) alternately as private / public on different affected sites
* Nuked the tables and started setting up the site from scratch
* Manually running cron.php in case this fixes something
* Set up a bare-bones sites with only minimum modules plus filemanager + acidfree
* Copied settings screen by screen from a working site
* Spent 2 x half-days on this!

(The Schizophrenia module!)

danonne’s picture

I had the same problem,
I went to admin -- >settings --> filemanager and private folder name was in red and an error message said that private folder did not exist. I created it in my site structure and it seems to haev solved the problem :)
I am a complete beginer with this so i do not know if its a proper fix but it worked for me
hope it helps

Ørjan’s picture

Where did you create it? And did you add some files to the directory /private?