Jump to content

why can't i change the value of upload_tmp_dir in the php.ini?


namelessNN

Recommended Posts

no matter what i try it won't let me change this setting.  i am trying to build a file upload feature but all the files i upload don't work because they are locked.  i figured out that the files are inheriting the permissions of the temp folder that they get uploaded into.  no problem, just change that value.  however, my IT guys here don't want to make that folder open. 

 

no problem, i'll just move the upload_tmp_dir to a different folder and share that.  except no matter what i do in the php.ini file, it won't change to the directory i specify for the upload_tmp_directory.  it defaults to C:\WINDOWS\Temp.  i've tried every combination i can think of for the path.  with quotes.  without quptes.  with \ or /.  i restart the server and refresh the php info page and it is always C:\WINDOWS\Temp.  grr.

 

i know IIS sucks for php but i have no other option for this box.  is there a special syntax i need to use to get php to recognize a different folder for the upload_tmp_dir setting?

 

upload_tmp_dir = "C:\uploads" (C:\uploads is the folder i want to use for the setting)

Is the php.ini that you are changing the one that php is using?

 

yes.  i was able to change other settings.  i changed the max upload size and one other and both those changes worked and are reflected in the phpinfo display.  that's what has me so confused.  it just doesn't seem to want to change this one thing.

Most likely your Apache config file is over-ruling your php.ini file. Remember the server administrator can do that..

 

Example...

 

 

<IfModule mod_php5.c>
php_value max_execution_time "60"
php_value upload_max_filesize "25M"
php_value post_max_size "25M"
php_admin_value upload_tmp_dir "/usr/user/tmp"
</IfModule>

 

If they set it in the config file, you cannot change it!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.