Registrazione avvenuta correttamente!
Warning: mkdir() [function.mkdir]: Permission denied in D:\Inetpub\webs\studiogandiniit\area riservata\registra_utente.php on line 122
Impossibile creare la cartella


questo è l'errore che mi viene fuori quando cerco di creare un nuovo utente con relativa cartella.

qualcuno mi sa aiutare?

il tutto è su hosting windows e ho già dato alla cartella uploads e relative sottocartelle i permessi 777. Inoltre ho provato a spostare la cartella uploads in public. Ma mi da lo stesso problema.

Qua sotto il codice di quella pagine php:

codice:
<?php
session_start();
if ($_SESSION['login'] != "ok") {
header("Location: buy_error_page.php");
exit();
 } 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css" media="all"> 
	@import url("style/style.css");
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<title>Documenti</title>
</head>
<body>

<div id="container">

<h1>Area riservata - Amministratore</h1>

<form action="registra_utente.php" method="post" enctype="multipart/form-data" name="form2" id="form2">
<fieldset>
		
	<legend>Nuovo utente | Amministra utenti</legend>
			


			  <label for="name"></label>
    <table width="448" border="0" cellspacing="2" cellpadding="0">
  <tr>
    <td colspan="2">REGISTRAZIONE NUOVO CLIENTE</td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td width="112">Nome:</td>
    <td width="330"><label>
      <input name="nome" type="text" id="nome" size="30" />
    </label></td>
  </tr>
  <tr>
    <td>Cognome:</td>
    <td><label>
      <input name="cognome" type="text" id="cognome" size="30" />
    </label></td>
  </tr>
  <tr>
    <td>Username:</td>
    <td><label>
      <input name="user" type="text" id="user" size="30" />
    </label></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><label>
      <input name="pass" type="text" id="pass" size="30" />
    </label></td>
  </tr>
  <tr>
    <td></td>
    <td><label>
      <input name="button" type="submit" id="button" value="Registra" />
    </label></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td>TORNA INDIETRO</td>
  </tr>
</table>
</fieldset>
		
</form>
<?php

include("conn.inc.php");

if(isset($_POST['button']))
{
//recupero i valori delle textobox
$username = $_POST['user'];
//verifico se l'username già esiste
$sql="SELECT user FROM utenti WHERE user = '$username'";
 $result = mysql_query($sql, $con) or die(mysql_error());
 if(mysql_num_rows($result) > 0){
 echo "Username in uso!";
 } else {

//inserisce i dati nella cartella user
$sql="INSERT INTO utenti (user,password,livello)
VALUES
('$_POST[user]','$_POST[pass]','1')";
//recupera l'id
$result = mysql_query($sql, $con) or die(mysql_error());

//assegna stesso id alla tabella artisti
$user = mysql_insert_id($con);
$sql="INSERT INTO info (id,nome, cognome)
VALUES
($user,'$_POST[nome]','$_POST[cognome]')";

if (!mysql_query($sql,$con))
  {
  die('Errore: ' . mysql_error());
  }
echo "Registrazione avvenuta correttamente!";

mysql_close($con);
}
// Desired folder structure
$cartella = $user;
$structure = './uploads/';

// To create the nested structure, the $recursive parameter 
// to mkdir() must be specified.

if (!mkdir($structure . $cartella, 0, true)) {
    die('Impossibile creare la cartella');
}

$var=fopen($structure . $cartella ."/"."index.html","a+");
fwrite($var, "IMPOSSIBILE ACCEDERE ALLA DIRECTORY");


}
?> </p>
			
</div>

<script src="js/filestorage.js" />
</body>
</html>
grazie