[PHPLIB] prepend problems From: Thomas Griffin (tgriffin <email protected>)
Date: 11/28/99

I am using phplib-7 with a postgres database. I have auto_prepend=prepend.php3 in the php3.ini and cart.inc included in prepend.php3 (along with the other modifcations that the documentation suggests). Images are stored in the database. To display an image, I have the following line of code:

echo "<P><img src=\"display.php3?imageType=".$imageType."&dbname=webstore&pic=".$pic."\"><br>";

$pic is an oid already selected from the database. The images do not display. If I remove the auto_prepend statement from the php3.ini, the images display. Any ideas? I need to keep the auto_prepend. I need the session data carried from screen to screen. I embed php3 code in NetObjects Fusion. NOF does not let me put anything ahead of it's generated header. Auto_prepend is the only way to get prepend.php3 "included" at the beginning of every page.

<?php -- display.php3 --

parse_str($QUERY_STRING);

if (strcmp($imageType, "gif") == 0)
   header ("Content-type: image/gif");
else
   header ("Content-type: image/jpeg");

$database = pg_pconnect("localhost","5432","","",$dbname);
$handle = pg_loopen ($database, $pic, "r");
$lo = pg_loread ($handle, 999999);
pg_loclose ($handle);

echo $lo;
?>

Thanks,

Thomas
tgriffin <email protected>

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.