Page 1 of 1

Upload Script error!

Posted: Fri Dec 16, 2005 12:07 am
by William
I have a PHP Script to upload a image. Well For some reason it gives this error:
Warning: move_uploaded_file(19_09.JPG): failed to open stream: Permission denied in
No matter what .jpg I try to upload no matter if it is caps or not it gives that error. I have tried diffrent file names to make sure its not over writing I have chmod the folder to 777 I used mkdir() to make a folder nothing is working. Any ideas?

Posted: Fri Dec 16, 2005 12:14 am
by hawleyjr
Have you tried umask or chorn

Posted: Fri Dec 16, 2005 12:19 am
by William

Code: Select all

$old = umask(0);
chmod($uploaddir, 0755) or die("Didn't work!");
umask($old);
Doesn't seem to be helping it at all let me try the other one.

Posted: Fri Dec 16, 2005 12:21 am
by William
Warning: chown(): Operation not permitted in

Posted: Fri Dec 16, 2005 12:26 am
by hawleyjr
Are you using a shared host? Some hosts disable PHP from writing files.

Posted: Fri Dec 16, 2005 12:37 am
by William
Yeah it is :(