Click to See Complete Forum and Search --> : .htaccess - upload_tmp_dir


Anon
01-04-2001, 12:31 AM
I need to put a path in my upload_tmp_dir

I'm using web2010.com and they are to lame to tell me how to do it...

The only thing they will tell me is use .htaccess

I know I need a directory that is permissioned with 777. That's made.

Now how do I put the path in?

Anon
01-04-2001, 06:09 AM
I understand from the PHP site that this is an admin setting and can't be changed using the .htaccess

Its fixed in the php.ini, I have tryed on our servers using different values in .htaccess and this would seem to be true.

Regards
Darren
http://www.php4hosting.com/ $
http://www.php4hosting.co.uk/ £

dspeake
07-03-2002, 07:30 AM
In your .htaccess put: php_value upload_tmp_dir /path/to/dir

However, I've never got this to work. The alternative is: ini_set('upload_tmp_dir', '/path/to/dir');

But again, I've never got this to work

Mike Kelly
12-18-2007, 08:45 PM
I have the same problem. From a different site blog I found the following entry.
So it looks like I'll have to contact my hosting provider.


upload_tmp_dir is changable only at "PHP_INI_SYSTEM" level.

PHP_INI_SYSTEM means - "Entry can be set in php.ini or httpd.conf"

A .htaccess entry cannot be used to change upload_tmp_dir.

bradgrafelman
12-19-2007, 01:05 AM
If you're on shared hosting, then yes, it's most likely your host's fault. You are also correct in that this directive can only be modified in the .ini/.conf files.

ini_set() will never work because it's too late in the process for that to have any effect; the server will already have tried (and failed) to write to the upload directory by the time your PHP script is executed.