Gossamer Forum
Home : Products : DBMan : Customization :

Serious troubles with upload mod

Quote Reply
Serious troubles with upload mod
Hi all,

I'm trying to get the file upload mod going with my db man and NOTHING is working. I've tried tried coding the mod a total of four complete times with NO LUCK. I'm at wits end and I don't want to just pay someone to do it (I want to learn).

The only way I can figure to get help with the debugging is to post each of the three files that get modified and hope that someone with the time and experience will feel like looking them over. (If you do I will forever be endebted to you and will put you on my personal list of truly generous heros).

If you are feeling bold and generous please have a looks at my default.cfg, db.cgi and html.pl files posted at

http://216.15.61.234/upload_mod.txt

If you would like me to do anything to make the files easier to look over or see where the code has been modified please let me know. In fact if there is ANYTHING I can do to make it easier fo you to give me help please let me know.

Thanks, Michael



Quote Reply
Re: Serious troubles with upload mod In reply to
Does anybody know anybody who might be able to help with this for a nominal fee? I know its a simple matter of a few dots and slashes. Please...any help is greatly appreciated.

Michael

Quote Reply
Re: Serious troubles with upload mod In reply to
Michael, I'd be happy to take a look at your files if you would save each of them as separate text files and upload them to your server. I went and took a look at the url you provided but having all three files into one display just doesn't work when you need to switch back and forth between them to look for problems.

Quote Reply
Re: Serious troubles with upload mod In reply to
Karen,

Thankyou so much!! Here they are, separated out.

http://216.15.61.234/default.txt
http://216.15.61.234/db.txt
http://216.15.61.234/html.txt

If you need info let me know. I seriously appreciate this.

Michael

Quote Reply
Re: Serious troubles with upload mod In reply to
Perhaps I need to clarify my situation.

I'm pretty sure I have only a few dots and slashes out of place. This probably isn't a huge fix and I really need someone's help.

Is there anyone out there with a working single file upload mod that can post them as text files to their server? I can probably figure out my problem that way. Please...anyone who can help me with this?..I'm desparate and alone...


Quote Reply
Re: Serious troubles with upload mod In reply to
I know exactly where the problem is.

In the default.cfg file you have this:

Userid => [17, 'alpha', -2, 15, 0, '', '']

CHANGE this line to this:

Userid => [17, 'alpha', -2, 15, 0, '', ''],

In other words, you forgot to ADD a comma at the end of the line.

Hope this works for you. Can I have my $50? j/k

Smile

Quote Reply
Re: Serious troubles with upload mod In reply to
ZOIST IS THE KID!!!

You rock. That was exactly the problem.

Thank you so much.

Mike
www.swaylocks.com
www.palergraphics.com

Quote Reply
Re: Serious troubles with upload mod In reply to
It took me a while to figure out my cfg file when I installed the mod.

I might email Carol (JPDeni) & tell her about this.

Quote Reply
Re: Serious troubles with upload mod In reply to
HI all Veterans and members,

I am wondering if anyone knows how to
showing a pdf icon on the screen when the pdf file is uploaded.
and If you able to modify more ,
Could insert a clickable download link
which make possible also
download a pdf file direct from web?

Thanks

Quote Reply
Re: Serious troubles with upload mod In reply to
Use something like this:


<a href="$SAVE_DIRECTORY_URL/$rec{$db_key}/$file">
<img src=&quot/images/pdf-ico.gif" border="0"></a>


Good luck! Smile


Quote Reply
Re: Serious troubles with upload mod In reply to
Thanks for your Information.
I have thought about that way yesterday all day long.
I do not know where to put this change in the html
or should put it in the cgi?
would you write more where i should change?

thanks





Quote Reply
Re: Serious troubles with upload mod In reply to
I assume you're using the file_upload2.txt mod or similar.

In the html.pl file & in the sub html_record, find this:

|; # to close off a previous print qq| statement
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key};
foreach $file (@files) {
if ($file =~ /^$file_test\./) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file">|;
$graphic_found=1;
}
}

Change the above <img src= "$SAVE_DIRECTORY_URL/$file"> to the code I gave you in the previous post.


Quote Reply
Re: Serious troubles with upload mod In reply to
Hello,

Thanks for the reply.
I tested it while this massages on the board
and tried with making a link instead of showing
a graphic directly on the sub html_record_long
mode. as with;
print qq|<a href= "$SAVE_DIRECTORY_URL/$rec{$db_key}/$file">Graphic</a>|;

As of sugetions of yours,
Works it with three different modes?
This multiple upload function is for three gif, jpec, pdf
types of files.
If i follow as your code,
will not showing a same pdf_icon
although the file is gif format?
How could i apply this for three different
format?

I have a another big problem.
first i installed a administrator for dbman which
enables to change a cfg, def, pass directly on the menu
as like admin/files/cfg.
and then i applied this multiple mode.
when i change the cfg file on the menu directly writes a
unknown character 333 or 363 and lead a error.
I tried to look at it with bbedit program but
this unknown code is not to be seen.
I think the changes in cgi of
sub parse_form lead to this problem.

I am really new to all the perl language.
Please could you look up the problems?

thanks,