Gossamer Forum
Home : Products : Others : Fileman :

STILL ERRORS IN FILEMAN NEW CGI!

Quote Reply
STILL ERRORS IN FILEMAN NEW CGI!
The upload feature still does not work... You got it half way working... it uploads it, it just uploads it into an empty text file with the name of it as 4502190. The actual name of the file is 1.html.
Quote Reply
Re: STILL ERRORS IN FILEMAN NEW CGI! In reply to
Give it another try, there was a naming conflict that I've fixed up..

Cheers,

Alex
Quote Reply
Re: STILL ERRORS IN FILEMAN NEW CGI! In reply to
I just downloaded the single version yesterday and it has the same upload bug. It's still not fixed Frown

HELP!!

-Cheers,
RJW
Quote Reply
Re: STILL ERRORS IN FILEMAN NEW CGI! In reply to
It's the same one that is on the web, so my guess would be that you are using a really old version of CGI.pm that doesn't support file uploads. To find out what version of cgi.pm you are using try:

#!/usr/bin/perl
use CGI;
my $in = new CGI;
print $in->header();
print CGI::VERSION;
print "<br>done!";

and see what it says.

Hope that helps,

Alex
Quote Reply
Re: STILL ERRORS IN FILEMAN NEW CGI! In reply to
you guys are lying.... You never onced changed that script... My company had to completly re-do the cgi. Horrible just horrible.

Everyone if you want the fix to the cgi head over to http://www.websworks.com/cgi/fix

I set this up to help everyone..

Gossamer Threads if you need help debugging your cgi-scripts I have the perfect company. email me let me know!

Btw- it has nothing to do with the cgi.pm version! It should work either way!

Good luck and I hope everyone visits the page on how to fix it....
Quote Reply
Re: STILL ERRORS IN FILEMAN NEW CGI! In reply to
I found the problem!!!

Around line 191 SHOULD be
var fileName = window.document.Upload.data.value.toLowerCase();

Around like 529 SHOULD be:
<input name=data type=file onBlur="serverFileName()"><br>

Now, it works Smile
Apparently they never fixed the script at all. ARGH!

-Cheers,
RJW
Quote Reply
Re: STILL ERRORS IN FILEMAN NEW CGI! In reply to
Randy Jae is right with the fix. It was a naming problem, the script was calling the file upload variable "file" on the form and thinking it was "data" in the script. Changing the lines above fixes the problem.

I've double checked that the one on the web is the latest version with the changes. It was an awful source control problem.

Quote:
Everyone if you want the fix to the cgi head over to http://www.websworks.com/cgi/fix

On your fix you still call the variable "file", so unless you changed:

($file_space, $result) = &upload ($dir, $in->param('data'), $filename, $disk_space[0]);

to:

($file_space, $result) = &upload ($dir, $in->param('file'), $filename, $disk_space[0]);

in the script I'm not sure how that would fix the problem. Also, I'm not sure why you would have to rewrite the entire cgi script?

Cheers,

Alex