pplNet Posted September 22, 2008 Share Posted September 22, 2008 I am using hosted server, how am I able to defind my own upload_tmp_dir. Cos i'm having this problem, either using move_uploaded_file or copy, system always generate this error. PHP Warning: move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: Unable to move '/tmp/php09fLgo' to Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/ Share on other sites More sharing options...
ratcateme Posted September 22, 2008 Share Posted September 22, 2008 i would suggest that it is not a tmp dir problem and i dont think you would be able to change the tmpdir without editing the php.ini file because the file would be saved to /tmp then the script would start executing. are you specifying a full path when you copy the file i have found that sometimes uploads fail if you don't specify a full path Scott. Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-647945 Share on other sites More sharing options...
pplNet Posted September 23, 2008 Author Share Posted September 23, 2008 How I know I called the right tmp_dir? $_FILES['uploaded']['tmp_name'] <-- this is the full path of the tmp_dir? Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-648417 Share on other sites More sharing options...
PFMaBiSmAd Posted September 23, 2008 Share Posted September 23, 2008 What is the whole actual error message? xxxxx out any sensitive info but don't change any of the syntax of the error. Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-648421 Share on other sites More sharing options...
pplNet Posted September 25, 2008 Author Share Posted September 25, 2008 The code show in the plesk below here. PHP Warning: move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: Unable to move '/tmp/php09fLgo' to <folder> Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-650114 Share on other sites More sharing options...
ratcateme Posted September 25, 2008 Share Posted September 25, 2008 this is probably more a problem to do with the prems on the folder where you are moving the file to rather than where it is coming from. is apache allowed to write the dir where you are trying to put the file? Scott. Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-650242 Share on other sites More sharing options...
PFMaBiSmAd Posted September 25, 2008 Share Posted September 25, 2008 I seriously doubt that is all of the relevant parts of the error message. Had the whole error been posted originally, this could have been solved 2 days ago. Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-650280 Share on other sites More sharing options...
aschk Posted September 25, 2008 Share Posted September 25, 2008 As a side note, because the OP's original post was regarding defining a new upload_tmp_dir If you don't have access to php.ini (which you wouldn't want to change anyway! ) then you can achieve the result you want using a humble .htaccess file using the following line: php_value upload_tmp_dir "<file path goes in here>" Obviously replace the <file path goes in here> with your file path to the directory you want to write in. In most cases something like /home/httpd/vhosts/<yourdomain.com>/tmp However this will not resolve the problem you are having, which appears to be either permissions based, as the folder needs to be writeable +w or 777 chmod. Also, make sure to specify a valid path... Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-650315 Share on other sites More sharing options...
PFMaBiSmAd Posted September 25, 2008 Share Posted September 25, 2008 upload_tmp_dir is a PHP_INI_SYSTEM setting and cannot be set in a .htaccess file (try it and then check using a phpinfo() statement.) Link to comment https://forums.phpfreaks.com/topic/125340-define-new-upload_tmp_dir/#findComment-650424 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.