Bug #1879: Document contains no data when doing Fetch /
| From: | smweb at ihost dot de | Date: | Mon, 26 Jul 1999 15:08:03 +0000 |
| Subject: | Bug #1879: Document contains no data when doing Fetch / | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9166@lists.php.net to get a copy of this message | ||
From: smweb@ihost.de
Operating system: Linux
PHP version: 3.0.11
PHP Bug Type: Oracle related
Bug description: Document contains no data when doing Fetch /
Hi,
there seems to be a weird bug regarding OCIFetch(Into). Here's my PHP script:
=== start
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<TABLE CELLPADDING=5 BORDER=1>
<TR>
<TH>Alias</TH>
<TH>Full Name</TH>
</TR>
<?php
PutEnv("ORACLE_HOME=/usr/local/oracle");
PutEnv("ORACLE_SID=KIM");
$conn = OCILogon("web", "web", "KIM");
$stmt = OCIParse($conn, "select a, b from bla");
OCIExecute($stmt);
while (@OCIFetchInto($stmt, &$arrResult, OCI_ASSOC)) {
echo '<TR><TD>', $arrResult["A"],
'</TD><TD>', $arrResult["B"], '</TD></TR>';
}
OCIFreeStatement($stmt);
OCILogOff($conn);
?>
</table>
<FORM ACTION="insert.php3" METHOD="post">
<TABLE><TR>
<TH>Alias:</TH><TD><INPUT TYPE="text" SIZE=20
NAME="alias"></TD></TR>
<TH>Fullname:</TH><TD><INPUT TYPE="text" SIZE=20
NAME="fullname"></TD></TR>
<TR><TD COLSPAN=2><INPUT TYPE="submit"
NAME="OK"></TD></TR>
</TABLE>
</form>
</body>
</html>
=== end
This is the result:
=== start
Content-type: text/html
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<TABLE CELLPADDING=5 BORDER=1>
<TR>
<TH>Alias</TH>
<TH>Full Name</TH>
</TR>
Speicherzugriffsfehler
=== end
As soon as I comment this line
while (@OCIFetchInto($stmt, &$arrResult, OCI_ASSOC)) {
out, there's no error anymore.
I configured php using
./configure --with-oracle=/usr/local/oracle --enable-track-vars
(cgi version - the oracle dir is correct!)
The compilation worked without errors.
When I try to open the doc using Netscape, it says 'Document contains no data.'
Thanks,
- Steffen