hi,
$picture_out = str_replace ( "\\", "/", tempnam("$server_root/tmp", "img") );
ImageJpeg($ib,"$picture_out", 80);
$data = addslashes(fread(fopen($picture_out, "r"), filesize($picture_out)));
MYSQL_CONNECT($db_connect,$login,$pass);
mysql_select_db($db_select);
$result=MYSQL_QUERY("INSERT INTO thumbnail (thumbname,thumbdata,thumbwidth,thumbheight) ".
"VALUES ('$db_id','$data','$width_get','$height_get')");
MYSQL_CLOSE();
unlink($picture_out);
when i run this code, running php as cgi everything works fine, but when i run php as module the thumb data is not stored in database but the tempfile was created. what can i do?