title: oci_parse error message
body: <p>I get this error message, what does it mean and how to fix it?</p>
  
  <blockquote>
    <p><strong>Warning: oci_parse() expects parameter 1 to be resource, null given in /user_auth_fns.php on line 3</strong></p>
  </blockquote>
  
  <pre><code>$conn = db_connect();
  
  $result = oci_parse($conn, "select * from user where username='$username' and passwd = sha1('$password')"); 
    if (!$result){
      $err = oci_error();
    echo "Could not log you in.";
    exit;
    }
    $r = oci_execute($result);
    if (!$r) {
     $error = oci_error($conn);
    echo "Could not log you in." . $error['message'];
    exit;
    }
  
  
  function db_connect() 
  {
      $db = "dbms";
  
  if ($c=oci_connect("username", "password", $db)){
    echo "Successfully connected to Oracle.\n";
    OCILogoff($c);
  } else {
   $err = OCIError();
    echo "Oracle Connect Error " . $err[text];
  }
  }
  </code></pre>
  
  <p><strong>Edit 2</strong> fixed the problem, another error message, what other compression function(other than SHA1) should use for oracle?</p>
  
  <blockquote>
    <p><strong>Warning</strong>: oci_execute() [function.oci-execute]: ORA-00904: "SHA1": invalid identifier in /user_auth_fns.php on line 10</p>
  </blockquote>