Member Avatar

Warning: copy() [function.copy]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/oeaivcom:/usr/lib/php:/usr/local/lib/php:/tmp)

I am trying to create a form that someone can submit a file to an ftp location. I found a script online and it is giving me this error. Could anyone point me in the right direction? I have set the permission code of user_submissions to 777. /public_html is inside /home/oeaiv


<form id="form1" name="form1" method="post" action="enter_check.php">
<input name="ufile[]" type="file" id="ufile[]" size="25" />





$path1= "public_html/fsg/user_submissions".$HTTP_POST_FILES['ufile']['name'];

if($ufile !=none)
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))
echo "Successful<BR/>";
echo "File Name :".$HTTP_POST_FILES['ufile']['name']."<BR/>"; 
echo "File Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>"; 
echo "File Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>"; 
echo "<img src=\"$path\" width=\"150\" height=\"150\">";
echo "Error";

At line 7 you specify the variable $path1 but in the copy function on line 11 you use $path which is undefined.
This produces the error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.