#1
  1. watch for flying fingers
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Rocket City, USA
    Posts
    819
    Rep Power
    378

    Apache/2.0.54 change upload tmp dir away from /var/tmp


    How can I change the location upload files are temporarily stored before they are passed to my script? I'm working with Apache/2.0.54 on an embedded environment and the temporary upload file is filling a small ramdisk. I'd rather use another device for that, thus a different location in the filesystem.
    Last edited by linuxChique; January 16th, 2012 at 12:35 PM.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    Are you using PHP on this server? If so, you can edit php.ini and muck with the upload_tmp_dir parameter. Or, if you only want it to affect your particular script rather than the entire system, you can add this:
    Code:
    ini_set('upload_tmp_dir','/path/to/your/tmp/');
    If you're not using PHP with your apache, you need to set the TMPDIR environment variable before starting apache. E.g. in your apache startup script, you can do it like this:
    Code:
    TMPDIR=/path/to/your/tmp
    export TMPDIR
    .... rest of script that starts apache up
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo