szaman
szaman

Reputation: 6756

ORA-24374 error in php script

When I try to execute script

      PutEnv("TNS_ADMIN='C:\\Programy\\OracleDeveloper10g\\NETWORK\\ADMIN\\'");
      $conn = oci_connect(user, pass, dbstring);
      if (!$conn)
      {
        $e = oci_error();
        print htmlentities($e['message']);
        exit;
      }
      else
      {
        $stmt = OCIParse($conn, "SELECT * FROM USERS WHERE username = 'szymon'");
        OCIExecute($stmt, OCI_DEFAULT);
  while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
  foreach ($row as $item) {
   $password = $item;
  }
        if ($password != $_POST['password']){
          $stmt = OCIParse($conn, "EXECUTE clr_dtbs");
          $message = 'Tabele zostały usunięte';
        }
        else {
          $message = 'Podane hasło jest niepoprawne';
        }
      }
   }

I get ORA-24374 error.

Upvotes: 0

Views: 3464

Answers (2)

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181270

Try using oci_parse instead of OCIParse. And oci_execute instead of OCIExecute.

Also, do check for error codes returned by oci_parse and oci_execute.

Upvotes: 1

TheGrandWazoo
TheGrandWazoo

Reputation: 2897

Although I'm not used to (and not using) the Oracle API, does this forum post help you out?

http://codeigniter.com/forums/viewthread/103309/#521988

Upvotes: 1

Related Questions