bahearn Posted July 31, 2009 Share Posted July 31, 2009 The upload works but the file's read permissions are screwed up any idea's ? if($_SERVER["REQUEST_METHOD"] == "POST") { $uploads_dir = 'images/'; $tmp_name = $_FILES["file"]["tmp_name"]; $name = $_FILES["file"]["name"]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); $filename = "images/" . $_FILES["file"]["name"]; $finished = $filename; } Link to comment https://forums.phpfreaks.com/topic/168302-php-simple-upload/ Share on other sites More sharing options...
DaiLaughing Posted July 31, 2009 Share Posted July 31, 2009 I think that is determined by your server's settings. Link to comment https://forums.phpfreaks.com/topic/168302-php-simple-upload/#findComment-887813 Share on other sites More sharing options...
PFMaBiSmAd Posted July 31, 2009 Share Posted July 31, 2009 Posting the actual error message would help. If the images/ folder was created using an FTP client or your hosting control panel, it probably has a different owner than the user that the web server/php is running under. You either need to change the permissions on it so that php can access it or change the owner to be the same one as the web server/php. Link to comment https://forums.phpfreaks.com/topic/168302-php-simple-upload/#findComment-887832 Share on other sites More sharing options...
bahearn Posted August 4, 2009 Author Share Posted August 4, 2009 found a fix I did chmod( $filename , 0755 ); to set the value to read / execute and added a check to make sure it's jpeg thanks, ba Link to comment https://forums.phpfreaks.com/topic/168302-php-simple-upload/#findComment-890870 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.