New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CGI.pm has poor list of temp directories on Windows #7395
Comments
From perl@glob.com.auCreated by perl@glob.com.auOn Windows, CGI.pm uses the following paths to locate the Temp directory location: $ENV{TMPDIR} This isn't a very good list from a Windows point of view. My temp directory is set This results in the "CGI open of tmpfile" error message. Ideally CGI.pm should use the Windows GetTempPath API. Perl envrionment information is wrong as perlbug wants sendmail :( Perl Info
|
From @schwernOn Tue, Jun 29, 2004 at 07:27:13AM -0000, perl @ glob. com. au wrote:
There's only so far CGI.pm can bend trying to guess the location of a
Instead of CGI.pm having to hard code any platform specific temp dir code, On a side note, File::Spec::Win32::tmpdir() is not using the Win32 API to -- |
The RT System itself - Status changed from 'new' to 'open' |
From @demerphqSchwern wrote...
Well, a simpler approach is to use $ENV{TEMP} or $ENV{TMP} isnt it? Both of
A quick check shows it uses the correct ENV vars though. But it will ignore Yves |
From perl@glob.com.au
i had to work around this issue for bugzilla, see http://bugzilla.mozilla.org/show_bug.cgi?id=248988 IIS exposes $ENV{TEMP} and $ENV{TMP} to cgi, however apache does not, so under i ended up doing this: $ENV{'TMPDIR'} = $ENV{'TEMP'} || $ENV{'TMP'} || "$ENV{'WINDIR'}\\TEMP"; i think that the simplest fix for this bug would be to add these paths to the begin-base64 644 signature.gif
|
From renee.baecker@smart-websolutions.deThis patch adds some more possible temp-directories to the @TEMP array Cheers, |
From @TuxOn Wed, 20 Aug 2008 10:39:53 +0200 (CEST),
Can we see the patch? -- |
From renee.baecker@smart-websolutions.deUups, sorry... Am 20.08.2008 um 11:16 Uhr haben Sie geschrieben:
renee.baecker@smart-websolutions.de Smart-Websolutions André Windolph und Renée Bäcker GbR USt.-ID: DE 228 935 695 Telefon: 01803 - 278 25 51 98 (9 cent/Minute) Perl-Magazin: http://foo-magazin.de |
From renee.baecker@smart-websolutions.deCGI.pm.patch--- CGI.pm.3.40 2008-08-20 09:24:55.000000000 +0200
+++ CGI.pm.3.40.patched 2008-08-20 09:28:38.000000000 +0200
@@ -4050,6 +4050,14 @@
"${vol}${SL}Temporary Items",
"${SL}WWW_ROOT", "${SL}SYS\$SCRATCH",
"C:${SL}system${SL}temp");
+
+ if( $CGI::OS eq 'WINDOWS' ){
+ unshift @TEMP,
+ $ENV{TEMP},
+ $ENV{TMP},
+ $ENV{WINDIR} . $SL . 'TEMP';
+ }
+
unshift(@TEMP,$ENV{'TMPDIR'}) if defined $ENV{'TMPDIR'};
# this feature was supposed to provide per-user tmpfiles, but
|
From @TuxOn Wed, 20 Aug 2008 11:26:02 +0200 (CEST),
I don't know CGI/Windows enough to tell if those folders should exist, $CGI::OS eq "WINDOWS" and
-- |
From renee.baecker@smart-websolutions.deAm 20.08.2008 um 12:54 Uhr haben Sie geschrieben:
No, this is not necessary. A few lines later in CGI.pm: foreach (@TEMP) { There are already entries in @TEMP that unlikely exist. Cheers, |
From @TuxOn Wed, 20 Aug 2008 13:25:58 +0200 (CEST),
OK, and $ENV{TEMP} and $ENV{TMP} *always* exist in Win-land? -- |
From @TuxOn Wed, 20 Aug 2008 09:42:06 -0400, "Lincoln Stein" <lstein@cshl.edu>
Now also in CORE with change #34208 $CGI::VERSION='3.40_01';
-- |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
From lstein@cshl.eduThanks, I'll use your patch in the next release. Lincoln On Wed, Aug 20, 2008 at 5:26 AM, <renee.baecker@smart-websolutions.de>wrote:
-- Ontario Institute for Cancer Research Cold Spring Harbor Laboratory |
Migrated from rt.perl.org#30524 (status was 'resolved')
Searchable as RT30524$
The text was updated successfully, but these errors were encountered: