File uploads are failing with this error:
user warning: Field 'fdesc' doesn't have a default value query: INSERT INTO webfm_file (fpath, uid, fsize, fcreatedate, perm, fmime) VALUES ('C:\\Inetpub\\Drupalfiles\\default/files/test.wmv', 1, 12973, 1231956995, 0, 'video/x-ms-wmv') in C:\Inetpub\Drupal\includes\database.mysql.inc on line 174.
Could not insert C:\Inetpub\Drupalfiles\default/files/test.wmv into the database
Insertion into database fail
System setup is Drupal 5.x on Windows 2003 with IIS6.
IUSR_name does have full access to the sites temporary directory and the location where files are to be stored.
Comments
Comment #1
phen commentedI had this problem too. I resolved it by modifying the 'fdesc' field, changing "NOT NULL" to "NULL". Seems to work, though I suppose I could be causing subtle problems. I doubt it. Run some SQL on your database similar to the following:
hope this helps.
Comment #2
meichr commentedIn version 6.x-2.11 this problem has been addressed in the module by setting the field 'fdesc' to a default value of '' if not set, so I'd suggest to backport this behaviour into the 5.x-2.15 version too. With the attached patch the 5.x-2.15 version can be patched with the 6.x-2.11 solution.
Comment #3
resting commentedI have this problem too using webfm-5.x-2.15.
How do I apply the patch?
Am I supposed to take the codes in the patch file and paste into webfm.module??
Thanks
Comment #4
cgmonroe commentedFor how to apply a patch to a Drupal module see:
http://drupal.org/patch/apply
An alternative for simple patches (like this one) is to open the patch file (it's only text) to look at the changes made. Here's what the patch files looks like: (Note that learning to do a proper patch is best as most patches have lots of changes.)
The --- and +++ lines indicate the file being modify (e.g. webfm.module)
The @@ lines will indicate the approx. line number to change and if possible the function that contains it (e.g. about 2583 in webfm_dbinsert_file).
The + lines indicate the lines to add. (- would indicate lines to delete). DO NOT ADD THE + or - part.
The untagged lines are the lines above and below the code change. E.g., the lines above the two lines to add would be:
So the patched section of code would look like:
Comment #5
nhck commentedFixed in CVS.