Connecting Tech Pros Worldwide Help | Site Map

image from DB + new server with magic_quotes_gpc: on

Al
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi

I mode a site from to a new server where trere is:

PHP Version 4.3.2
and
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

since i moved the site i can't get images from DB correctly

images are stored in a "mediumblob" field

if i use mysql front to view images in DB i see them correctly, but
when i retrive them by php they are messed up

i store images with

INSERT INTO file (tab,mime,x,y,file)
VALUES
('news','$mime',$x,$y,'".addslashes(fread($fd,$use rfile_size))."')

and i get them with

Header("Content-type: $mime");
$img_from_db_out = $query->getField("file");
echo $img_from_db_out;

Thanks
Closed Thread