By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,348 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,348 IT Pros & Developers. It's quick & easy.

problem with moving uploaded files

P: n/a
Hi all

I am having a little trouble uploading files (html form with post) with
php...

I am trying to copy the file from its temporary upload directory to the
destination directory, however, the server threw this msg at me... what does
it mean? and how do I circumvent it?
$user_file_tmp_name = /tmp/phpTeA9Hs
$dest_name = /home/free3/user_product_images/jamesjiao/Alizee18.jpg

Warning: copy(): open_basedir restriction in effect. File(/tmp/phpTeA9Hs) is
not within the allowed path(s): (/home/free3) in
/home/free3/my-page-admin.php on line 91

I tried both the copy() function and the move_uploaded_file() function and
got the same warning.

==james==
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Thanks for the tip.. it's working now. (i think why it didn't work before
was because i passed in a dir instead of a file for the second argument in
move_uploaded_file())

==James==

"Martin C. Petersen" <mc*@phys.au.dk> wrote in message
news:3f***********************@dtext01.news.tele.d k...
I am trying to copy the file from its temporary upload directory to the
destination directory, however, the server threw this msg at me... what does
it mean? and how do I circumvent it?
$user_file_tmp_name = /tmp/phpTeA9Hs
$dest_name = /home/free3/user_product_images/jamesjiao/Alizee18.jpg

Warning: copy(): open_basedir restriction in effect. File(/tmp/phpTeA9Hs) is
not within the allowed path(s): (/home/free3) in
/home/free3/my-page-admin.php on line 91

I tried both the copy() function and the move_uploaded_file() function

and got the same warning.

You should certainly use move_uploaded_file() - what warning does it give
you?
Martin

Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.