Não consigo envia fotos pro servidor, adiciona o arquivo no banco de dados td certinho mas nao transfere po servidor.. porque?? o código q uso é esse:
chmod("/var/tmp/phplwfRxL",0777);
chmod("/home/amigos/public_html/deividy/", 0777);
chmod("/home/amigos:/usr/lib/php:/usr/local/lib/php:/tmp", 0777);
chmod("/home/amigos/", 0777);
chmod("/home/amigos/www/", 0777);
chmod("/home/amigos/www/deividy/", 0777);
chmod("/home/amigos/www/deividy/album", 0777);
chmod("/home/", 0777);
$uploaddir = "/home/amigos/www/deividy/album/";
$arquivo = $uploaddir. $_FILES['userfile']['name'];
if (copy($_FILES['userfile']['tmp_name'], $arquivo)) {
echo "<BR>
<FONT FACE='Verdana'><FONT SIZE=-1>Foto adicionada com sucesso!<BR></font></font>";
} else {
print "<BR><FONT SIZE=->Erro ao adicionar foto<BR> Tente novamente mais tarde..</font>";
}
E sempre da esse erro:
Warning: chmod() [function.chmod]: open_basedir restriction in effect. File(/var/tmp/phplwfRxL) is not within the allowed path(s): (/home/amigos:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/amigos/public_html/deividy/album.php on line 198
Warning: chmod() [function.chmod]: Operation not permitted in /home/amigos/public_html/deividy/album.php on line 199
Warning: chmod() [function.chmod]: No such file or directory in /home/amigos/public_html/deividy/album.php on line 200
Warning: chmod() [function.chmod]: Operation not permitted in /home/amigos/public_html/deividy/album.php on line 201
Warning: chmod() [function.chmod]: Operation not permitted in /home/amigos/public_html/deividy/album.php on line 202
Warning: chmod() [function.chmod]: Operation not permitted in /home/amigos/public_html/deividy/album.php on line 203
Warning: chmod() [function.chmod]: Operation not permitted in /home/amigos/public_html/deividy/album.php on line 204
Warning: chmod() [function.chmod]: open_basedir restriction in effect. File(/home/) is not within the allowed path(s): (/home/amigos:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/amigos/public_html/deividy/album.php on line 205
Warning: copy() [function.copy]: open_basedir restriction in effect. File(/var/tmp/phpWQqv0g) is not within the allowed path(s): (/home/amigos:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/amigos/public_html/deividy/album.php on line 22
Ja tentei da chmod em td nada da certo algm sabe arrruma isso??
Desde já agradeço...