Running Apache/2.0.40 (Unix) PHP/4.3.0. The following code works with Apache 1.3.27 but fails with Apache2. The process is supposed to retrieve a stored pdf file and display it.
<?
$db_host="abs@apexbill";
$db_user="username";
$db_pass="userpassword";
$connection = ifx_connect($db_host, $db_user, $db_pass) or die ("Unable to connect!");
ifx_textasvarchar(1);
$res_id = ifx_query("select length(statement) len, statement from statements where bfhist = " . $_REQUEST["bfhist"] . ";", $connection);
if ( ! $res_id ) {
printf("Can't select\n", ifx_error());
ifx_errormsg();
die;
}
$row = ifx_fetch_row($res_id, "CURRENT");
$len=$row['len'];
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Dispostion: inline;");
echo $row["statement"];
ifx_free_result($res_id);
?>
The following data appears in the temp file created which has a .fdf extension.
<br />
<b>Warning</b>: ifx_query(): Prepare fails (E [SQLSTATE=42 000 SQLCODE=-201]) in <b>/usr/local/apache2/htdocs/rms/showbill.php</b> on line <b>11</b><br />
Can't select
Anybody have any clues why the format of the Select statement got corrupted in Apache2 but worked in Apache 1?
Thanks