Connecting Tech Pros Worldwide Forums | Help | Site Map

Cat set `upload_tmp_dir` in Windows

howa
Guest
 
Posts: n/a
#1: Jun 5 '07
Using Windows, PHP5.2

ini_set("upload_tmp_dir", "c:/temp");
echo ini_get('upload_tmp_dir'); // print out the default one


no effect...


Erwin Moller
Guest
 
Posts: n/a
#2: Jun 5 '07

re: Cat set `upload_tmp_dir` in Windows


howa wrote:
Quote:
Using Windows, PHP5.2
>
ini_set("upload_tmp_dir", "c:/temp");
echo ini_get('upload_tmp_dir'); // print out the default one
>
>
no effect...
Indeed.

It is all in the Fine Manual.
Go to www.php.net
Search for function ini_set()
Follow the first link to the 'appendix'.

You'll see a list there.
Under the list you can find the meaning of things like:
php_ini_user, php_ini_system, etc.

In your case: php_ini_system.
This means you have to change it in php.ini or in httpd.conf.

Why is that?
For some reason PHP wants to know this value BEFORE running your script.
Reason?
(Guessing) I expect PHP must know WHERE to place the uploaded file before
executing your script.

Regards,
Erwin Moller
Closed Thread