Gossamer Forum
Home : Products : DBMan : Customization :

File Upload Division by zero error

Quote Reply
File Upload Division by zero error
I installed the multiple file upload mod. Every time I add or modify a record to include a graphic, I get a 'division by zero' error in the validate_upload sub. I am running NT server 4.0, MIIS. Other mods I have installed are:

Whos Online
Short/Long
Extra Permissions
Secure password lookup
Change Email/Password
get_email


Quote Reply
Re: File Upload Division by zero error In reply to
I did a quick search in the support forum and came up with the following thread which may help you to also solve this problem.

Check out:

http://www.gossamer-threads.com/perl/forum/showflat.pl?Cat=&Board=DBInst&Number=56377&page=&view=&sb=&vc=1

there are a few more threads listed if you search for "Illegal division by zero"

Hope this helps, please let us know

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: File Upload Division by zero error In reply to
I think it is a pointer in the right direction, thank you. I am unable to find an escape character to delimit the backwards slash with that makes BDman accept it without giving the

"The directory doesn't exist. Make sure that this directory is a complete path name, not a URL or something similar. It should look similar to /home/username/public_html/uploads" error.

At least it stopped the div by zero problem, ha-ha.

Quote Reply
Re: File Upload Division by zero error In reply to
Well, not having an elegant solution at hand and after determining that the files WOULD get uploaded to the $SAVE_DIRECTORY if I removed the directory created by the key field, I hacked at it a bit and came up with the idea of:

$savedir = $SAVE_DIRECTORY;
$savedir .= $in{$db_key};

Using the $savedir variable in place of the $SAVE_DIRECTORY/$newdirname worked very fine indeed. It did, however, entail putting in the forbidden slash at the end of $SAVE_DIRECTORY definition in the .cfg file.

Quote Reply
Re: File Upload Division by zero error In reply to
I've read along with this, but I wasn't sure if you had fixed it before or not.

Looks like you came up with a good solution.

JPD
http://www.jpdeni.com/dbman/