php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1800 Problem with Oracle Cursors
Submitted: 1999-07-21 10:14 UTC Modified: 1999-09-22 05:48 UTC
From: hjensen at email dot com Assigned:
Status: Closed Package: Oracle related
PHP Version: 4.0 Beta 1 OS: RedHat Linux 5
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hjensen at email dot com
New email:
PHP Version: OS:

 

 [1999-07-21 10:14 UTC] hjensen at email dot com
I have compiled PHP4B1 into Apache 1.3.6 as follows:

./configure --with-apache=... --with-oracle=$ORACLE_HOME ...

All of my PHP pages but the ones using the Oracle functions work, so I will assume that PHP/Apache have been compiled and configured correctly.

Here is a sample script that does not work:

<?
	$dbc=ora_plogon("myuid","mypwd");
	$cur=ora_open($dbc);
	ora_parse($cur,"select count(*) from my_users");
	ora_exec($cur);
	ora_fetch($cur);
	echo "there are ".ora_getcolumn($cur,0)." users in the system";
?>

The error messages are all related to $cur being invalid

Warning: Invalid cursor index 1 in /mnt/diskc/html/test.phtml on line 4

The workaround I have found is to open a dummy cursor before opening the cursor that I end up using further down the script. The following script works:

<?
	$dbc=ora_plogon("myuid","mypwd");
        $dummy=ora_open($dbc);
	$cur=ora_open($dbc);
	ora_parse($cur,"select count(*) from my_users");
	ora_exec($cur);
	ora_fetch($cur);
	echo "there are ".ora_getcolumn($cur,0)." users in the system";
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-22 05:48 UTC] thies at cvs dot php dot net
please check with latest CVS - resumbmit if it's still there!


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 12:01:32 2025 UTC