View previous topic :: View next topic |
Author |
Message |
bo_elmsted -
Joined: 07 Jul 2011 Posts: 2
|
Posted: Thu Jul 07, 2011 5:10 pm Post subject: CGI open of tmpfile: No such file or directory |
|
|
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 |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1295
|
Posted: Mon Jul 11, 2011 7:55 pm Post subject: Re: CGI open of tmpfile: No such file or directory |
|
|
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 |
|
|
bo_elmsted -
Joined: 07 Jul 2011 Posts: 2
|
Posted: Sun Jul 17, 2011 7:31 pm Post subject: Problem solved |
|
|
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 |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1295
|
Posted: Mon Jul 18, 2011 6:46 pm Post subject: Re: Problem solved |
|
|
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 |
|
|
|