On Mon, 4 Dec 2006 00:28:52 +0800
[EMAIL PROTECTED] ("tam wei") wrote:

> Dear all,
> 
> I am intending to store the files inside the postgres DB using the
> type text (all the files will be pre-encode into base64. The reason
> for not using the type bytea as I encountered some undesired
> format(the original file alignment can't be preserved) while
> extracting the content and display iit using php).
Hi,

Make sure you don't have any unwanted caracters before or after the php tags 
(<? ?> or <?php ?>) in your main script and includes. Php will output them, 
thus breaking your file.
A more robust workaround is using output buffering to clear any unwanted output 
before sending the file... 

I have no problem storing bytea objects and retreiving them. Using output 
buffering allows you to use ob_gzhandler to reduce network bandwith if 
needed... 

HTH,
-- 
MaXX 

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to