can u kindly check what am i doing wrong? i tried using oci8 and the image is displayed but when i use adodb, my browser(firefox) says "problem loading..." can you give me some example of your code? thanks!
OCI8
<?php
header("content-type: image/JPEG");
$getId = $_GET;
$User = "scott";
$Password = "tiger";
$db = " (DESCRIPTION =\n";
$db .= "(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.3)(PORT = 1521))\n";
$db .= "(CONNECT_DATA = (SID = XE))\n";
$db .= ")\n";
$conn = ocilogon($User,$Password,$db);
$sql = "select signature from approvers where empid='0481'";
$stmt = OCIParse($conn,$sql);
if (!OCIExecute($stmt)) { print "execution failed"; exit(); }
OCIFetchInto($stmt, &$arr,OCI_RETURN_LOBS);
// Also tried with OCI_ASSOC
echo ($arr[0]);
?>
in AdoDB
<?php
header ('content-type: image/JPEG');
ini_set ('display_errors', 1);
error_reporting(E_ALL);
$getId = $_GET;
include_once ('adodb.inc.php');
include_once ('adodb-exceptions.inc.php');
include_once ($_SERVER.'/conf/inc/conf-era.inc.php');
ini_set ('sendmail_from', MAIL_LOG);
ini_set ('error_log', ERR_PATH);
try
{
$dsn = 'oci8://'.DB_USERNAME.':'.DB_PASSWORD.'@'.DB_SERVER.'/'.DB_SID;
$db_Conn = ADONewConnection($dsn);
$db_Conn->debug = 1;
$arr = $db_Conn->GetOne("SELECT Signature FROM Approvers WHERE EmpId=:v_EmpId", array('v_EmpId' => $getId));
#echo ($arr->fields[0]);
echo ($arr);
}
catch (Exception $e)
{
echo $e->getMessage();
}
?>
kindly help me guys! thanks! i can't see what's going on...