Gossamer Forum
Home : Products : DBMan : Installation :

Help with Upload Mod: internal error

Quote Reply
Help with Upload Mod: internal error
I have a working version of dbman (http://www.danceplace.org/cgi-bin/dbman/db.cgi)and I've even customized my own db a little bit (http://www.danceplace.org/cgi-bin/dbman/db.cgi?db=performance).

However, when I try to add the multiple file upload mod, I get the error message "DBMan encountered an internal error. Please enable debugging to view." You can see the error at http://www.danceplace.org/cgi-bin/dbman2/db.cgi.

I have checked and triple checked ascii mode, permissions, and have quadruple checked the code. I called my isp and they do have cgi.pm installed. I also tried debug mode on as well as off, and setting $db_script_path to full directory.

I searched through the forums but didnt' find anything that could help.

I am stuck on what to do next. Here are my upload mod files that arent' working:
http://www.danceplace.org/txtfiles/default_cfg.txt
http://www.danceplace.org/txtfiles/html_pl.txt
http://www.danceplace.org/txtfiles/db_cgi.txt

Can anyone help me? I am obviously missing something and I can't see it.

thanks!
Quote Reply
Re: [hhalvor] Help with Upload Mod: internal error In reply to
First thing I noticed in your html_record form is you have:

<TR><TD>

|;
if ($form_upload_add) {
print qq|<tr><td colspan=2>You may upload up to $MAXIMUM_FILES files, for a total of
$MAXIMUM_UPLOAD bytes.</td></tr>|;

then at the bottom:

<TD><INPUT TYPE="FILE" NAME="file-to-upload-$u" SIZE="50"></TD></TR>|;
}
}
print qq|

</TD></TR></TABLE>

If you are going to insert this within your original table you will need to put this within another table:

<TR><TD><TABLE> |;

and then close the table within your bottom closing tags:

</TABLE></TD></TR></TABLE>

or else just get rid of those table tags and use the cell calls within the image upload mod.

In your sub html_record you have:

<TABLE><TR><TD>
if (-e "$SAVE_DIRECTORY/$rec{$db_key}") {
opendir (GRAPHIC, "$SAVE_DIRECTORY/$rec{$db_key}") or &cgierr("unable to open directory: $SAVE_DIRECTORY/$rec{$db_key}. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}/$file">|;
}
}
</TD></TR></TABLE> |;

This needs to be:

<TABLE><TR><TD> |;

if (-e "$SAVE_DIRECTORY/$rec{$db_key}") {
opendir (GRAPHIC, "$SAVE_DIRECTORY/$rec{$db_key}") or &cgierr("unable to open directory: $SAVE_DIRECTORY/$rec{$db_key}. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
next if ($file =~ /^\./); # Skip "." and ".." entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|<img src= "$SAVE_DIRECTORY_URL/$rec{$db_key}/$file">|;
}
}
print qq| </TD></TR></TABLE> |;

Hope this helps, as I stopped looking after these errors.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Help with Upload Mod: internal error In reply to
Wow, thanks a million, Lois!

It's working great now--I was able to log on and upload an image. Wheeee!

Thanks SO much for getting me over the hump!
You are the best.

HollySmile