Gossamer Forum
Home : Products : DBMan : Installation :

File Upload Mod Directory Error

Quote Reply
File Upload Mod Directory Error
I installed the file-upload mod on my database and everything works except that I get the following error when I click the UPLOAD FILE! button:

CGI ERROR
==========================================

Error Message: The directory you specified isn't really a directory.
Make sure that this is indeed a directory and not a file.

1) I'm trying to allow people to upload photos.
2) I'm hosting with valueweb.com on unix.
3) I've put "photos" directories almost everywhere on the server with mod 777.
4) I've tried many possible paths to get to the "photos" directory.

The section in my default.cfg file reads:

# File upload parameters
# --------------------------------------------------------
#
# File uploads -- if you want to be able to upload files, set this to 1
$db_upload = 1;

# Full path to directory for uploaded files -- NOT A URL!!!! No trailing slash please.
$SAVE_DIRECTORY = "/photos";

# Full URL to directory for uploaded files. No trailing slash please.
$SAVE_DIRECTORY_URL = "http://www.ez-mtg.com/foreclosures/photos";

Thanks in advance for your help and kudos to the terrific script and the even more amazing support forum!
Quote Reply
Re: File Upload Mod Directory Error In reply to
Next time, since you're asking about a mod and not initial installation or configuration, please post your question in the other forum. Don't worry about it for now. This is just for future reference.

I see you have
Code:
# Full path to directory for uploaded files -- NOT A URL!!!! No trailing slash please.
$SAVE_DIRECTORY = "/photos";

This need to be the *full* path to the directory, not a relative one, as is in the example path in the mod text.

If that's not the problem -- that is, if you really do have the full path but didn't want to post it here -- try installing the original file upload script that I based the mod on. It's at http://www.terminalp.com/...ts/file_upload.shtml . Make sure that works on your system completely before you continue on with the DBMan mod.



------------------
JPD





Quote Reply
Re: File Upload Mod Directory Error In reply to
When I type "pwd" the path to the directory shows as:
/u99/kenahrem/foreclosures/photos

My default.cfg file has the following lines:
# Full path to directory for uploaded files -- NOT A URL!!!! No trailing slash please.
$SAVE_DIRECTORY = "/u99/kenahrem/foreclosures/photos";

# Full URL to directory for uploaded files. No trailing slash please.
$SAVE_DIRECTORY_URL = "http://www.ez-mtg.com/foreclosures/photos";

Permission on the photos directory is 777.
Permissions on file-upload.cgi is 755.

I checked out terminalp.com's script and it seems that everything is correct and that this should work.

Same error:

CGI ERROR
==========================================

Error Message : The directory you specified isn't really a directory.
Make sure that this is indeed a directory and not a file.

Thanks again.

Quote Reply
Re: File Upload Mod Directory Error In reply to
Okay. Let's give this a try.

In the file-upload.cgi script you picked up from my site, comment out the line:

$SAVE_DIRECTORY = param('SAVE_DIRECTORY');

(Put a # in front of the line line, so it looks like
# $SAVE_DIRECTORY = param('SAVE_DIRECTORY');

Define the $SAVE_DIRECTORY variable just like you did when you tried the original upload file. You can just copy that part of the script and paste it into the mod script. It's possible that something is happening to the directory information somewhere between the form in DBMan and the file-upload script.


------------------
JPD