note 36905 added to features.file-upload

From: Date: Sun, 26 Oct 2003 21:15:36 +0000
Subject: note 36905 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-59346@lists.php.net to get a copy of this message
I've just wasted an afternoon troubleshooting this problem - maybe I can save someone else the trouble. I was using this function to save an uploaded file to my server: move_uploaded_file($filename, "images/testimage.jpg"); But when I tried to view the file in the browser, it would give me a 403 error. I checked the permissions on the newly-uploaded file and found that they were set differently than the permissions for the other, accessible files on my server. I had to run a chmod on the file after I did the move_uploaded_file like so: move_uploaded_file($filename, "images/testimage.jpg"); chmod("images/testimage.jpg", 0644); This eliminated my 403 error. Hope this helps someone. ---- Manual Page -- http://www.php.net/manual/en/features.file-upload.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36905 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36905&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36905&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59346) next »