JeRRy wrote:
<snip>
I am getting the error below while trying to execute
the code below:

Warning: ocilogon(): _oci_open_server:  in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3
</snip>

Aha line 3.  Open oci8test2.php in notepad or
something and browse to line three.  Hit your down
arrow twice. ;)

<snip>
<?php

$c=OCILogon("scott","tiger");

/*
if ($c=OCILogon("scott", "tiger", "orcl")) {
  echo "Successfully connected to Oracle.\n";
  OCILogoff($c);
} else {
  $err = OCIError();
  echo "Oracle Connect Error " . $err[text];
}
*/
?>
</snip>

Okay lets read the error:

Warning: ocilogon(): _oci_open_server:  in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3


so ocilogon is producing some sort of error, it kindly gives us the line number to make it easier to find. :) Sometimes helpful but not always if you have alot of includes in it. ;)

So I'd say it's this part the error is:

if ($c=OCILogon("scott", "tiger", "orcl")) {

I didn't take this one up initially because it's all carbs - no nutritional value.


The entirety of his example is commented except for the single line (line 3) calling OCILogon. Since the error isn't that the function is undefined, and it (to my eyes) describes nothing - I stayed quiet.

The line you're suggesting he check (line 6) is in fact commented out. It does bring to light, however, the suggestion that he check whether he should be passing more arguments to the function.

You make a good point - that is that the example code is there to make sure things are working, and then to start changing it - get a good baseline, and work from there. Sound advice - would that more heeded it.

Cheers,
--
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to