Gossamer Forum
Home : Products : DBMan : Installation :

Still having trouble with upload mod

Quote Reply
Still having trouble with upload mod
Is there a specific version of the CGI.pm module that the upload mod needs to work with? My server admin tells me I'm using ver 2.56. Perl is ver 00503.

If I run DBMAN without the upload code it works fine, but I keep getting internal server errors when I try to use the upload code. I can't even get into the logon screen, so I can't get any debug info.

I've checked my addresses and URLs -- they are exactly the same as in the code without the upload, so I know they're correct. All the permissions are set correctly. I've checked the upload code several times and can't see where I copied anything incorrectly.

Can anyone give me a hint as to where to look next? The HTML code? The CGI script? Help please.
Quote Reply
Re: [smithT] Still having trouble with upload mod In reply to
I had a similar problem on a shared server, where for whatever reason, I could not write to a file or directory that was in the "public" directory using a cgi script (dbman). The *exact same* script works perfectly fine on at least five of their other servers, but on this particular one I kept getting "permission denied". I didn't get very far with tech support...

Where is the upload directory? Is it in cgi-bin or is it in a public directory? Try changing the path to the cgi-bin (I don't believe this is a good idea for actual use) and see if it works for troubleshooting purposes.

Mine would work in any directory below the "home" or "www" directory (ie, cgi-bin, logs, etc) but as soon as I changed the path to something (www.domain.com/images) like /home/images/ or /www/images/ it would not work.

Quote Reply
Re: [Watts] Still having trouble with upload mod In reply to
Thanks for the suggestions. As it turned out, it was a syntax error casuing my internal server error -- I had used parens where it needed those curly brackets instead. That's what I get for being cocky and not doing a cut & paste for one line of codeSmile

So, anyway, now I've gotten past the internal error, but I have a new problem. When I browse the files to upload, even though I pick a perfectly acceptable jpg file, I get a file extension error and the upload of the picture is rejected, no matter where the file is located (C:\folder\photo.jpg or A:\photo.jpg). My cfg states:

$ALLOWED_EXT = '\.jpg$|\.JPG$';

What am I missing now?
Quote Reply
Re: [smithT] Still having trouble with upload mod In reply to
This is what I have in one of mine:

$ALLOWED_EXT = '\.gif$|\.jpg$|\.GIF$|\.JPG$';

So... your's looks right, not sure why you're getting the ext error.

<thinking out loud>
Could it be the file size? But wouldn't that generate a 'file size' error?
</thinking out loud>

Sorry I couldn't be of more help.
- Mike

The large print giveth, and the small print taketh away - Tom Waits

Quote Reply
Re: [Watts] Still having trouble with upload mod In reply to
Ive never understood that code.

Why would you want to predeclare the regex pattern?

Also it is twice as long as it needs to be to allow for case...

Last edited by:

PaulW: Dec 19, 2001, 1:27 PM
Quote Reply
Re: [smithT] Still having trouble with upload mod In reply to
You might not have all the updated changes for the upload mod. Please visit the FAQ and look under "Images"

There are a few fixes posted which might solve your problem.

Unoffical DBMan FAQ

Quote Reply
Got it! In reply to
Thanks Lois -- I found exactly what I needed after looking thru the FAQs. It had to do with the "Filename". I had changed it in a couple of places, thinking it should match the name in my cfg file, but I've seen the error of my ways.

It's working beautifully now.