Closed (fixed)
Project:
Web File Manager
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2007 at 13:20 UTC
Updated:
22 Mar 2007 at 19:21 UTC
Hi everyone.
I'm working on a company intranet based on drupal.
I had everthing up and running and even looking good on a linux box.
But out IT manager didn't like that...don't ask me why.
I had to set everything up again on a win2k3 with iis6.
I'm running PHP 5.2 and mysql 5.2.
Got everything pretty much to work except for the webfm module.
I keep getting those 'mkdir fail' errors.
Anyone and idea? I had it working before..settings are the same..I think :-s (i'll triple check)
thx for any help
Comments
Comment #1
robmilne commentedI have not ever tried to get webfm working on anything other than apache so I do not have any specific insight here - you are in uncharted waters. Off hand, a refusal to make a directory sounds like a permissions issue. Check the properties of the containing directories and open them up.
Comment #2
robmilne commentedOh, I forgot to add that IIS cannot tolerate clean urls so make sure they are turned off. If you are stuck and cannot get to the settings page to disable clean urls then make the change in the clean_url record of the variable table.
Comment #3
andremolnar commentedI would like to hear if you were able to diagnose the problem. I'm going to start collecting information to build up a knowledge base for webFM. Like rob said, IIS6 is uncharted water for webFM. BUT - I can assure you I have webFM working in a WAMP.
andre
Comment #4
Pjeirke commentedHi Everyone.
robmilne was partly right with the rights. I had to add the iis user with enough read+write rights.
So i'm able to create folders, list files.
Only one problem left.
This is what I get when I try to upload a file.
user warning: Field 'fdesc' doesn't have a default value query: INSERT INTO webfm_file (uid, fpath, fname, fsize, fmime) VALUES (1, 'files/documenten/Peter_Coeck.jpg', 'Peter_Coeck.jpg', 2029, 'image/pjpeg') in C:\Inetpub\wwwroot\intra\includes\database.mysql.inc on line 172.
webfm_dbinsert_file() failed
I recreated the table, but same problem.
Comment #5
Pjeirke commentedforgot to add this to the previous post.
"Query Failed: Could not insert file into the database"
So when I add a file manually to the webfm folder, it's listed.
But I get the message
file files/webfm/peter_coeck.jpg has no db record.
I'll be working on it today.
Peter
Comment #6
brashquido commentedSorry for getting off track a bit, but just wanted to correct robmilne on something. You can actually use clean url's with IIS. It is not as straight forward as Apache as Drupal (and most contrib modules) is predominately written with Apache in mind, but it can be done. I've written a guide on it here;
http://www.iis-aid.com/articles/how_to_guides/using_drupal_clean_urls_wi...
Comment #7
robmilne commentedSince I have no experience with serving drupal via IIS I really appreciate the effort and advice.
The trouble with the webfm_dbinsert_file func may stem from the table structure. A quick look at the webfm_file table shows that the desc field is of type 'text' and has no default value. Perhaps substituting 'mediumtext' or 'longtext' for 'text' and will fix the bug. I'll get Andre to review the issue since he wrote the function.
As an aside, I'm not happy having the metadata fields included into the webfm_file table. I'd much rather have them as a separate set of tables that are scalable and configurable ala CCK or flexinode. They are there today because of the time constraints imposed by the delivery of the module to its original customer. What I'd like to find the time for is to add a proper RDF/XML interface.
Comment #8
Pjeirke commentedrobmilne,
thank you for the hints.
I'll mess around with things a bit. See what it does.
I have tried setting fdesc to LONGTEXT. didn't help much, but I'll keep you posted.
Comment #9
Pjeirke commentedno idea why it won't work...
Made my boss believe that IIS6 and apache are the same, so this request is no longer needed for me
Comment #10
robmilne commentedPerhaps this will help:
http://ca3.php.net/manual/en/function.mkdir.php#71880
Probably more than a few places will have to be touched. If you feel adventurous and want to try adding the cross OS support I'll be more than happy to commit a patch.
Comment #11
robmilne commentedI had a quick look at webfm_file.inc and realise that the solution might be as simple as changing the chmod value to 777:
function webfm_mkdir($source, $dest){
$mkdir_path = ($source.'/'.$dest);
if (!is_dir($mkdir_path)) {
if(@mkdir($mkdir_path)) {
chmod($mkdir_path, 0775);
if (!is_writable($mkdir_path))
drupal_set_message(t('The directory %directory is not writable.', array('%directory' => $mkdir_path)));
else
return TRUE;
}
}
return FALSE;
}
Try this if you haven't already tried.
Comment #12
Pjeirke commentedI'm not really using IIS6 anymore, but I tried what you said.
Now it does upload the file. You get to see it in the folder tree, but you get this message.
'The removal of the original file c:\windows\temp\tmp4.tmp has failed.
file_move to files/webfm failed'
If I check the webfm folder, the file is actually there.
I still get the message 'file files/webfm/Peter_Coeck.jpg has no db record'
But I am able to open the file.
Comment #13
Pjeirke commentedI'm also not able to attach the file in a node.
Comment #14
Pjeirke commentedSorry guys,
but I had to reopen this one.
After being almost chased by my boss I had to move everything from apache to IIS6.
And guess what? :-)
Web file manager works now.
I had to make sure the iusr user had enought rights to drupal's file system folder.
I'll be doing a clean reinstall and see if things will work this time.
Comment #15
robmilne commentedI'm glad for your success. Do you still require the 777 permission inside the mkdir routine of webfm_file.inc? If so I will commit that change.
Comment #16
Pjeirke commentedNo change need to be made.
Just make sure the files folder has enough permissions.
thx for your time.
All seem to be working well now on IIS6
Comment #17
andremolnar commented