note 51541 added to features.file-upload

From: Date: Sun, 03 Apr 2005 06:35:06 +0000
Subject: note 51541 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-87390@lists.php.net to get a copy of this message
People have remarked that incorrect permissions on the upload directory may prevent photos or other files from uploading. Setting the Apache owner of the directory incorrectly will also prevent files from uploading -- I use a PHP script that creates a directory (if it doesn't exist already) before placing an uploaded file into it. When the script creates the directory and then copies the uploaded file into the directory there is no problem because the owner of the file is whatever Apache is running as, typically "nobody". However, lets say that I've moved the site to a new server and have copied over existing file directories using FTP. In this case the owner will have a different name from the Apache owner and files will not upload. The solution is to TelNet into the site and reset the owner to "nobody" or whatever Apache is running as using the CHOWN command. ---- Manual Page -- http://www.php.net/manual/en/features.file-upload.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51541 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51541&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51541&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51541&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51541&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51541&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51541&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87390) next »