php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1879 Document contains no data when doing Fetch /
Submitted: 1999-07-26 11:08 UTC Modified: 2006-07-17 08:50 UTC
From: smweb at ihost dot de Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 3.0.11 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: smweb at ihost dot de
New email:
PHP Version: OS:

 

 [1999-07-26 11:08 UTC] smweb at ihost dot de
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 08:35 UTC] sander@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC