in reply to invoke tempdir() failed

After I invoke $temp_dir = tempdir();, the corresponding temporary directory can not be found inside /tmp

What do you mean by that?

Apart from that, the invocation of `mkdir testDir` also failed.

Failed how?

Have you run into this issue before ?

Ever heard of chroot jail?

Replies are listed 'Best First'.
Re^2: invoke tempdir() failed
by marscld (Beadle) on Sep 30, 2011 at 08:34 UTC
    Ideally, when the tempdir() is called, a temporary directory like /tmp/vIpIrMQg5r would be created. The question is that I can't find the /tmp/vIpIrMQg5r after calling tempdir(). Generally, user would invoke the function to create a directory from Microsoft IE. Is there any privilege issue regarding to the apache ?

      Lets try again :)

      When you say After I invoke $temp_dir = tempdir();, the corresponding temporary directory can not be found inside /tmp

      How do you know the corresponding temporary can not be found inside /tmp?

        I tried to use 'ls -l /tmp/newly_created_dir' to find the directory, but failed.
Re^2: invoke tempdir() failed
by marscld (Beadle) on Oct 08, 2011 at 07:28 UTC
    Guys, I guess the problem would be how to keep the directory, which is created by tempdir(), instead of automatically cleaning it up.

      Guys, I guess the problem would be how to keep the directory, which is created by tempdir(), instead of automatically cleaning it up.

      Since the tempdir function does not automatically clean up temporary directories it creates, the problem isn't with tempdir

      Maybe you want to specify an alternate directory to tempdir, like File::HomeDir

        good idea, worth a shot