Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to set upload_tmp_dir on IIS

So I'm trying to set the php upload_tmp_dir setting on an IIS machine.

I changed the setting in php.ini but phpinfo() still shows the default folder. I checked the permissions of IIS_IUSRS who have write, read, modify, etc.

I also ran this to check if the new folder was writable:

$filename = 'C:\inetpub\temp\uploads';
if (is_writable($filename)) {
    echo $filename . ' is writable';
} else {
    echo $filename . ' is not writable';
}

I changed the max_file_uploads value to test if the PHP config being loaded was the most up-to-date, and it was.

What am I missing?

like image 570
greener Avatar asked Jan 14 '23 19:01

greener


1 Answers

And it turned out the php.ini config file had duplicate entries for upload_tmp_dir, the last of which was the default folderc:\windows\temp. I commented that setting out and everything is now fine.

This thread got me to check for that.

like image 184
greener Avatar answered Jan 19 '23 13:01

greener