Throwing Errors when I add Files

11 replies [Last post]
dlstorminc
Offline
Joined: 05/08/2011
Status: 
Answered

Hi there,

I'm getting the below errors when I add a file, the file can be 90kb or 4 megs and it still throws the same errors. I'm thinking its a permission problem from the way its looking, how can I fix this issue to get up and running? Using Drupal 7.2 newest release. Thanks much

Notice: is_dir() [function.is-dir]: Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 444 of /homepages/24/d368080430/htdocs/myambientworldnet/includes/file.inc).
Notice: is_dir() [function.is-dir]: Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 444 of /homepages/24/d368080430/htdocs/myambientworldnet/includes/file.inc).
The directory private://ms_files is not accessible

Simple fix? I'm hoping...

Thanks for the help in advance. Looking forward to getting up and running shortly.

Will

Leighton Whiting
Offline
Joined: 06/02/2009
This is an issue with the

This is an issue with the Private Files directory not being configured properly. You can configure it in the Configuration->File System page.

I'm going to add a check in File Downloads Suite that will make sure the private files directory is configured properly, and give instructions to fix it if it is not.

Sincerely,
Leighton Whiting

dlstorminc
Offline
Joined: 05/08/2011
Is the private directory fixed?

The directory private://ms_files is not accessible

Hi again Leighton,

That is what I keep getting now when I add a file. I changed the path to private to the following:

sites/private

Is there another location I'm suposed to put it to? Also tried just private without it working too...

Here is what I'm doing on my end to get this...

Add a file download plan...

Alarm201.ogg as well as a name such as Alarm by itself... still throws error...

Desc...

File small OGG file, MP3... anything small just to test.

Select a existing file: None shows

Role To Grant: none or Admin... I leave to none... and is there a way to change that? and how?

Download limit, IP and expire: 3

Price: 0.99 as well as tried .99 and even 1.99

and goto save abd the error pops up. I figure I'm close to getting it working thou. What is the last [part of this I need to do? Also, I tried to raise the file size from 8 megs up, how do I do that? is that an easy fix as well? I get conflicting papers telling you how to do it on drupal, so thats why I'm asking and what exactally IS the biggest file you could add? I was hopeing upto 50 meg files since I have WAV files I need to release as well with my MP3 and OGG files I'm selling on my site.

Thanks so much for the help. Hope to be running soon. And yeah maybe I missed about the private directory, i didn't see it in the papers on setting this all up. But perhaps I missed it, since I dont always see everything the first time through.

Thanks for the help...

Will

Leighton Whiting
Offline
Joined: 06/02/2009
Will, Are you creating the

Will,

Are you creating the directory manually first, and then entering the path in the File System settings page, or are you entering the path to a non-existent folder and letting drupal create the directory? I always do the latter, and it works for me.

Sincerely,
Leighton Whiting

dlstorminc
Offline
Joined: 05/08/2011
Yes, I crated a private

Yes, I crated a private directory in three unique places and even setup permissions on one to allow read and write. Still not working. I know how to do creating of the directories but is there a special place or way I need to make it? Your setup directions don't walk you through every step, and it is not as easy to setup your download system as you lead on to believe on the web site front. Please help, this is frustrating. Thanks.

Will

Leighton Whiting
Offline
Joined: 06/02/2009
Will, Setting up a proper

Will,

Setting up a proper private files directory is really a Drupal requirement as opposed to a File Downloads Suite setup step.

It sounds like you are going about it wrong. If you create the directory yourself, then Drupal won't have the ownership of the directory and won't be able to write files to it properly. Here's what you need to do:

1) Make sure that your sites/default folder's permissions is set to 777 so that Drupal can create the private files directory. You can change it back to whatever it was after this is done.

2) Make sure there is no directory named 'private-files' in the sites/default directory. If there is, delete it.

3) Go to the File System configuration page and enter 'sites/default/private-files' . Since the directory does not exist, Drupal will attempt to create it.

You should now have a properly configured private files directory and be able to upload files.

Sincerely,
Leighton Whiting

dlstorminc
Offline
Joined: 05/08/2011
Leighton, Hi again... Ok,

Leighton,

Hi again...

Ok, tried doing what you said above, and its still throwing The directory private://ms_files is not accessible error. Even put

Default download method
Public local files served by the webserver.
Private local files served by Drupal.
This setting is used as the preferred download method. The use of public files is more efficient, but does not provide any access control.

On both settings, and still, Error.

I tried what you said the first time and it created the directory, so I them created another directory near it called: sites/default/private-files2 then permissioned it with what you suggested of 777. Saved and went to build a file, using the general, and it throws the MS_files error...

I have went through and added permissions of 777 to all directories as well as tired to do 755 and still same result. Why does it tell me that Private for MS_FILES thou? I don't get that... wouldn't that mean it's looking for a MS_FILES directory? or a private in that directory?

Possiblly I could have something configured wrong, but I dont know. I stumbled upon your download script for Drupal, ordered it and only could get Drupal 7 to work on my 1 and 1 server. So... Any other things we could try? I'm out of ideas. If I get it I'll write here but right now, its not looking good. Thanks again for the help so far.

Will

Leighton Whiting
Offline
Joined: 06/02/2009
Will, Hmmm, I better just

Will,

Hmmm, I better just take a look at it. Can you open a support ticket and make sure to include the url and drupal admin login information, so I can take a look at the settings?

Sincerely,
Leighton Whiting

dlstorminc
Offline
Joined: 05/08/2011
Sure will send you the

Sure will send you the info
Thanks

dlstorminc
Offline
Joined: 05/08/2011
Woohhhooo you fixed it, Thank

Woohhhooo you fixed it, Thank you!!!

Besure to post the problem how you did it so others can learn from it :D Really a huge thank you for hooking me up. Glad its finally fixed now onto learning how to setup the files and everything. Too, I noticed you cant upload just a MP3 or whatnot, it has to be in ZIP. That's ok too...

Now last question... how do I change the file size setting? That's all I really have left to figure out. Thanks man for this and helping.

Will

PS can you email me the info on how to do that? Thanks

Leighton Whiting
Offline
Joined: 06/02/2009
The problem was that File

The problem was that File Downloads Suite was installed before the private directory folder was setup in the File System settings page.

File Downloads Suite is supposed to check that the private directory is set up before it allows itself to be installed, but it looks like the code wasn't being checked during install because the hook_requirements needs to be in the .install file. I've moved it to the install version for the next release to fix this.

Setting up the private files directory and reinstalling File Downloads Suite fixed the problem.

You can set the allowed file extensions in the File Downloads Suite settings page, so it can allow MP3s. Also, there are various tutorials out there for changing the upload file size limit. Most of them involve adding a line of code to your settings.php file. Here's a page from the drupal documents: http://drupal.org/node/97193

Sincerely,
Leighton Whiting

dlstorminc
Offline
Joined: 05/08/2011
Leighton, Sweet. Will

Leighton,

Sweet. Will research the file changing size thing more too. I love the download kit, great work man. Guess this closes the bug. Thanks for the help. Glad to be up and running finally. Really loving your suite. Thanks for creating it.

Will

Twitter Feed