Make sure the owner of the file also has ownership of the target directory.. i.e. "apache" or "nobody"
Usually the process the webserver is running as..
e.g.
-rw------- 1 apache apache 1816 Oct 31 23:59 uploadimage.php
drwx------ 2 apache admin 4096 Oct 31 12:00 filetargetdirectory
Also .. 777 BAAAAD .. that means the directory is readable, writeable and EXECUTABLE by everyone..
You can get by with 755
Regarding the header.. there should be nothing written to the screen i.e. no output.. echo, printf etc.. before the header(); setcookie() or other similar call..
|