Are you using the same SAPI and context on both maschines? The mssql extension can give different results depending on the context the driver is used in (OEM to ansi convertion). If your data is stored in a binary column (not a text column) it should not matter though. - Frank > Hi, > I've strange problem with a blob field in a mssql db containing a ms > word document: > > <?php > $conn = mssql_connect('hostname','xxxxx','yyyyy'); > mssql_select_db ('docs'); > $i_result=mssql_query('Select * from documenti_file where > file_esercizio_doc = 2004 and file_id_doc = 200'); > $ar_row = mssql_fetch_array ( $i_result); > echo $ar_row[7]; > $file = fopen('test.doc','wb'); > fwrite($file,$ar_row[7]); > fclose($file); > mssql_free_result($i_result); > echo "<br>". strlen($ar_row[7]); > ?> > works ok using my box as server (apache 1.3.29 and php 4.3.4 - win xp) > and I can read the written file with ms-word; now the strange thing: > running same script on another server (apache 1.3.28 and php 4.3.4 win > nt) I got the same result on the screen (echo), but the file written is > corrupt and it shows weird things when opened with ms-word. It seems > like data got corrupted in the write() task. File size is exactely the > same. Database used is the same and resides on a third box. I've the > same mssql client dll on the two boxes (ntwdblib.dll ver. 2000.80.194.0) > Any idea ? > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php