Unable to set upload_tmp_dir on IIS
Solution 1
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.
Solution 2
If you look towards the bottom of the file you will find this.
[WebPIChanges]
error_log=C:\Windows\temp\PHP54_errors.log
upload_tmp_dir=C:\Windows\temp
session.save_path=C:\Windows\temp
cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300
date.timezone=America/New_York
extension_dir="C:\Program Files (x86)\PHP\v5.4\ext\"
Chance the temp directory here too or comment it out.
greener
Updated on June 07, 2022Comments
-
greener almost 2 years
So I'm trying to set the
php upload_tmp_dir
setting on an IIS machine.I changed the setting in
php.ini
butphpinfo()
still shows the default folder. I checked the permissions ofIIS_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?