|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-09-22 05:48 UTC] thies at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
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"; ?>