I'm trying to enable pictures for users in drupal 5 by going to Home › Administer › User management -> User settings... I check "enable picture support". I use the default directory "pictures", which is in the files folder. httpdocs/files/pictures is also writeable. Heres the error I'm getting:

* The directory pictures does not exist

Has anyone else experienced this?

Comments

gromok’s picture

I had the problem as well. I tried to put my avatars into pictures/userpics. Both directories did not exists at this point of time.

my solution was to create a directory "pictures" manually and give it chmod 777. afterwards the directory "userpics" successfully was created and the errors were gone..

ngstigator’s picture

I had the same problem, and finally "fixed" it by: (follow closely the steps don't seem to make sense)

  1. Ensure that there is a "pictures" directory in your "files" directory. If not, create one to get "files/pictures";
  2. Create another "files" directory so that you get "files/files";
  3. In the "files/files" directory, create a "pictures" directory i.e. "files/files/pictures";
  4. On the "admin/user/settings" page, set your user pictures directory to "pictures";
  5. The error is gone... can this be true?

I tried uploading a user picture. It works! What's more, it resides in "files/pictures", not "files/files/pictures" as I might've expected. Bug? Probably.

Got a tip from http://drupal.org/node/116910. I should also note that my installation is not straightforward, as I separated core, modules, themes, and sites into different CVS controlled directories, and symlinked everything together as Boris suggested.

drshields’s picture

Thank you very much for posting your technique -- Oddly enough, your technique worked for me too. Must be a drupal bug.

bikracer’s picture

Thank you so much for posting this solution. I'm jumping for joy!!! :-)
I nearly tore my hair out last night trying to figure out the solution to this problem. I scoured the forum last night too but couldn't find any help. Your solution solved my problem. Actually it's pretty logical if you think about it, it's just giving Drupal what it wants.
Thank you again,
Tracey

Winning doesn't teach you anything. You win. End of story. But the losing and what you take from it -- that's the interesting bit.
--- Hugh Laurie

ngstigator’s picture

please delete me

florian’s picture

I am running a few Drupal 5.1 sites some of them configured as multi-sites for internationalization purposes and I use the same hosting company for all of them. The fact is that user images are displayed only if I set the download method to public, otherwise only links "user's picture" pointing to the user, appears. This is strange because I have done un upgrade from 4.6 and I have to use the private method. With 4.6 everything was trouble free.

I have noticed that the path issues is gone if change the entire file system .. for example change files to files_something ... but moving the data to this new "file_system" does not solve the problem. This is strange also.

We have to solve this problem because I am sure many drupalists have issues with this behavior of Drupal 5.

Florian
Puzzle IT | EU Copyright Office | Soft Channels | STReight

Florian

ivicaca’s picture

Although permissions could be a problem (try creating dir through php, to avoid 777 permissions) you should check if everything under Site configuration > File system is configured correctly.

johnhanley’s picture

I had this same problem. That is, the system complained that the pictures directory did not exist in sites/default/files/pictures even though it did.

Turns out that I had overlooked creating tmp inside sites/default on the admin/settings/file-system page. Once created the other message on admin/user/settings went away. This could be considered a bug because the error message is erroneous.

ali_a’s picture

hi drupalists,

I did all above but still no picture!
then I removed the .htaccess file in the static directory and I have pictures now!

__Tango’s picture

I've just gone through this on a 5.7 install. File system settings are "public" files, and the files directory existed and was writable to drupal, but the "tmp" directory was invalid (pointing to an invalid directory). I had the same "The directory pictures does not exist" problem that's being described here.

I even was walking through the code and couldn't figure out what was wrong. There was no mention of the tmp directory in any of the code or error messages.

I fixed the tmp dir as Bacteria Man explained, and then POOF, everything started working.

I just wanted to put in my two cents about this so folks who come across this might figure it out.

I also may take a crack at the bug that's causing this (but not until after my deadline!)

Good Luck All.

casperl’s picture

OK, this is open source, and if something does not work - fix it yourself! I know!

But, one year after the launch of Drupal 5, I upgrade a 4.7 site to Drupal 5.5 and I get this error.

For some reason, the path expects the user picture to be in siteroot/files/files/pictures

People, this is a bug. Spelled B U G - not a hitch or an issue or something troublesome!

The original post was dated 21 Jan 2007, today 4 Jan 2008, through iterations of version 5.0 to 5.5 later, this still happens. And none of the fixes in this post worked for me. If this has not been fixed (yet) it wil probably live on in v6 and v7 and beyond.

People, Drupal is a great package, but I don't have the skills or the time to get embedded in PHP development! I cannot fix this myself.

I have a serious complaint regarding the development chasing "featuritis" on the cutting edge of web development while seemingly issues (BUGS!) such as this never get fixed. If your ship leaks, plug the leaks first before you paint the deck!

This is not good!

Casper Labuschagne
Where am I on the Drupal map on Frapper?

casperl’s picture

I changed the file system settings to "Public" from "Private" and I changed the absolute paths in the file system dialogs to relative paths.

Great, this brought the user Avatars back.

However, I also use Acidfree - successfully upgraded from v.4.7 to 5. Thus all the paths in the table files now point somewhere else and Acidfree now does not display. And there are > 3,000 images. OK, I can change the paths in the files table with an update query, but....

Casper Labuschagne
Where am I on the Drupal map on Frapper?

fletch11’s picture

I've tried everything on here with no luck and it's driving me mad... any more suggestions?

Many thanks for posting what's worked for you though.

fletch11’s picture

I want to direct you to a very helpful post that may result in this issue getting fixed once and for all. This is the only thing that worked for me and would have never figured it out otherwise:

http://drupal.org/node/148601#comment-763525

good luck

Pushkar Gaikwad’s picture

For me, the suggestion to check file system entry worked. I was having c\temp instead of /tmp :)

Placement papers and Job Openings

alonpeer’s picture

It happened to me too, after I moved my localhost installation to the live server.
When I went to admin/settings/file-system I saw that the Temporary directory was wrong (it was set to my local temp dir). After changing it to the live server's temp dir, the "pictures" issue was solved as well.

Oblivious-1’s picture

I had this problem with a Drupal 6 installation I was asked to debug last night. I didn't have access to administrate the database directly, but it seemed like an illegal value somehow made its way into the variables table. The person setting up the site had somehow set the path to a fully qualified URL, something like "http://somesite/files/user_pics", and this appears to have locked things up a bit.

To remedy this and get the uploads working asap, I first created the folder "pictures" in the preferred files directory and set the permissions to allow Drupal rwx access. I then reset the bad value in the variables table to the system default by

1. placing the following in settings.php: variable_set('user_picture_path', 'pictures');

2. Loading the homepage in my browser (any page will do, really).

3. Then deleting the code from step 1.

This should work in 5.x too.

Erik

kongcs’s picture

Thanks. This solution works for me.

Duck Whistle’s picture

I had this problem (Drupal 7), but it turns out I´d set my files directory to 666 instead of 777.

cd sites/default/files
chmod 777 files

If you do 666 by mistake, Drupal happily installs but gets upset when it comes to pictures.

sandeep mehra’s picture

hello there
I have got manually
change database table value
table name :- variable
column name :- user_picture_path
value(that enter by you) :-s:8:"pictures";

thanks

rocknrico’s picture

I got the error to go away by changing the sites/default/files/pictures directory to 777.

diazcooper’s picture

This solution works for Drupal 7! Thank you Rocknrico.

aeremeev’s picture

Hi!

I have tried all possible solutions and nothing worked until I added this code to settings.php file
$conf['user_picture_path'] ='pictures';

This fixed the issue with saving the User Settings.

navinnd’s picture

All you need to do is modify the permission to 777 of /yoursite_hosting/sites/default/files directory. It will resolve the problem.

dooug’s picture

See the guide on securing your site files: https://www.drupal.org/node/244924
You should never be using 777 permissions.