I have a very basic upload form on my page however I am unable to upload. I believe it has something to do with the tmp folder or upload folder.
<form enctype="multipart/form-data" action="upload.php" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>
[php]
<?php $target = "/uploads/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; } ?>[/php]
I am getting “Sorry, there was a problem uploading your file.”
file_uploads is ON
upload_tmp_dir is “sharing/tmp” sharing is the folder where the form html is as well as the uploads folder
Permissions for sharing/tmp are set to 777 (just temporarily)
Permissions for /uploads is set to 777 (temporarily)
Files im trying are 1kb so it’s not the file size
Right now there are no restricted file type
What else could the problem be?
I am running a LAMP setup on Ubuntu Server 12.0.4.3 (PHP Version 5.3.10-1ubuntu3.9)