File::Temp will be using File::Spec->tmpdir which will use $ENV{TMPDIR}
unless you are running in taint mode where it starts trying to use /tmp
[because taint mode can't read the environment].


On Fri, Jun 28, 2013 at 4:38 PM, Chris Marshall <[email protected]>wrote:

> The tempfile handling for PDL is pretty inconsistent.
> Originally, it was based on a roll-your-own setup but
> now that File::Temp is in Core, we've been working
> to migrate to that for consistency and (hopefully)
> better portability and operability.
>
> At the least, it would be nice if 'use PDL' did not die
> because of a tempfile problem---why does loading PDL
> require any tempfile accesses at all?
>
> --Chris
>
>
> On Fri, Jun 28, 2013 at 8:52 AM, Lee Goddard <[email protected]> wrote:
> > Thanks. The problem is "new_tmpfile IO::File" in PDL::IO::Pic — I've not
> > looked into why it bars, or why the same commands do not barf when I run
> > them stand-alone in CGI.
> >
> > $PDL::Config{TEMPDIR} is used elsewhere in PDL::IO::Pic, but I guess
> there
> > is a reason it is not being used everywhere.
> >
> > I'm now not using but requiring PDL, and doing the imports myself, and
> > hoping my regression tests have good coverage.
> >
> > Thanks for your help, both.
> >
> > Lee
> >
> >
> > On 28/06/2013 13:45, Craig DeForest wrote:
> >>
> >> IO::File won't necessarily help -- the tmpfile call is embedded in your
> >> perl executable.
> >>
> >> If you're running apache as a nonprivileged user, it simply might not
> have
> >> write privileges anywhere.
> >>
> >> I'm not sure why "use PDL" would trigger that call, though.  You can
> poke
> >> around PDL::IO::Pic to see the line.
> >>
> >> Best of luck,
> >> Craig
> >>
> >> On Jun 28, 2013, at 7:42 AM, Lee <[email protected]> wrote:
> >>
> >>> Thanks, I'll take a look aroundIO::File.
> >>>
> >>> The worrying thing, for me, is that all I didwas "use PDL".
> >>>
> >>> Cheers
> >>> Lee
> >>>
> >>> On 28/06/2013 13:15, Craig DeForest wrote:
> >>>>
> >>>> This is a problem with configuration of the IO::File module that is
> >>>> included with Perl.  PDL uses temporary files as part of the image
> >>>> save/restore process.  The offending call is almost certainly in the
> image
> >>>> read/write routines in PDL, where we call "new_tmpfile IO::File or
> barf
> >>>> "Couldn't open tmpfile" on line 183 of PDL::IO::Pic.pm.
> >>>>
> >>>> IO::File is included with Perl and uses the POSIX tmpfile(3) call.
> >>>> You'll have to check on your system to see where your particular
> tmpfile
> >>>> places the temporary file, though /tmp or /usr/tmp /are good bets.
> >>>>
> >>>>
> >>>>
> >>>> On Jun 28, 2013, at 6:58 AM, Lee Goddard <[email protected]> wrote:
> >>>>
> >>>>> I've been using a little PDL through a web applicationon OSX and
> >>>>> Ubuntu.
> >>>>>
> >>>>> On a new install of this software, I've found my CGi scripts fail
> with
> >>>>> the error:
> >>>>>
> >>>>> PDL: couldn't open tmpfile
> >>>>>
> >>>>> The same code is fine when running as a normal user, just fails as
> >>>>> www-data, the proesses owner of Apache.
> >>>>>
> >>>>> My question is: how is the directory of the constructed, so that I
> >>>>> might set suitable permissions?
> >>>>>
> >>>>> Many thanks in anticipation
> >>>>> Lee
> >>>>>
> >>>>> _______________________________________________
> >>>>> Perldl mailing list
> >>>>> [email protected]
> >>>>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> >>>>>
> >>>> _______________________________________________
> >>>> Perldl mailing list
> >>>> [email protected]
> >>>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> >>>>
> >>
> >
> >
> > _______________________________________________
> > Perldl mailing list
> > [email protected]
> > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to