First, I apologize if this is a duplicate post. I've seen the question raised repeatedly, all the way back to 2006, with a lot of suggestions but no real answer.

I have user pictures enabled. The folder is sites/default/files/pictures. The picture image path is set in User Settings.

It has been working correctly since I enabled the feature (several months). I have a small number of users, but their pictures upload correctly, and display correctly.

The other day, I created a default picture called avatar.png, and put it in the pictures folder. I uploaded that image directly through cpanel.

Then I typed in the name of the image (avatar.png) in the Default Picture field in User Settings.

As soon as I tried to save the configuration, I got an error message: "The directory does not exist. The settings have not been saved because of the errors."

It also changed the content of the Picture Image Path field. The original content was simply the word "pictures", which was in accordance with the instructions to enter the name of the subdirectory where pictures will be stored. After the failed save, the field now read "/sites/default/files/pictures".

Now, no matter what I do, I can't get it to accept anything. Even if I reenter exactly the same information in the field, I keep getting the "directory does not exist" message, when clearly the directory does exist.

In the other forums, suggestions so far include changing the folders permissions, deleting and recreating the folders, and even commenting out a certain line in the user.module. I've tried all except hacking the module, and nothing works.

The thing is, it was working until I tried to add a default image.

One more thing. someone suggested that there might be a problem with the "user_picture_path" variable in the "variable" table of the database. Well, I don't seem to have that variable in the table.

Is it as simple as adding that variable, or is there something bigger going on?

I really need help with this one.

Thank you in advance.

Comments

gcassie’s picture

so, none of the user pictures work now, or just new users/edits are having problems?

can you remove the default picture settings?

are you running drupal in a subdirectory (www.example.com/drupal)?

m_i_c_h_a_e_l’s picture

I can't say with certainty that none of the existing pictures worked after the problem started. I think they did.

The problem is that, in trying to follow the various suggestions offered in this forum, I deleted the folder and recreated it. I gave it full permissions (777) just to be sure. But now, no matter what I do, I still get the "directory does not exist" error. Users can't upload new pics, and it doesn't even recognize pics added through cpanel.

I'm stumped.

By the way, am using drupal in a subdomain (drupal.example.com), but that has never been a problem. If you look through the forums, you will see that a lot of people seem to have similar problems.

Please keep thinking through this. I really need the help.

Thanks.

seemas’s picture

CHECK YOUR TMP DIRECTORY IF EXIST
MAKE IT 777

Elehas’s picture

You probably don't want to do this. I was having this issue but realized that I was just uploading images through the image CCK field. So I deleted the Image module and voila, no more errors.

So possibly, you can do this, then re-upload it. By rights, all of your content would still be stored in your DB so I can't see data loss. backup your site first lol

ashoksharma’s picture

To solve this, go in the database and find a table named 'variable'. In this table find out the entry user_picture_path and put a value like this - s:8:"pictures"; where '8' is the length of the path string - 'pictures' which should be in the directory specified in the file system configuration.

After setting the variable go in the user settings and change the path accordingly (in this case just write - pictures) and save it.

Now it should work