FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


[RESOLVED] php file upload problem





shamil
Does anybody knows why i get below error when i upload file to server?
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/var/tmp/php0ioe65) is not within the allowed path(s): (/home/alsat.az/public_html:/tmp) in /usr/home/alsat.az/public_html/admin/modules/itemsedit.inc.php on line 342

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/var/tmp/php0ioe65) is not within the allowed path(s): (/home/alsat.az/public_html:/tmp) in /usr/home/alsat.az/public_html/admin/modules/itemsedit.inc.php on line 342

Warning: move_uploaded_file(/var/tmp/php0ioe65) [function.move-uploaded-file]: failed to open stream: Operation not permitted in /usr/home/alsat.az/public_html/admin/modules/itemsedit.inc.php on line 342

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/php0ioe65' to '../allsat_images/bmw2.jpg' in /usr/home/alsat.az/public_html/admin/modules/itemsedit.inc.php on line 342
badai
i try my best to help.

change $uploaddir in your php script to /usr/home/alsat.az/public_html/any_public_writable_folder

i'm not sure if it's really /usr/home/alsat.az/public_html/

you can get the exact path by using realpath("file_name.php"), for example

echo realpath("itemsedit.inc.php");

don't forget to change permission on any_public_writable_folder to 757 or 777, and change it's name too Smile

for better help, please see http://support.microsoft.com/kb/555375/en-us
you have the first symptom.
shamil
Problem is solved Surprised I sent the error message to admin. I think he just changed the tmp folder's permission so script can write to. Now script works without any change. You are right tmp folder was not accessible. Thank you.
orno
resolved and -close-d
Related topics
File upload with PHP, Build an upload database for your site
Filter File Types in PHP File Upload
Cron jobs - running a php file
[PHP doubt]Knowing the directory location of PHP file
PHP homepage recreation problem
quite simple file upload
is there any way to trigger a .php file without refreshing?
Uploading a .php file! NEED HELP thanks
File upload problem :'(
File upload class problem.
File upload
PHP Form Sending problem
TMP File Problem
Please can anyone help with a php script error/problem?
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

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