0

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.

Community
  • 1
  • 1
user3512830
  • 3
  • 1
  • 4
  • do you have shell access or root? This should work by default, your server or apache are either not configured properly, or apache does not have proper permissions... – ied3vil Apr 13 '14 at 00:43
  • @ied3vil yeh i am the owner only. i use always but when i delete al files from my home directory ( because i think this files not necessary) then i get this issue i use this `ini_set('session.save_path', 'tmp');` its work but upload_tmp_dir not work what can i do . i ask for service provider they says something is wrong in ur files. but i test many uplaoders same issue i get – user3512830 Apr 13 '14 at 00:47

1 Answers1

0

why did you delete everything in /home ? I assume you are using linux?

Do this:

  1. do a phpinfo() on a test.php to see where your php.ini is located
  2. Stop using ini_set, sometimes it does not work properly
  3. Set a temp dir in the php.ini
  4. Create above temp dir (or make sure it exists) and chmod 775 or something so you can test properly if it's working
  5. Check phpinfo() again to see if the tmp dir has taken effect.
  6. Stop deleting files you think you don't need before reading about them online
ied3vil
  • 964
  • 1
  • 7
  • 18
  • here my /opt/alt/php53/etc/php.ini <-= but how can i go this folder because i can't see – user3512830 Apr 13 '14 at 01:11
  • also i saw this on phpinfo(); `upload_tmp_dir no value no value` the upload_img_dir is not set . – user3512830 Apr 13 '14 at 01:23
  • Well... when you say you are the owner, you probably don't own the server meaning you have no access to that folder... if you have server support please contact them to check you up, there is something wrong somewhere and i am not sure you can fix it if you can't reach php.ini... – ied3vil Apr 13 '14 at 01:27
  • oh hmm ok ok . i noted all points. and at last i am doing backup of my all files once again. if its not work then i contact service provider. :- ) – user3512830 Apr 13 '14 at 01:32