Page 1 of 1

question about file transfer

Posted: Sat Nov 18, 2006 3:09 am
by saqqa
Hi every one and thanks for yr help and support on advance

Well, I have a problem with file transfer( browse and upload files).
At my Web space all ok and works perfectly
See this link plz http://khaals5.100webspace.net/upload.php

But if I use the same code on my company web space I got this error

Warning: copy() [function.copy]: open_basedir restriction in effect. File(/tmp/phpuPlPPU) is not within the allowed path(s): (/home/customers/webs/rmaus/) in /home/customers/webs/rmaus/upload.php on line 48
Unknown error
!

Check this link plz http://www.rmaus.com.au/uploader.php

Basically I use this simple copy command

Code: Select all

copy($HTTP_POST_FILES["filename"]["tmp_name"], "./".$_FILES["filename"]["name"]) ;
I’m waiting yr great advice.
Thanks again

Posted: Sat Nov 18, 2006 3:25 am
by evilchris2003
Try reading this

http://www.photopost.com/forum/showthread.php?t=128519

all i did was google the error message you will usually find someone else has had the same problem

Posted: Sat Nov 18, 2006 12:50 pm
by John Cartwright
Why are you mixing $HTTP_POST_FILES and $_FILES? Try using move_uploaded_files() to bypass safemode restrictions.

Code: Select all

move_uploaded_file($_FILES["filename"]["tmp_name"], "./".$_FILES["filename"]["name"]) ;

thanks

Posted: Sun Nov 19, 2006 2:15 am
by saqqa
Thanks all, i ganatry it...

Regards