CGI open of tmpfile: No such file or directory

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
bo_elmsted
-


Joined: 07 Jul 2011
Posts: 2

PostPosted: Thu Jul 07, 2011 5:10 pm    Post subject: CGI open of tmpfile: No such file or directory Reply with quote

I'm new to web servers, unix and perl but everything seems to be running fine and I've copied a perl/cgi script from the web to test forms with a simple questionaire that works as well, but trying to make a file upload script I keep getting the above message. It's Mac OS 10.5.8 (unix) and I can't find anything anywhere about where temp files are stored if any. I'm aware that if there is a temp file or directory somewhere the error may be that permissions are wrong.
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Mon Jul 11, 2011 7:55 pm    Post subject: Re: CGI open of tmpfile: No such file or directory Reply with quote

bo_elmsted,

All depends on which directory this script tries to open or write to. It could be that it is trying to write inside a missing directory and that you may need to create it before.

Providing us with a link to the source of the script and the exact error message (and even the line it occurs in) may help us suggest a solution.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
bo_elmsted
-


Joined: 07 Jul 2011
Posts: 2

PostPosted: Sun Jul 17, 2011 7:31 pm    Post subject: Problem solved Reply with quote

After in vain trying a couple of other scripts to do the same, and which produced the same error, I instead Googled the error message and after reading some answers there were several containing this:

$CGITempFile::TMPDIRECTORY = 'temp/';

This line seems to be necessary for file reading in perl/cgi.
I wonder why the many experienced people I assume is in this forum didn't think of this, and why it isn't present in the scripts I've tried? Can the CGITempFile directory be set in another way, implicitly, or in the server configuration?
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Mon Jul 18, 2011 6:46 pm    Post subject: Re: Problem solved Reply with quote

bo_elmsted wrote:
After in vain trying a couple of other scripts to do the same, and which produced the same error, I instead Googled the error message and after reading some answers there were several containing this:

$CGITempFile::TMPDIRECTORY = 'temp/';

This line seems to be necessary for file reading in perl/cgi.
I wonder why the many experienced people I assume is in this forum didn't think of this, and why it isn't present in the scripts I've tried? Can the CGITempFile directory be set in another way, implicitly, or in the server configuration?


There is no global setting for temporary files. It depends on how the script author decided to set up things. That's why we asked you to review the script.

Anyway, if your script has such a line, you should create a subdirectory called temp inside the script directory.

Please notet that the usual place of temporary files in Unix systems (including Mac OS X) is /tmp .
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group