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

    Join Date
    Feb 2003
    Rocket City, USA
    Rep Power

    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 11:35 AM.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    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:
    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:
    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