FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Upload file porblem {fixed}





m-productions
Ok... heres my code

Code:
<?php
$folder = $_POST['folder'];
move_uploaded_file($_FILES['Filedata']['tmp_name'], $folder);
?>


easy enough right?

the script is located in this path setup
-removed-


I want to put a file into
-removed-

so.. if i put in /admin/test.gif for $folder i get this

Quote:
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/admin/test.gif) is not within the allowed path(s): (/home/mproduct/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/) in /home/mproduct/domains/m-productions.us/public_html/beta/scripts/upload.php on line 4


if i try admin/test.gif i get this

Quote:
Warning: move_uploaded_file(admin/test.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/mproduct/domains/m-productions.us/public_html/beta/scripts/upload.php on line 4

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpFlRmXd' to 'admin/test.gif' in /home/mproduct/domains/m-productions.us/public_html/beta/scripts/upload.php on line 4


so i was thinking its a promission error right? wrong..
mol/test.gif
WORKS, and it has the same permissions as admin/ so whats up with this????


SOLVED
Turnes out, the admin folder was only folder not owned by apache, so the script couldnt talk to it.
Related topics
loadurl
Upload Script
Following error popped up when trying to upload an avatar
Upload file
Upload Siteleri ve Tanýtýmlarý...
[RESOLVED] php file upload problem
File upload class problem.
Upload File button at the top
upload form
upload File using ajax php or IFrame
Nothings Working ? Permissions -- Account Creator
Can't upload avatars
upload file to server using html form and CGI C
Your connection has timed out error during uploading file
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.