I am a newbie with php and I do not understand why the following code doesn't display any image I previously stored in mysql blob fields. The image type i get is correct, and if I get rid of header function the only thing displayed is the raw image data. All image files stored are not greater than 300K in size, the upload_max_filesize php directive is set to 2M and MySql max_allowed_packet = to 1M   I am using Uniform Server 3.2a. Can anyone help me?   <?php include ("connet_info_mysql.php");                                               $idfoto = (isset($_GET["idfoto"])) ? $_GET["idfoto"] : exit(); $tam = (isset($_GET["tam"])) ? $_GET["tam"] : 1;   switch($tam) { case "1":   $campo = "foto";break; case "2":   $campo = "thumb";break; default:  $campo = "foto";break; }   $sql = "SELECT $campo, mime FROM tabellaFoto WHERE idfoto = $idfoto";            $link = mysql_connect(DBHOST, DBUSER, DBPASSWORD) or die(mysql_error($link));   // Connessione al database. mysql_select_db(DBNAME, $link) or die(mysql_error($link));                       $conn = mysql_query($sql, $link) or die(mysql_error($link));                     $dati = mysql_fetch_array($conn); $immagine = $dati[0];                                                            $mime = $dati[1];                                                               Header("Content-type: $mime"); echo $immagine;                                                                  //echo $mime; ?>   Could you also tell me how to change the MySql variable max_allowed_packet value when using Uniform Server?