I am a newbie to drupal and was changing the default image path. It used to say "images" but since the pictures that I uploaded were just showing the red X I assumed, that the default image path was at fault. So I changed it to "/public_html/files/images" and I got the following error:

warning: mkdir() [function.mkdir]: No such file or directory in /home/faithlut/public_html/includes/file.inc on line 91.
The directory does not exist.

So I changed it back to images and I get this error.

warning: mkdir() [function.mkdir]: No such file or directory in /home/faithlut/public_html/includes/file.inc on line 91.
The directory does not exist.
The settings have not been saved because of the errors.

Any help to fix these errors would be appriciated. Thanks.

Greg

Comments

xmodem’s picture

drupal knows its root directory so you would just need files/images or whatever it may be then i believe it needs write access in that images directory. and .htaccess should be setup right to make it safer.

dattilg’s picture

What does the .htaccess file do? I checked the file permissions on the images directory and it seems to have write permissions. Do I have to somehow "trick" the PHP to get rid of the error?

cog.rusty’s picture

Did you make it images or /images (the first one is correct).

What do you read under that text box, where it says Subdirectory in the directory "blablabla"?

Do you see any error message when you go to the general settings? (/admin/settings), in the "File system" section?

dattilg’s picture

I have tried it as "images"(no quotes). I checked the File System settings and it didn't show any errors. It is strange because I checked my ftp server and the images folder is right below the files folder.

cog.rusty’s picture

Make sure that your Drupal settings agree with the actual directories you have, just in case Drupal is looking somewhere else.

The files directory (in general settings) should be just files. Is it?

Also, do you have a writable files/images/temp subdirectory?

jono@ipman.co.za’s picture

with the admin/settings/images. There i have tried
images
files/images
drupal/files/images

write permissions etc all seem to be in order

cog.rusty’s picture

It should be just 'images'. Under that setting there is a help line:

quote: 'Subdirectory in the directory "files" where pictures will be stored.'

This help line changes according to what you have set up as the directory "files".

dattilg’s picture

Yep, I checked what you said above and it is set to the files directory. Also I beleive I have write access to the images/temp directory. I also noticed another directory under images called "tmp". I don't know why that is there but I don't want to delete it.

cog.rusty’s picture

Everything seems correct. Strange that the "directory does not exist" error comes up.

The web server should have read/write/list access to all these directories (files, files/images, and files/images/temp).

This means that they should have:
- permissions 777 if you created them yourself using FTP (if the owner is you)
- or at least permissions 755 if Drupal created them automatically (if the owner is apache).

dattilg’s picture

I checked the folders that you said above and changed the permissions so they all have a value of 777. I am still getting the error. One other thing that I was wondering my drupal site is housed in the directory "public_html" then it is files/images etc. Do I need to tell drupal that the files directory is in the public_html. If so, where do I do that? What should I do? Thanks for your help.

cog.rusty’s picture

No, public_html is your web document root. If Drupal is installed there, and 'files' is a subdirectory, you just enter files in Drupal's file system settings and everything should be ok...

-----

Edited to add: It is possible that the problem is with your 'tmp' directory, for which the default Drupal file system setting is /tmp (with a slash is front). This slash here means that /tmp is somewhere back, outside Drupal. You could create a new 'tmp' directory under 'files', make it 777, and change Drupal's setting to files/tmp (without a slash in front) so that you can see it and know what is going on with it.

paulliu812’s picture

Did anyone figure out a resolution to this issue?

dattilg’s picture

I talked with one of my tech friends who also uses Drupal for his website. What we did was the following: 1st I logged into my "myphpadmin" in my hosting service. Then I navigated to the variable table and browsed it. We found one field called "Default image path" I changed it back to images. Then once I logged out and logged into my site and went to the images module and said Restore to Defaults it put the directory back as images. Now I am able to upload pictures. Thank you all for your help in this matter. I now understand a lot more thanks to willing people who like to help.

oscarelloo’s picture

I made the same mistake today, changed "image" to a full http-adress. That was stupid. Now I can't change back and I tried the tip above and even deleting that row in the database and insert it again. I still can't change the default image path, very sad.

What else can I do?

/ Oscar