php upload_tmp_directory not work
Question
hi am getting serious issue when i upload image i get error from uploader missing temporary folder. i search the internet and use this code ini_set('upload_tmp_dir','/sub_domain_home/folder/tmp');
but this not work. then i echo the directory of tmp image upload i use this code sys_get_temp_dir();
i get empty result. i need help how can i fix this issue ? because my default tmp folder not work properly. after when i remove my server home directory default files and folders.
SOLved
i contact to my server provider and tell him to all details and info what i do for solve this issue. they answer me we don't saw any issue we change ur server if you want ? and i agree then thye change my server after 10 hours i check my website my issue solved and all works fine. uploading etc.
Solution
why did you delete everything in /home ? I assume you are using linux?
Do this:
- do a phpinfo() on a test.php to see where your php.ini is located
- Stop using ini_set, sometimes it does not work properly
- Set a temp dir in the php.ini
- Create above temp dir (or make sure it exists) and chmod 775 or something so you can test properly if it's working
- Check phpinfo() again to see if the tmp dir has taken effect.
- Stop deleting files you think you don't need before reading about them online