Gossamer Forum
Home : Products : DBMan : Customization :

File upload error...

Quote Reply
File upload error...
 Hello,

I have been using the file-upload script for quite awhile and have not had any problems, however, I recently moved the site to a new host and since then I am now receiving the following error when trying to upload a file:

Code:

Software error:

CGI open of tmpfile: No such file or directory

Can someone point me in the right direction of what could be causing this?

Thank you!

Donm
Quote Reply
Re: [donm] File upload error... In reply to
I did a Google search of "CGI open of tmpfile" (with the quotes) and it seems that there is supposed to be a temporary file directory specified in your server's version of CGI.pm. If you get this error, such a directory does not exist.

You could ask your host to create a tempfile directory or you might be able to do it yourself. Here's one thing I found:

First, create a directory in your webspace and chmod it to 777.

At the beginning of db.cgi (or maybe at the beginning of sub validate_upload), add

Code:
BEGIN { $TempFile::TMPDIRECTORY = 'path/to/temp/directory'; }


If that doesn't work, you'll need to contact your server admin.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] File upload error... In reply to
Hi Carol - it's been a long time since I have heard from you (1999)... I think I am using a very old version of the file-upload - as a matter of fact I think it's one that you helped me with as the "Last Modified Date" is Jun 29 1999 and has your name.

In this db.cgi file there is no "sub validate_upload"?

What should I do?

-------------------------------------

What also puzzles me is that I have the same exact script working on 9 other site without any problems and they are all on the same host?

Nice to hear from you again...

Donm
Quote Reply
Re: [donm] File upload error... In reply to
Nice to talk to you, too, Don. :-)

I don't know about earlier versions of the mod. I didn't keep them. But if you don't have the subroutine, then put the line of code at the beginning of db.cgi.

Odd that they're all on the same host and that only one doesn't work. There must be something different about that one, but it's likely to be a bear to try to figure it out.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] File upload error... In reply to
I tried that and I still get the same error? No change.

This is really strange. Any ideas?
Quote Reply
Re: [donm] File upload error... In reply to
Sorry. This is the first time I've seen that error. You might try doing the same Google search I did and see if there's anything that rings a bell for your situation.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] File upload error... In reply to
ok... I am getting closer... I did find that none of the other sites were working either... there had been a change made on the server that caused the problem.

I am now however - getting this error and I don't know where to look to correct this?

I used to be able to login as the admin and upload photos for other registered users to be included on their profiles - but now when I login as the admin and try to upload a photo I get this error:

CGI ERROR
==========================================

Error Message : You are not authorized to upload files

Where do I need to look to correct this?
Quote Reply
Re: [donm] File upload error... In reply to
Got it! I had taken one of the files form one of the other domains and edited it tryingt o make it work... but didn't get all of the correct information in for the domain that I was having problems on.

Everything is working now!

Whew!

Last edited by:

donm: Apr 5, 2006, 7:44 PM
Quote Reply
Re: [donm] File upload error... In reply to
I'm glad you were able to figure it out. I didn't think I was going to be much help.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.